IMP logo
IMP Reference Guide  develop.08ecd6469d,2026/04/02
The Integrative Modeling Platform
__init__.py
1 # This file was automatically generated by SWIG (https://www.swig.org).
2 # Version 4.3.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 
14 from sys import version_info as _swig_python_version_info
15 import _IMP_kernel
16 
17 try:
18  import builtins as __builtin__
19 except ImportError:
20  import __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 def _swig_add_metaclass(metaclass):
53  """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
54  def wrapper(cls):
55  return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
56  return wrapper
57 
58 
59 class _SwigNonDynamicMeta(type):
60  """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
61  __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
62 
63 
64 import weakref
65 
66 class IMP_KERNEL_SwigPyIterator(object):
67  r"""Proxy of C++ swig::IMP_KERNEL_SwigPyIterator class."""
68 
69  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
70 
71  def __init__(self, *args, **kwargs):
72  raise AttributeError("No constructor defined - class is abstract")
73  __repr__ = _swig_repr
74  __swig_destroy__ = _IMP_kernel.delete_IMP_KERNEL_SwigPyIterator
75 
76  def value(self):
77  r"""value(IMP_KERNEL_SwigPyIterator self) -> PyObject *"""
78  return _IMP_kernel.IMP_KERNEL_SwigPyIterator_value(self)
79 
80  def incr(self, n=1):
81  r"""incr(IMP_KERNEL_SwigPyIterator self, size_t n=1) -> IMP_KERNEL_SwigPyIterator"""
82  return _IMP_kernel.IMP_KERNEL_SwigPyIterator_incr(self, n)
83 
84  def decr(self, n=1):
85  r"""decr(IMP_KERNEL_SwigPyIterator self, size_t n=1) -> IMP_KERNEL_SwigPyIterator"""
86  return _IMP_kernel.IMP_KERNEL_SwigPyIterator_decr(self, n)
87 
88  def distance(self, x):
89  r"""distance(IMP_KERNEL_SwigPyIterator self, IMP_KERNEL_SwigPyIterator x) -> ptrdiff_t"""
90  return _IMP_kernel.IMP_KERNEL_SwigPyIterator_distance(self, x)
91 
92  def equal(self, x):
93  r"""equal(IMP_KERNEL_SwigPyIterator self, IMP_KERNEL_SwigPyIterator x) -> bool"""
94  return _IMP_kernel.IMP_KERNEL_SwigPyIterator_equal(self, x)
95 
96  def copy(self):
97  r"""copy(IMP_KERNEL_SwigPyIterator self) -> IMP_KERNEL_SwigPyIterator"""
98  return _IMP_kernel.IMP_KERNEL_SwigPyIterator_copy(self)
99 
100  def next(self):
101  r"""next(IMP_KERNEL_SwigPyIterator self) -> PyObject *"""
102  return _IMP_kernel.IMP_KERNEL_SwigPyIterator_next(self)
103 
104  def __next__(self):
105  r"""__next__(IMP_KERNEL_SwigPyIterator self) -> PyObject *"""
106  return _IMP_kernel.IMP_KERNEL_SwigPyIterator___next__(self)
107 
108  def previous(self):
109  r"""previous(IMP_KERNEL_SwigPyIterator self) -> PyObject *"""
110  return _IMP_kernel.IMP_KERNEL_SwigPyIterator_previous(self)
111 
112  def advance(self, n):
113  r"""advance(IMP_KERNEL_SwigPyIterator self, ptrdiff_t n) -> IMP_KERNEL_SwigPyIterator"""
114  return _IMP_kernel.IMP_KERNEL_SwigPyIterator_advance(self, n)
115 
116  def __eq__(self, x):
117  r"""__eq__(IMP_KERNEL_SwigPyIterator self, IMP_KERNEL_SwigPyIterator x) -> bool"""
118  return _IMP_kernel.IMP_KERNEL_SwigPyIterator___eq__(self, x)
119 
120  def __ne__(self, x):
121  r"""__ne__(IMP_KERNEL_SwigPyIterator self, IMP_KERNEL_SwigPyIterator x) -> bool"""
122  return _IMP_kernel.IMP_KERNEL_SwigPyIterator___ne__(self, x)
123 
124  def __iadd__(self, n):
125  r"""__iadd__(IMP_KERNEL_SwigPyIterator self, ptrdiff_t n) -> IMP_KERNEL_SwigPyIterator"""
126  return _IMP_kernel.IMP_KERNEL_SwigPyIterator___iadd__(self, n)
127 
128  def __isub__(self, n):
129  r"""__isub__(IMP_KERNEL_SwigPyIterator self, ptrdiff_t n) -> IMP_KERNEL_SwigPyIterator"""
130  return _IMP_kernel.IMP_KERNEL_SwigPyIterator___isub__(self, n)
131 
132  def __add__(self, n):
133  r"""__add__(IMP_KERNEL_SwigPyIterator self, ptrdiff_t n) -> IMP_KERNEL_SwigPyIterator"""
134  return _IMP_kernel.IMP_KERNEL_SwigPyIterator___add__(self, n)
135 
136  def __sub__(self, *args):
137  r"""
138  __sub__(IMP_KERNEL_SwigPyIterator self, ptrdiff_t n) -> IMP_KERNEL_SwigPyIterator
139  __sub__(IMP_KERNEL_SwigPyIterator self, IMP_KERNEL_SwigPyIterator x) -> ptrdiff_t
140  """
141  return _IMP_kernel.IMP_KERNEL_SwigPyIterator___sub__(self, *args)
142  def __iter__(self):
143  return self
144 
145 # Register IMP_KERNEL_SwigPyIterator in _IMP_kernel:
146 _IMP_kernel.IMP_KERNEL_SwigPyIterator_swigregister(IMP_KERNEL_SwigPyIterator)
147 
148 _value_types=[]
149 _object_types=[]
150 _raii_types=[]
151 _plural_types=[]
152 
153 IMP_DEBUG = _IMP_kernel.IMP_DEBUG
154 
155 IMP_RELEASE = _IMP_kernel.IMP_RELEASE
156 
157 IMP_SILENT = _IMP_kernel.IMP_SILENT
158 
159 IMP_PROGRESS = _IMP_kernel.IMP_PROGRESS
160 
161 IMP_TERSE = _IMP_kernel.IMP_TERSE
162 
163 IMP_VERBOSE = _IMP_kernel.IMP_VERBOSE
164 
165 IMP_MEMORY = _IMP_kernel.IMP_MEMORY
166 
167 IMP_NONE = _IMP_kernel.IMP_NONE
168 
169 IMP_USAGE = _IMP_kernel.IMP_USAGE
170 
171 IMP_INTERNAL = _IMP_kernel.IMP_INTERNAL
172 
173 IMP_KERNEL_HAS_LOG4CXX = _IMP_kernel.IMP_KERNEL_HAS_LOG4CXX
174 
175 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_kernel.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
176 
177 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_kernel.IMP_COMPILER_HAS_DEBUG_VECTOR
178 
179 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_kernel.IMP_COMPILER_HAS_RANDOM_SHUFFLE
180 
181 IMP_COMPILER_HAS_THREE_WAY = _IMP_kernel.IMP_COMPILER_HAS_THREE_WAY
182 
183 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_kernel.IMP_KERNEL_HAS_BOOST_RANDOM
184 
185 IMP_KERNEL_HAS_NUMPY = _IMP_kernel.IMP_KERNEL_HAS_NUMPY
186 
187 IMP_KERNEL_HAS_BOOST_SYSTEM = _IMP_kernel.IMP_KERNEL_HAS_BOOST_SYSTEM
188 
189 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_kernel.IMP_KERNEL_HAS_GPERFTOOLS
190 
191 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_kernel.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
192 
193 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_kernel.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
194 
195 IMPKERNEL_SHOW_WARNINGS = _IMP_kernel.IMPKERNEL_SHOW_WARNINGS
196 
197 
198 import sys
199 class _DirectorObjects:
200  """@internal Simple class to keep references to director objects
201  to prevent premature deletion."""
202  def __init__(self):
203  self._objects = []
204  def register(self, obj):
205  """Take a reference to a director object; will only work for
206  refcounted C++ classes"""
207  if hasattr(obj, 'get_ref_count'):
208  self._objects.append(obj)
209  def cleanup(self):
210  """Only drop our reference and allow cleanup by Python if no other
211  Python references exist (we hold 3 references: one in self._objects,
212  one in x, and one in the argument list for getrefcount) *and* no
213  other C++ references exist (the Python object always holds one)"""
214  objs = [x for x in self._objects if sys.getrefcount(x) > 3 \
215  or x.get_ref_count() > 1]
216 # Do in two steps so the references are kept until the end of the
217 # function (deleting references may trigger a fresh call to this method)
218  self._objects = objs
219  def get_object_count(self):
220  """Get number of director objects (useful for testing only)"""
221  return len(self._objects)
222 _director_objects = _DirectorObjects()
223 
224 DEFAULT_CHECK = _IMP_kernel.DEFAULT_CHECK
225 
226 NONE = _IMP_kernel.NONE
227 
228 USAGE = _IMP_kernel.USAGE
229 
230 USAGE_AND_INTERNAL = _IMP_kernel.USAGE_AND_INTERNAL
231 
232 
233 def set_check_level(tf):
234  r"""set_check_level(IMP::CheckLevel tf)"""
235  return _IMP_kernel.set_check_level(tf)
236 
237 def get_check_level():
238  r"""get_check_level() -> IMP::CheckLevel"""
239  return _IMP_kernel.get_check_level()
240 
241 from _IMP_kernel import Exception, InternalException, ModelException, EventException
242 from _IMP_kernel import UsageException, IndexException, IOException, ValueException
243 from _IMP_kernel import TypeException
244 
245 class _ostream(object):
246  r"""Proxy of C++ std::ostream class."""
247 
248  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
249 
250  def __init__(self, *args, **kwargs):
251  raise AttributeError("No constructor defined")
252  __repr__ = _swig_repr
253 
254  def write(self, osa_buf):
255  r"""write(_ostream self, char const * osa_buf)"""
256  return _IMP_kernel._ostream_write(self, osa_buf)
257 
258 # Register _ostream in _IMP_kernel:
259 _IMP_kernel._ostream_swigregister(_ostream)
260 IMP_C_OPEN_BINARY = _IMP_kernel.IMP_C_OPEN_BINARY
261 
262 
263 from . import _list_util
264 
265 
266 _models_set = weakref.WeakSet()
267 
268 def _models_set_get(m):
269  for x in _models_set:
270  if x == m:
271  return x
272 
273 
274 _raii_types.append("SetLogState")
275 
276 
277 _raii_types.append("SetNumberOfThreads")
278 
279 
280 _raii_types.append("SetCheckState")
281 
282 
283 _object_types.append("Object")
284 
285 
286 def _object_cast_to_Object(o):
287  r"""_object_cast_to_Object(Object * o) -> Object"""
288  return _IMP_kernel._object_cast_to_Object(o)
289 
290 _object_types.append("_TestObject")
291 
292 
293 def _object_cast_to__TestObject(o):
294  r"""_object_cast_to__TestObject(Object * o) -> _TestObject"""
295  return _IMP_kernel._object_cast_to__TestObject(o)
296 
297 VersionInfos=list
298 _plural_types.append("VersionInfos")
299 _value_types.append("VersionInfo")
300 
301 
302 _raii_types.append("CreateLogContext")
303 
304 
305 _raii_types.append("WarningContext")
306 
307 
308 _raii_types.append("SetLogTarget")
309 
310 
311 _TestValues=list
312 _plural_types.append("_TestValues")
313 _value_types.append("_TestValue")
314 
315 
316 Floats=list
317 _plural_types.append("Floats")
318 _value_types.append("Float")
319 
320 
321 Ints=list
322 _plural_types.append("Ints")
323 _value_types.append("Int")
324 
325 
326 Strings=list
327 _plural_types.append("Strings")
328 _value_types.append("String")
329 
330 
331 _Protections=list
332 _plural_types.append("_Protections")
333 _value_types.append("_Protection")
334 
335 class _InputAdaptor(object):
336  r"""Proxy of C++ IMP::InputAdaptor class."""
337 
338  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
339 
340  def __init__(self, *args, **kwargs):
341  raise AttributeError("No constructor defined")
342  __repr__ = _swig_repr
343 
344  def __getstate__(self):
345  raise NotImplementedError(str(self.__class__)
346  + " does not support serialization")
347 
348  __swig_destroy__ = _IMP_kernel.delete__InputAdaptor
349 
350 # Register _InputAdaptor in _IMP_kernel:
351 _IMP_kernel._InputAdaptor_swigregister(_InputAdaptor)
352 class _NonCopyable(object):
353  r"""Proxy of C++ IMP::NonCopyable class."""
354 
355  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
356 
357  def __init__(self, *args, **kwargs):
358  raise AttributeError("No constructor defined")
359  __repr__ = _swig_repr
360  __swig_destroy__ = _IMP_kernel.delete__NonCopyable
361 
362 # Register _NonCopyable in _IMP_kernel:
363 _IMP_kernel._NonCopyable_swigregister(_NonCopyable)
364 class _RAII(_NonCopyable):
365  r"""Proxy of C++ IMP::RAII class."""
366 
367  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
368 
369  def __init__(self, *args, **kwargs):
370  raise AttributeError("No constructor defined")
371  __repr__ = _swig_repr
372  __swig_destroy__ = _IMP_kernel.delete__RAII
373 
374 # Register _RAII in _IMP_kernel:
375 _IMP_kernel._RAII_swigregister(_RAII)
376 class _Value(object):
377  r"""Proxy of C++ IMP::Value class."""
378 
379  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
380 
381  def __init__(self, *args, **kwargs):
382  raise AttributeError("No constructor defined")
383  __repr__ = _swig_repr
384 
385  def __getstate__(self):
386  raise NotImplementedError(str(self.__class__)
387  + " does not support serialization")
388 
389  __swig_destroy__ = _IMP_kernel.delete__Value
390 
391 # Register _Value in _IMP_kernel:
392 _IMP_kernel._Value_swigregister(_Value)
393 
394 def get_executable_name():
395  r"""get_executable_name() -> std::string"""
396  return _IMP_kernel.get_executable_name()
397 
398 def setup_from_argv(*args):
399  r"""
400  setup_from_argv(IMP::Strings const & argv, std::string description)
401  setup_from_argv(IMP::Strings const & argv, std::string description, std::string positional_description, int num_positional) -> IMP::Strings
402  """
403  return _IMP_kernel.setup_from_argv(*args)
404 
405 def add_string_flag(name, default_value, description):
406  r"""add_string_flag(std::string name, std::string default_value, std::string description)"""
407  return _IMP_kernel.add_string_flag(name, default_value, description)
408 
409 def get_string_flag(name):
410  r"""get_string_flag(std::string name) -> std::string"""
411  return _IMP_kernel.get_string_flag(name)
412 
413 def add_int_flag(name, default_value, description):
414  r"""add_int_flag(std::string name, size_t default_value, std::string description)"""
415  return _IMP_kernel.add_int_flag(name, default_value, description)
416 
417 def get_int_flag(name):
418  r"""get_int_flag(std::string name) -> size_t"""
419  return _IMP_kernel.get_int_flag(name)
420 
421 def add_bool_flag(name, description):
422  r"""add_bool_flag(std::string name, std::string description)"""
423  return _IMP_kernel.add_bool_flag(name, description)
424 
425 def get_bool_flag(name):
426  r"""get_bool_flag(std::string name) -> bool"""
427  return _IMP_kernel.get_bool_flag(name)
428 
429 def add_float_flag(name, default_value, description):
430  r"""add_float_flag(std::string name, double default_value, std::string description)"""
431  return _IMP_kernel.add_float_flag(name, default_value, description)
432 
433 def get_float_flag(name):
434  r"""get_float_flag(std::string name) -> double"""
435  return _IMP_kernel.get_float_flag(name)
436 
437 def write_help(*args):
438  r"""write_help(_ostream out=std::cerr)"""
439  return _IMP_kernel.write_help(*args)
440 
441 def get_is_quick_test():
442  r"""get_is_quick_test() -> bool"""
443  return _IMP_kernel.get_is_quick_test()
444 DEFAULT = _IMP_kernel.DEFAULT
445 
446 SILENT = _IMP_kernel.SILENT
447 
448 WARNING = _IMP_kernel.WARNING
449 
450 PROGRESS = _IMP_kernel.PROGRESS
451 
452 TERSE = _IMP_kernel.TERSE
453 
454 VERBOSE = _IMP_kernel.VERBOSE
455 
456 MEMORY = _IMP_kernel.MEMORY
457 
458 ALL_LOG = _IMP_kernel.ALL_LOG
459 
460 class VersionInfo(_Value):
461  r"""Proxy of C++ IMP::VersionInfo class."""
462 
463  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
464 
465  def __init__(self, *args):
466  r"""
467  __init__(VersionInfo self, std::string module, std::string version) -> VersionInfo
468  __init__(VersionInfo self) -> VersionInfo
469  """
470  _IMP_kernel.VersionInfo_swiginit(self, _IMP_kernel.new_VersionInfo(*args))
471 
472  def get_module(self):
473  r"""get_module(VersionInfo self) -> std::string"""
474  return _IMP_kernel.VersionInfo_get_module(self)
475 
476  def get_version(self):
477  r"""get_version(VersionInfo self) -> std::string"""
478  return _IMP_kernel.VersionInfo_get_version(self)
479 
480  def show(self, *args):
481  r"""show(VersionInfo self, _ostream out=std::cout)"""
482  return _IMP_kernel.VersionInfo_show(self, *args)
483 
484  def __cmp__(self, o):
485  r"""__cmp__(VersionInfo self, VersionInfo o) -> int"""
486  return _IMP_kernel.VersionInfo___cmp__(self, o)
487 
488  def __eq__(self, o):
489  r"""__eq__(VersionInfo self, VersionInfo o) -> bool"""
490  return _IMP_kernel.VersionInfo___eq__(self, o)
491 
492  def __ne__(self, o):
493  r"""__ne__(VersionInfo self, VersionInfo o) -> bool"""
494  return _IMP_kernel.VersionInfo___ne__(self, o)
495 
496  def __lt__(self, o):
497  r"""__lt__(VersionInfo self, VersionInfo o) -> bool"""
498  return _IMP_kernel.VersionInfo___lt__(self, o)
499 
500  def __gt__(self, o):
501  r"""__gt__(VersionInfo self, VersionInfo o) -> bool"""
502  return _IMP_kernel.VersionInfo___gt__(self, o)
503 
504  def __ge__(self, o):
505  r"""__ge__(VersionInfo self, VersionInfo o) -> bool"""
506  return _IMP_kernel.VersionInfo___ge__(self, o)
507 
508  def __le__(self, o):
509  r"""__le__(VersionInfo self, VersionInfo o) -> bool"""
510  return _IMP_kernel.VersionInfo___le__(self, o)
511 
512  def __str__(self):
513  r"""__str__(VersionInfo self) -> std::string"""
514  return _IMP_kernel.VersionInfo___str__(self)
515 
516  def __repr__(self):
517  r"""__repr__(VersionInfo self) -> std::string"""
518  return _IMP_kernel.VersionInfo___repr__(self)
519 
520  def _get_as_binary(self):
521  r"""_get_as_binary(VersionInfo self) -> PyObject *"""
522  return _IMP_kernel.VersionInfo__get_as_binary(self)
523 
524  def _set_from_binary(self, p):
525  r"""_set_from_binary(VersionInfo self, PyObject * p)"""
526  return _IMP_kernel.VersionInfo__set_from_binary(self, p)
527 
528  def __getstate__(self):
529  p = self._get_as_binary()
530  if len(self.__dict__) > 1:
531  d = self.__dict__.copy()
532  del d['this']
533  p = (d, p)
534  return p
535 
536  def __setstate__(self, p):
537  if not hasattr(self, 'this'):
538  self.__init__()
539  if isinstance(p, tuple):
540  d, p = p
541  self.__dict__.update(d)
542  return self._set_from_binary(p)
543 
544  __swig_destroy__ = _IMP_kernel.delete_VersionInfo
545 
546 # Register VersionInfo in _IMP_kernel:
547 _IMP_kernel.VersionInfo_swigregister(VersionInfo)
548 class TextOutput(_InputAdaptor):
549  r"""Proxy of C++ IMP::TextOutput class."""
550 
551  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
552  __repr__ = _swig_repr
553 
554  def __init__(self, *args):
555  r"""
556  __init__(TextOutput self, int arg2) -> TextOutput
557  __init__(TextOutput self, double arg2) -> TextOutput
558  __init__(TextOutput self, char const * c, bool append=False) -> TextOutput
559  __init__(TextOutput self, IMP::TextProxy< std::ostream > p) -> TextOutput
560  __init__(TextOutput self) -> TextOutput
561  __init__(TextOutput self, std::string file_name, bool append=False) -> TextOutput
562  """
563  _IMP_kernel.TextOutput_swiginit(self, _IMP_kernel.new_TextOutput(*args))
564 
565  def show(self, *args):
566  r"""show(TextOutput self, _ostream out=std::cout)"""
567  return _IMP_kernel.TextOutput_show(self, *args)
568 
569  def get_name(self):
570  r"""get_name(TextOutput self) -> std::string"""
571  return _IMP_kernel.TextOutput_get_name(self)
572  __swig_destroy__ = _IMP_kernel.delete_TextOutput
573 
574 # Register TextOutput in _IMP_kernel:
575 _IMP_kernel.TextOutput_swigregister(TextOutput)
576 class TextInput(_InputAdaptor):
577  r"""Proxy of C++ IMP::TextInput class."""
578 
579  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
580  __repr__ = _swig_repr
581 
582  def __init__(self, *args):
583  r"""
584  __init__(TextInput self, int arg2) -> TextInput
585  __init__(TextInput self, double arg2) -> TextInput
586  __init__(TextInput self, char const * c) -> TextInput
587  __init__(TextInput self, IMP::TextProxy< std::istream > p) -> TextInput
588  __init__(TextInput self) -> TextInput
589  __init__(TextInput self, std::string file_name) -> TextInput
590  """
591  _IMP_kernel.TextInput_swiginit(self, _IMP_kernel.new_TextInput(*args))
592 
593  def show(self, *args):
594  r"""show(TextInput self, _ostream out=std::cout)"""
595  return _IMP_kernel.TextInput_show(self, *args)
596 
597  def get_name(self):
598  r"""get_name(TextInput self) -> std::string"""
599  return _IMP_kernel.TextInput_get_name(self)
600 
601  def set_binary_open_mode(self, binary):
602  r"""set_binary_open_mode(TextInput self, bool binary)"""
603  return _IMP_kernel.TextInput_set_binary_open_mode(self, binary)
604  __swig_destroy__ = _IMP_kernel.delete_TextInput
605 
606 # Register TextInput in _IMP_kernel:
607 _IMP_kernel.TextInput_swigregister(TextInput)
608 class SetLogTarget(_RAII):
609  r"""Proxy of C++ IMP::SetLogTarget class."""
610 
611  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
612 
613  def __init__(self, *args):
614  r"""
615  __init__(SetLogTarget self) -> SetLogTarget
616  __init__(SetLogTarget self, TextOutput to) -> SetLogTarget
617  """
618  _IMP_kernel.SetLogTarget_swiginit(self, _IMP_kernel.new_SetLogTarget(*args))
619 
620  def set(self, to):
621  r"""set(SetLogTarget self, TextOutput to)"""
622  return _IMP_kernel.SetLogTarget_set(self, to)
623 
624  def reset(self):
625  r"""reset(SetLogTarget self)"""
626  return _IMP_kernel.SetLogTarget_reset(self)
627  __swig_destroy__ = _IMP_kernel.delete_SetLogTarget
628 
629  def show(self, *args):
630  r"""show(SetLogTarget self, _ostream out=std::cout)"""
631  return _IMP_kernel.SetLogTarget_show(self, *args)
632 
633  def __enter__(self):
634  return self
635  def __exit__(self, exc_type, exc_val, exc_tb):
636  self.reset()
637  return False
638 
639 
640  def __str__(self):
641  r"""__str__(SetLogTarget self) -> std::string"""
642  return _IMP_kernel.SetLogTarget___str__(self)
643 
644  def __repr__(self):
645  r"""__repr__(SetLogTarget self) -> std::string"""
646  return _IMP_kernel.SetLogTarget___repr__(self)
647 
648 # Register SetLogTarget in _IMP_kernel:
649 _IMP_kernel.SetLogTarget_swigregister(SetLogTarget)
650 
651 def create_temporary_file(*args):
652  r"""create_temporary_file(std::string prefix="imp_temp", std::string suffix="") -> TextOutput"""
653  return _IMP_kernel.create_temporary_file(*args)
654 
655 def create_temporary_file_name(*args):
656  r"""create_temporary_file_name(std::string prefix="imp_temp", std::string suffix="") -> std::string"""
657  return _IMP_kernel.create_temporary_file_name(*args)
658 
659 def get_relative_path(base, relative):
660  r"""get_relative_path(std::string base, std::string relative) -> std::string"""
661  return _IMP_kernel.get_relative_path(base, relative)
662 
663 def get_absolute_path(file):
664  r"""get_absolute_path(std::string file) -> std::string"""
665  return _IMP_kernel.get_absolute_path(file)
666 
667 def push_log_context(functionname, object):
668  r"""push_log_context(char const * functionname, void const * object)"""
669  return _IMP_kernel.push_log_context(functionname, object)
670 
671 def pop_log_context():
672  r"""pop_log_context()"""
673  return _IMP_kernel.pop_log_context()
674 
675 def add_to_log(*args):
676  r"""
677  add_to_log(std::string to_write)
678  add_to_log(IMP::LogLevel level, std::string to_write)
679  """
680  return _IMP_kernel.add_to_log(*args)
681 
682 def set_log_level(l):
683  r"""set_log_level(IMP::LogLevel l)"""
684  return _IMP_kernel.set_log_level(l)
685 
686 def set_log_timer(tb):
687  r"""set_log_timer(bool tb)"""
688  return _IMP_kernel.set_log_timer(tb)
689 
690 def reset_log_timer():
691  r"""reset_log_timer()"""
692  return _IMP_kernel.reset_log_timer()
693 
694 def get_log_level():
695  r"""get_log_level() -> IMP::LogLevel"""
696  return _IMP_kernel.get_log_level()
697 
698 def set_progress_display(description, steps):
699  r"""set_progress_display(std::string description, unsigned int steps)"""
700  return _IMP_kernel.set_progress_display(description, steps)
701 
702 def add_to_progress_display(step=1):
703  r"""add_to_progress_display(unsigned int step=1)"""
704  return _IMP_kernel.add_to_progress_display(step)
705 class Object(_NonCopyable):
706  r"""Proxy of C++ IMP::Object class."""
707 
708  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
709 
710  def __init__(self, name):
711  r"""__init__(Object self, std::string name) -> Object"""
712  if self.__class__ == Object:
713  _self = None
714  else:
715  _self = self
716  _IMP_kernel.Object_swiginit(self, _IMP_kernel.new_Object(_self, name))
717 
718  if self.__class__ != Object:
719  _director_objects.register(self)
720 
721 
722 
723  __swig_destroy__ = _IMP_kernel.delete_Object
724 
725  def __hash__(self):
726  r"""__hash__(Object self) -> std::size_t"""
727  return _IMP_kernel.Object___hash__(self)
728 
729  def set_log_level(self, l):
730  r"""set_log_level(Object self, IMP::LogLevel l)"""
731  return _IMP_kernel.Object_set_log_level(self, l)
732 
733  def set_check_level(self, l):
734  r"""set_check_level(Object self, IMP::CheckLevel l)"""
735  return _IMP_kernel.Object_set_check_level(self, l)
736 
737  def get_log_level(self):
738  r"""get_log_level(Object self) -> IMP::LogLevel"""
739  return _IMP_kernel.Object_get_log_level(self)
740 
741  def get_check_level(self):
742  r"""get_check_level(Object self) -> IMP::CheckLevel"""
743  return _IMP_kernel.Object_get_check_level(self)
744 
745  def get_version_info(self):
746  r"""get_version_info(Object self) -> VersionInfo"""
747  val = _IMP_kernel.Object_get_version_info(self)
748  if val.get_module() == 'none':
749  val = VersionInfo(
750  self.__module__,
751  __import__(self.__module__).get_module_version())
752  return val
753 
754  def get_name(self):
755  r"""get_name(Object self) -> std::string const &"""
756  return _IMP_kernel.Object_get_name(self)
757 
758  def set_name(self, name):
759  r"""set_name(Object self, std::string name)"""
760  return _IMP_kernel.Object_set_name(self, name)
761 
762  def get_type_name(self):
763  r"""get_type_name(Object self) -> std::string"""
764  val = _IMP_kernel.Object_get_type_name(self)
765  if val == 'unknown object type':
766  val = self.__class__.__name__
767  return val
768 
769  def set_was_used(self, tf):
770  r"""set_was_used(Object self, bool tf)"""
771  return _IMP_kernel.Object_set_was_used(self, tf)
772 
773  def show(self, *args):
774  r"""show(Object self, _ostream out=std::cout)"""
775  return _IMP_kernel.Object_show(self, *args)
776 
777  def get_string(self):
778  r"""get_string(Object self) -> std::string"""
779  return _IMP_kernel.Object_get_string(self)
780 
781  def _on_destruction(self):
782  r"""_on_destruction(Object self)"""
783  return _IMP_kernel.Object__on_destruction(self)
784 
785  def get_is_valid(self):
786  r"""get_is_valid(Object self) -> bool"""
787  return _IMP_kernel.Object_get_is_valid(self)
788 
789  def get_ref_count(self):
790  r"""get_ref_count(Object self) -> unsigned int"""
791  return _IMP_kernel.Object_get_ref_count(self)
792 
793  @staticmethod
794  def get_number_of_live_objects():
795  r"""get_number_of_live_objects() -> unsigned int"""
796  return _IMP_kernel.Object_get_number_of_live_objects()
797 
798  def get_is_shared(self):
799  r"""get_is_shared(Object self) -> bool"""
800  return _IMP_kernel.Object_get_is_shared(self)
801 
802  def clear_caches(self):
803  r"""clear_caches(Object self)"""
804  return _IMP_kernel.Object_clear_caches(self)
805 
806  def do_destroy(self):
807  r"""do_destroy(Object self)"""
808  return _IMP_kernel.Object_do_destroy(self)
809 
810  def __getstate__(self):
811  raise NotImplementedError(str(self.__class__)
812  + " does not support serialization")
813 
814 
815  def __eq__(self, o):
816  r"""__eq__(Object self, Object o) -> bool"""
817  return _IMP_kernel.Object___eq__(self, o)
818 
819  def __ne__(self, o):
820  r"""__ne__(Object self, Object o) -> bool"""
821  return _IMP_kernel.Object___ne__(self, o)
822 
823  def __le__(self, o):
824  r"""__le__(Object self, Object o) -> bool"""
825  return _IMP_kernel.Object___le__(self, o)
826 
827  def __lt__(self, o):
828  r"""__lt__(Object self, Object o) -> bool"""
829  return _IMP_kernel.Object___lt__(self, o)
830 
831  def __ge__(self, o):
832  r"""__ge__(Object self, Object o) -> bool"""
833  return _IMP_kernel.Object___ge__(self, o)
834 
835  def __gt__(self, o):
836  r"""__gt__(Object self, Object o) -> bool"""
837  return _IMP_kernel.Object___gt__(self, o)
838 
839  def _get_director_object(self):
840  r"""_get_director_object(Object self) -> PyObject *"""
841  return _IMP_kernel.Object__get_director_object(self)
842 
844  """Return this object cast to the most derived subclass."""
845  # If this is a SWIG director, return the original Python object
846  pyobj = self._get_director_object()
847  if pyobj is not None:
848  return pyobj
849  # Otherwise, use the object's module and type name to look up
850  # the corresponding most-derived Python type
851  modname = self.get_version_info().get_module().replace('::', '.')
852  type_name = self.get_type_name()
853  if (modname == 'IMP.core'
854  and type_name == 'GenericBoundingBox3DSingletonScore'):
855  type_name = 'BoundingBox3DSingletonScore'
856  elif (modname == 'IMP.core'
857  and type_name == 'GenericAttributeSingletonScore'):
858  type_name = 'AttributeSingletonScore'
859  elif (modname == 'IMP.core'
860  and type_name == 'GenericBoundingSphere3DSingletonScore'):
861  type_name = 'BoundingSphere3DSingletonScore'
862  elif modname == 'IMP' and type_name == 'RestraintScoringFunction':
863  # The implicit RestraintScoringFunction isn't exposed to Python,
864  # so just return the base class
865  return self
866  elif modname == 'IMP' and type_name == 'GenericRestraintsScoringFunction':
867  type_name = '_RestraintsScoringFunction'
868  modobj = sys.modules[modname]
869  clsobj = getattr(modobj, type_name)
870  return clsobj.get_from(self)
871 
872 
873  def __str__(self):
874  r"""__str__(Object self) -> std::string"""
875  return _IMP_kernel.Object___str__(self)
876 
877  def __repr__(self):
878  r"""__repr__(Object self) -> std::string"""
879  return _IMP_kernel.Object___repr__(self)
880 
881  @staticmethod
882  def get_from(o):
883  return _object_cast_to_Object(o)
884 
885  def __disown__(self):
886  self.this.disown()
887  _IMP_kernel.disown_Object(self)
888  return weakref.proxy(self)
889 
890 # Register Object in _IMP_kernel:
891 _IMP_kernel.Object_swigregister(Object)
892 class SetLogState(_RAII):
893  r"""Proxy of C++ IMP::SetLogState class."""
894 
895  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
896 
897  def reset(self):
898  r"""reset(SetLogState self)"""
899  return _IMP_kernel.SetLogState_reset(self)
900  __swig_destroy__ = _IMP_kernel.delete_SetLogState
901 
902  def show(self, *args):
903  r"""show(SetLogState self, _ostream out=std::cout)"""
904  return _IMP_kernel.SetLogState_show(self, *args)
905 
906  def __init__(self, *args):
907  r"""
908  __init__(SetLogState self) -> SetLogState
909  __init__(SetLogState self, Object o, IMP::LogLevel l) -> SetLogState
910  __init__(SetLogState self, IMP::LogLevel l) -> SetLogState
911  """
912  _IMP_kernel.SetLogState_swiginit(self, _IMP_kernel.new_SetLogState(*args))
913 
914  def set(self, *args):
915  r"""
916  set(SetLogState self, Object o, IMP::LogLevel l)
917  set(SetLogState self, IMP::LogLevel l)
918  """
919  return _IMP_kernel.SetLogState_set(self, *args)
920 
921  def __enter__(self):
922  return self
923  def __exit__(self, exc_type, exc_val, exc_tb):
924  self.reset()
925  return False
926 
927 
928  def __str__(self):
929  r"""__str__(SetLogState self) -> std::string"""
930  return _IMP_kernel.SetLogState___str__(self)
931 
932  def __repr__(self):
933  r"""__repr__(SetLogState self) -> std::string"""
934  return _IMP_kernel.SetLogState___repr__(self)
935 
936 # Register SetLogState in _IMP_kernel:
937 _IMP_kernel.SetLogState_swigregister(SetLogState)
938 class WarningContext(object):
939  r"""Proxy of C++ IMP::WarningContext class."""
940 
941  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
942  data_ = property(_IMP_kernel.WarningContext_data__get, _IMP_kernel.WarningContext_data__set, doc=r"""data_ : boost::unordered_set<(std::string)>""")
943 
944  def add_warning(self, key, warning):
945  r"""add_warning(WarningContext self, std::string key, std::string warning)"""
946  return _IMP_kernel.WarningContext_add_warning(self, key, warning)
947 
948  def clear_warnings(self):
949  r"""clear_warnings(WarningContext self)"""
950  return _IMP_kernel.WarningContext_clear_warnings(self)
951 
952  def dump_warnings(self):
953  r"""dump_warnings(WarningContext self)"""
954  return _IMP_kernel.WarningContext_dump_warnings(self)
955  __swig_destroy__ = _IMP_kernel.delete_WarningContext
956 
957  def show(self, *args):
958  r"""show(WarningContext self, _ostream out=std::cout)"""
959  return _IMP_kernel.WarningContext_show(self, *args)
960 
961  def __enter__(self):
962  return self
963  def __exit__(self, exc_type, exc_val, exc_tb):
964  self.reset()
965  return False
966 
967 
968  def __str__(self):
969  r"""__str__(WarningContext self) -> std::string"""
970  return _IMP_kernel.WarningContext___str__(self)
971 
972  def __repr__(self):
973  r"""__repr__(WarningContext self) -> std::string"""
974  return _IMP_kernel.WarningContext___repr__(self)
975 
976  def __init__(self):
977  r"""__init__(WarningContext self) -> WarningContext"""
978  _IMP_kernel.WarningContext_swiginit(self, _IMP_kernel.new_WarningContext())
979 
980 # Register WarningContext in _IMP_kernel:
981 _IMP_kernel.WarningContext_swigregister(WarningContext)
982 class CreateLogContext(_RAII):
983  r"""Proxy of C++ IMP::CreateLogContext class."""
984 
985  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
986 
987  def __init__(self, *args):
988  r"""
989  __init__(CreateLogContext self, std::string fname, Object object=None) -> CreateLogContext
990  __init__(CreateLogContext self) -> CreateLogContext
991  __init__(CreateLogContext self, char const * fname, Object object=None) -> CreateLogContext
992  """
993  _IMP_kernel.CreateLogContext_swiginit(self, _IMP_kernel.new_CreateLogContext(*args))
994 
995  def set(self, fname, object=None):
996  r"""set(CreateLogContext self, char const * fname, Object object=None)"""
997  return _IMP_kernel.CreateLogContext_set(self, fname, object)
998 
999  def reset(self):
1000  r"""reset(CreateLogContext self)"""
1001  return _IMP_kernel.CreateLogContext_reset(self)
1002  __swig_destroy__ = _IMP_kernel.delete_CreateLogContext
1003 
1004  def show(self, *args):
1005  r"""show(CreateLogContext self, _ostream out=std::cout)"""
1006  return _IMP_kernel.CreateLogContext_show(self, *args)
1007 
1008  def __enter__(self):
1009  return self
1010  def __exit__(self, exc_type, exc_val, exc_tb):
1011  self.reset()
1012  return False
1013 
1014 
1015  def __str__(self):
1016  r"""__str__(CreateLogContext self) -> std::string"""
1017  return _IMP_kernel.CreateLogContext___str__(self)
1018 
1019  def __repr__(self):
1020  r"""__repr__(CreateLogContext self) -> std::string"""
1021  return _IMP_kernel.CreateLogContext___repr__(self)
1022 
1023 # Register CreateLogContext in _IMP_kernel:
1024 _IMP_kernel.CreateLogContext_swigregister(CreateLogContext)
1025 class SetCheckState(_RAII):
1026  r"""Proxy of C++ IMP::SetCheckState class."""
1027 
1028  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1029 
1030  def reset(self):
1031  r"""reset(SetCheckState self)"""
1032  return _IMP_kernel.SetCheckState_reset(self)
1033  __swig_destroy__ = _IMP_kernel.delete_SetCheckState
1034 
1035  def show(self, *args):
1036  r"""show(SetCheckState self, _ostream out=std::cout)"""
1037  return _IMP_kernel.SetCheckState_show(self, *args)
1038 
1039  def __init__(self, *args):
1040  r"""
1041  __init__(SetCheckState self) -> SetCheckState
1042  __init__(SetCheckState self, Object o, IMP::CheckLevel l) -> SetCheckState
1043  __init__(SetCheckState self, IMP::CheckLevel l) -> SetCheckState
1044  """
1045  _IMP_kernel.SetCheckState_swiginit(self, _IMP_kernel.new_SetCheckState(*args))
1046 
1047  def set(self, *args):
1048  r"""
1049  set(SetCheckState self, Object o, IMP::CheckLevel l)
1050  set(SetCheckState self, IMP::CheckLevel l)
1051  """
1052  return _IMP_kernel.SetCheckState_set(self, *args)
1053 
1054  def __enter__(self):
1055  return self
1056  def __exit__(self, exc_type, exc_val, exc_tb):
1057  self.reset()
1058  return False
1059 
1060 
1061  def __str__(self):
1062  r"""__str__(SetCheckState self) -> std::string"""
1063  return _IMP_kernel.SetCheckState___str__(self)
1064 
1065  def __repr__(self):
1066  r"""__repr__(SetCheckState self) -> std::string"""
1067  return _IMP_kernel.SetCheckState___repr__(self)
1068 
1069 # Register SetCheckState in _IMP_kernel:
1070 _IMP_kernel.SetCheckState_swigregister(SetCheckState)
1071 
1072 def get_unique_name(templ):
1073  r"""get_unique_name(std::string templ) -> std::string"""
1074  return _IMP_kernel.get_unique_name(templ)
1075 
1076 def get_copyright():
1077  r"""get_copyright() -> std::string"""
1078  return _IMP_kernel.get_copyright()
1079 class _Protection(object):
1080  r"""Proxy of C++ IMP::internal::_Protection class."""
1081 
1082  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1083 
1084  def __init__(self, *args, **kwargs):
1085  raise AttributeError("No constructor defined")
1086 
1087  def show(self, *args):
1088  r"""show(_Protection self, _ostream out=std::cout)"""
1089  return _IMP_kernel._Protection_show(self, *args)
1090 
1091  def __str__(self):
1092  r"""__str__(_Protection self) -> std::string"""
1093  return _IMP_kernel._Protection___str__(self)
1094 
1095  def __repr__(self):
1096  r"""__repr__(_Protection self) -> std::string"""
1097  return _IMP_kernel._Protection___repr__(self)
1098  __swig_destroy__ = _IMP_kernel.delete__Protection
1099 
1100 # Register _Protection in _IMP_kernel:
1101 _IMP_kernel._Protection_swigregister(_Protection)
1102 
1103 def _test_log():
1104  r"""_test_log()"""
1105  return _IMP_kernel._test_log()
1106 
1107 def _test_intranges(ips):
1108  r"""_test_intranges(IMP::IntRanges const & ips) -> int"""
1109  return _IMP_kernel._test_intranges(ips)
1110 
1111 def _test_intrange(*args):
1112  r"""
1113  _test_intrange(IMP::IntRange const & ips) -> IMP::IntRange
1114  _test_intrange() -> IMP::IntRange
1115  """
1116  return _IMP_kernel._test_intrange(*args)
1117 
1118 def _test_ifile(a):
1119  r"""_test_ifile(TextInput a) -> std::string"""
1120  return _IMP_kernel._test_ifile(a)
1121 
1122 def _test_ofile(a):
1123  r"""_test_ofile(TextOutput a) -> std::string"""
1124  return _IMP_kernel._test_ofile(a)
1125 
1126 def _test_ifile_overloaded(*args):
1127  r"""
1128  _test_ifile_overloaded(TextInput a, int i) -> std::string
1129  _test_ifile_overloaded(TextInput a, std::string st) -> std::string
1130  """
1131  return _IMP_kernel._test_ifile_overloaded(*args)
1132 
1133 def _test_ofile_overloaded(*args):
1134  r"""
1135  _test_ofile_overloaded(TextOutput a, int i) -> std::string
1136  _test_ofile_overloaded(TextOutput a, std::string st) -> std::string
1137  """
1138  return _IMP_kernel._test_ofile_overloaded(*args)
1139 class _TestValue(object):
1140  r"""Proxy of C++ IMP::internal::_TestValue class."""
1141 
1142  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1143 
1144  def __init__(self, i):
1145  r"""__init__(_TestValue self, int i) -> _TestValue"""
1146  _IMP_kernel._TestValue_swiginit(self, _IMP_kernel.new__TestValue(i))
1147 
1148  def show(self, *args):
1149  r"""show(_TestValue self, _ostream out=std::cout)"""
1150  return _IMP_kernel._TestValue_show(self, *args)
1151 
1152  def __cmp__(self, o):
1153  r"""__cmp__(_TestValue self, _TestValue o) -> int"""
1154  return _IMP_kernel._TestValue___cmp__(self, o)
1155 
1156  def __eq__(self, o):
1157  r"""__eq__(_TestValue self, _TestValue o) -> bool"""
1158  return _IMP_kernel._TestValue___eq__(self, o)
1159 
1160  def __ne__(self, o):
1161  r"""__ne__(_TestValue self, _TestValue o) -> bool"""
1162  return _IMP_kernel._TestValue___ne__(self, o)
1163 
1164  def __lt__(self, o):
1165  r"""__lt__(_TestValue self, _TestValue o) -> bool"""
1166  return _IMP_kernel._TestValue___lt__(self, o)
1167 
1168  def __gt__(self, o):
1169  r"""__gt__(_TestValue self, _TestValue o) -> bool"""
1170  return _IMP_kernel._TestValue___gt__(self, o)
1171 
1172  def __ge__(self, o):
1173  r"""__ge__(_TestValue self, _TestValue o) -> bool"""
1174  return _IMP_kernel._TestValue___ge__(self, o)
1175 
1176  def __le__(self, o):
1177  r"""__le__(_TestValue self, _TestValue o) -> bool"""
1178  return _IMP_kernel._TestValue___le__(self, o)
1179 
1180  def get(self):
1181  r"""get(_TestValue self) -> int"""
1182  return _IMP_kernel._TestValue_get(self)
1183 
1184  def get_float(self):
1185  r"""get_float(_TestValue self) -> float const &"""
1186  return _IMP_kernel._TestValue_get_float(self)
1187 
1188  def get_double(self):
1189  r"""get_double(_TestValue self) -> double const &"""
1190  return _IMP_kernel._TestValue_get_double(self)
1191 
1192  def get_Float(self):
1193  r"""get_Float(_TestValue self) -> IMP::Float const &"""
1194  return _IMP_kernel._TestValue_get_Float(self)
1195 
1196  def get_int(self):
1197  r"""get_int(_TestValue self) -> int const &"""
1198  return _IMP_kernel._TestValue_get_int(self)
1199 
1200  def get_Int(self):
1201  r"""get_Int(_TestValue self) -> IMP::Int const &"""
1202  return _IMP_kernel._TestValue_get_Int(self)
1203 
1204  def get_string(self):
1205  r"""get_string(_TestValue self) -> std::string const &"""
1206  return _IMP_kernel._TestValue_get_string(self)
1207 
1208  def get_String(self):
1209  r"""get_String(_TestValue self) -> IMP::String const &"""
1210  return _IMP_kernel._TestValue_get_String(self)
1211 
1212  def __str__(self):
1213  r"""__str__(_TestValue self) -> std::string"""
1214  return _IMP_kernel._TestValue___str__(self)
1215 
1216  def __repr__(self):
1217  r"""__repr__(_TestValue self) -> std::string"""
1218  return _IMP_kernel._TestValue___repr__(self)
1219  __swig_destroy__ = _IMP_kernel.delete__TestValue
1220 
1221 # Register _TestValue in _IMP_kernel:
1222 _IMP_kernel._TestValue_swigregister(_TestValue)
1223 
1224 def _pass_plain_pair(p):
1225  r"""_pass_plain_pair(IMP::FloatPair p) -> IMP::FloatPair"""
1226  return _IMP_kernel._pass_plain_pair(p)
1227 
1228 def _pass_overloaded_strings(*args):
1229  r"""
1230  _pass_overloaded_strings(IMP::Strings const & a, int arg2) -> IMP::Strings
1231  _pass_overloaded_strings(IMP::Strings const & a) -> IMP::Strings
1232  """
1233  return _IMP_kernel._pass_overloaded_strings(*args)
1234 
1235 def _pass_pair(p):
1236  r"""_pass_pair(IMP::DerivativePair const & p) -> IMP::DerivativePair"""
1237  return _IMP_kernel._pass_pair(p)
1238 
1239 def _pass_floats(input):
1240  r"""_pass_floats(IMP::Floats const & input) -> IMP::Floats"""
1241  return _IMP_kernel._pass_floats(input)
1242 
1243 def _pass_ints(input):
1244  r"""_pass_ints(IMP::Ints input) -> IMP::Ints"""
1245  return _IMP_kernel._pass_ints(input)
1246 
1247 def _pass_ints_list(input):
1248  r"""_pass_ints_list(IMP::IntsList const & input) -> IMP::IntsList"""
1249  return _IMP_kernel._pass_ints_list(input)
1250 
1251 def _pass_ints_lists(input):
1252  r"""_pass_ints_lists(IMP::IntsLists const & input) -> IMP::IntsLists"""
1253  return _IMP_kernel._pass_ints_lists(input)
1254 
1255 def _pass_strings(input):
1256  r"""_pass_strings(IMP::Strings const & input) -> IMP::Strings const &"""
1257  return _IMP_kernel._pass_strings(input)
1258 class _TestObject(Object):
1259  r"""Proxy of C++ IMP::internal::_TestObject class."""
1260 
1261  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1262 
1263  def __init__(self):
1264  r"""__init__(_TestObject self) -> _TestObject"""
1265  _IMP_kernel._TestObject_swiginit(self, _IMP_kernel.new__TestObject())
1266 
1267  def get_version_info(self):
1268  r"""get_version_info(_TestObject self) -> VersionInfo"""
1269  return _IMP_kernel._TestObject_get_version_info(self)
1270  __swig_destroy__ = _IMP_kernel.delete__TestObject
1271 
1272  def __str__(self):
1273  r"""__str__(_TestObject self) -> std::string"""
1274  return _IMP_kernel._TestObject___str__(self)
1275 
1276  def __repr__(self):
1277  r"""__repr__(_TestObject self) -> std::string"""
1278  return _IMP_kernel._TestObject___repr__(self)
1279 
1280  @staticmethod
1281  def get_from(o):
1282  return _object_cast_to__TestObject(o)
1283 
1284 
1285 # Register _TestObject in _IMP_kernel:
1286 _IMP_kernel._TestObject_swigregister(_TestObject)
1287 
1288 def get_live_object_names():
1289  r"""get_live_object_names() -> IMP::Strings"""
1290  return _IMP_kernel.get_live_object_names()
1291 
1292 def get_live_objects():
1293  r"""get_live_objects() -> IMP::Objects"""
1294  return _IMP_kernel.get_live_objects()
1295 
1296 def set_show_leaked_objects(tf):
1297  r"""set_show_leaked_objects(bool tf)"""
1298  return _IMP_kernel.set_show_leaked_objects(tf)
1299 
1300 def set_deprecation_warnings(tf):
1301  r"""set_deprecation_warnings(bool tf)"""
1302  return _IMP_kernel.set_deprecation_warnings(tf)
1303 
1305  r"""set_deprecation_exceptions(bool tf)"""
1306  return _IMP_kernel.set_deprecation_exceptions(tf)
1307 
1309  r"""get_deprecation_exceptions() -> bool"""
1310  return _IMP_kernel.get_deprecation_exceptions()
1311 
1312 def handle_use_deprecated(message):
1313  r"""handle_use_deprecated(std::string message)"""
1314  return _IMP_kernel.handle_use_deprecated(message)
1315 
1316 def get_number_of_threads():
1317  r"""get_number_of_threads() -> unsigned int"""
1318  return _IMP_kernel.get_number_of_threads()
1319 
1320 def set_number_of_threads(n):
1321  r"""set_number_of_threads(unsigned int n)"""
1322  return _IMP_kernel.set_number_of_threads(n)
1323 class SetNumberOfThreads(_RAII):
1324  r"""Proxy of C++ IMP::SetNumberOfThreads class."""
1325 
1326  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1327 
1328  def __init__(self, *args):
1329  r"""
1330  __init__(SetNumberOfThreads self) -> SetNumberOfThreads
1331  __init__(SetNumberOfThreads self, unsigned int n) -> SetNumberOfThreads
1332  """
1333  _IMP_kernel.SetNumberOfThreads_swiginit(self, _IMP_kernel.new_SetNumberOfThreads(*args))
1334 
1335  def set(self, n):
1336  r"""set(SetNumberOfThreads self, unsigned int n)"""
1337  return _IMP_kernel.SetNumberOfThreads_set(self, n)
1338 
1339  def reset(self):
1340  r"""reset(SetNumberOfThreads self)"""
1341  return _IMP_kernel.SetNumberOfThreads_reset(self)
1342  __swig_destroy__ = _IMP_kernel.delete_SetNumberOfThreads
1343 
1344  def show(self, *args):
1345  r"""show(SetNumberOfThreads self, _ostream out=std::cout)"""
1346  return _IMP_kernel.SetNumberOfThreads_show(self, *args)
1347 
1348  def __enter__(self):
1349  return self
1350  def __exit__(self, exc_type, exc_val, exc_tb):
1351  self.reset()
1352  return False
1353 
1354 
1355  def __str__(self):
1356  r"""__str__(SetNumberOfThreads self) -> std::string"""
1357  return _IMP_kernel.SetNumberOfThreads___str__(self)
1358 
1359  def __repr__(self):
1360  r"""__repr__(SetNumberOfThreads self) -> std::string"""
1361  return _IMP_kernel.SetNumberOfThreads___repr__(self)
1362 
1363 # Register SetNumberOfThreads in _IMP_kernel:
1364 _IMP_kernel.SetNumberOfThreads_swigregister(SetNumberOfThreads)
1365 
1366 import os
1367 i_m_p="IMP_MODULE_PATH"
1368 if i_m_p in os.environ.keys():
1369  __path__.insert(0, os.environ[i_m_p])
1370 
1371 def _forward_add_attribute(self, name, value, opt=None):
1372  if opt is not None:
1373  self.get_particle().add_attribute(name, value, opt)
1374  else:
1375  self.get_particle().add_attribute(name, value)
1376 def _forward_get_value(self, name):
1377  self.get_particle().get_value(name)
1378 def _forward_set_value(self, name, value):
1379  self.get_particle().set_value(name, value)
1380 
1381 
1382 build="release"
1383 
1384 
1385 _object_types.append("Constraint")
1386 
1387 
1388 def _object_cast_to_Constraint(o):
1389  r"""_object_cast_to_Constraint(Object o) -> Constraint"""
1390  return _IMP_kernel._object_cast_to_Constraint(o)
1391 
1392 _object_types.append("Undecorator")
1393 
1394 
1395 def _object_cast_to_Undecorator(o):
1396  r"""_object_cast_to_Undecorator(Object o) -> Undecorator"""
1397  return _IMP_kernel._object_cast_to_Undecorator(o)
1398 
1399 _object_types.append("Container")
1400 
1401 
1402 def _object_cast_to_Container(o):
1403  r"""_object_cast_to_Container(Object o) -> Container"""
1404  return _IMP_kernel._object_cast_to_Container(o)
1405 
1406 _object_types.append("Optimizer")
1407 
1408 
1409 def _object_cast_to_Optimizer(o):
1410  r"""_object_cast_to_Optimizer(Object o) -> Optimizer"""
1411  return _IMP_kernel._object_cast_to_Optimizer(o)
1412 
1413 _object_types.append("AttributeOptimizer")
1414 
1415 
1416 def _object_cast_to_AttributeOptimizer(o):
1417  r"""_object_cast_to_AttributeOptimizer(Object o) -> AttributeOptimizer"""
1418  return _IMP_kernel._object_cast_to_AttributeOptimizer(o)
1419 
1420 _object_types.append("OptimizerState")
1421 
1422 
1423 def _object_cast_to_OptimizerState(o):
1424  r"""_object_cast_to_OptimizerState(Object o) -> OptimizerState"""
1425  return _IMP_kernel._object_cast_to_OptimizerState(o)
1426 
1427 _object_types.append("PairContainer")
1428 
1429 
1430 def _object_cast_to_PairContainer(o):
1431  r"""_object_cast_to_PairContainer(Object o) -> PairContainer"""
1432  return _IMP_kernel._object_cast_to_PairContainer(o)
1433 
1434 _object_types.append("PairModifier")
1435 
1436 
1437 def _object_cast_to_PairModifier(o):
1438  r"""_object_cast_to_PairModifier(Object o) -> PairModifier"""
1439  return _IMP_kernel._object_cast_to_PairModifier(o)
1440 
1441 _object_types.append("PairScore")
1442 
1443 
1444 def _object_cast_to_PairScore(o):
1445  r"""_object_cast_to_PairScore(Object o) -> PairScore"""
1446  return _IMP_kernel._object_cast_to_PairScore(o)
1447 
1448 _object_types.append("QuadContainer")
1449 
1450 
1451 def _object_cast_to_QuadContainer(o):
1452  r"""_object_cast_to_QuadContainer(Object o) -> QuadContainer"""
1453  return _IMP_kernel._object_cast_to_QuadContainer(o)
1454 
1455 _object_types.append("QuadModifier")
1456 
1457 
1458 def _object_cast_to_QuadModifier(o):
1459  r"""_object_cast_to_QuadModifier(Object o) -> QuadModifier"""
1460  return _IMP_kernel._object_cast_to_QuadModifier(o)
1461 
1462 _object_types.append("QuadScore")
1463 
1464 
1465 def _object_cast_to_QuadScore(o):
1466  r"""_object_cast_to_QuadScore(Object o) -> QuadScore"""
1467  return _IMP_kernel._object_cast_to_QuadScore(o)
1468 
1469 _object_types.append("Refiner")
1470 
1471 
1472 def _object_cast_to_Refiner(o):
1473  r"""_object_cast_to_Refiner(Object o) -> Refiner"""
1474  return _IMP_kernel._object_cast_to_Refiner(o)
1475 
1476 _object_types.append("Restraint")
1477 
1478 
1479 def _object_cast_to_Restraint(o):
1480  r"""_object_cast_to_Restraint(Object o) -> Restraint"""
1481  return _IMP_kernel._object_cast_to_Restraint(o)
1482 
1483 _object_types.append("Sampler")
1484 
1485 
1486 def _object_cast_to_Sampler(o):
1487  r"""_object_cast_to_Sampler(Object o) -> Sampler"""
1488  return _IMP_kernel._object_cast_to_Sampler(o)
1489 
1490 _object_types.append("ScoreState")
1491 
1492 
1493 def _object_cast_to_ScoreState(o):
1494  r"""_object_cast_to_ScoreState(Object o) -> ScoreState"""
1495  return _IMP_kernel._object_cast_to_ScoreState(o)
1496 
1497 _object_types.append("SingletonContainer")
1498 
1499 
1500 def _object_cast_to_SingletonContainer(o):
1501  r"""_object_cast_to_SingletonContainer(Object o) -> SingletonContainer"""
1502  return _IMP_kernel._object_cast_to_SingletonContainer(o)
1503 
1504 _object_types.append("SingletonModifier")
1505 
1506 
1507 def _object_cast_to_SingletonModifier(o):
1508  r"""_object_cast_to_SingletonModifier(Object o) -> SingletonModifier"""
1509  return _IMP_kernel._object_cast_to_SingletonModifier(o)
1510 
1511 _object_types.append("SingletonScore")
1512 
1513 
1514 def _object_cast_to_SingletonScore(o):
1515  r"""_object_cast_to_SingletonScore(Object o) -> SingletonScore"""
1516  return _IMP_kernel._object_cast_to_SingletonScore(o)
1517 
1518 _object_types.append("TripletContainer")
1519 
1520 
1521 def _object_cast_to_TripletContainer(o):
1522  r"""_object_cast_to_TripletContainer(Object o) -> TripletContainer"""
1523  return _IMP_kernel._object_cast_to_TripletContainer(o)
1524 
1525 _object_types.append("TripletModifier")
1526 
1527 
1528 def _object_cast_to_TripletModifier(o):
1529  r"""_object_cast_to_TripletModifier(Object o) -> TripletModifier"""
1530  return _IMP_kernel._object_cast_to_TripletModifier(o)
1531 
1532 _object_types.append("TripletScore")
1533 
1534 
1535 def _object_cast_to_TripletScore(o):
1536  r"""_object_cast_to_TripletScore(Object o) -> TripletScore"""
1537  return _IMP_kernel._object_cast_to_TripletScore(o)
1538 
1539 _object_types.append("UnaryFunction")
1540 
1541 
1542 def _object_cast_to_UnaryFunction(o):
1543  r"""_object_cast_to_UnaryFunction(Object o) -> UnaryFunction"""
1544  return _IMP_kernel._object_cast_to_UnaryFunction(o)
1545 
1546 _object_types.append("RestraintInfo")
1547 
1548 
1549 def _object_cast_to_RestraintInfo(o):
1550  r"""_object_cast_to_RestraintInfo(Object o) -> RestraintInfo"""
1551  return _IMP_kernel._object_cast_to_RestraintInfo(o)
1552 
1553 _object_types.append("ConfigurationSet")
1554 
1555 
1556 def _object_cast_to_ConfigurationSet(o):
1557  r"""_object_cast_to_ConfigurationSet(Object o) -> ConfigurationSet"""
1558  return _IMP_kernel._object_cast_to_ConfigurationSet(o)
1559 
1560 _object_types.append("Configuration")
1561 
1562 
1563 def _object_cast_to_Configuration(o):
1564  r"""_object_cast_to_Configuration(Object o) -> Configuration"""
1565  return _IMP_kernel._object_cast_to_Configuration(o)
1566 
1567 _object_types.append("Model")
1568 
1569 
1570 def _object_cast_to_Model(o):
1571  r"""_object_cast_to_Model(Object o) -> Model"""
1572  return _IMP_kernel._object_cast_to_Model(o)
1573 
1574 _object_types.append("Particle")
1575 
1576 
1577 def _object_cast_to_Particle(o):
1578  r"""_object_cast_to_Particle(Object o) -> Particle"""
1579  return _IMP_kernel._object_cast_to_Particle(o)
1580 
1581 _object_types.append("RestraintSet")
1582 
1583 
1584 def _object_cast_to_RestraintSet(o):
1585  r"""_object_cast_to_RestraintSet(Object o) -> RestraintSet"""
1586  return _IMP_kernel._object_cast_to_RestraintSet(o)
1587 
1588 ParticlePairsTemp=list
1589 _plural_types.append("ParticlePairsTemp")
1590 _value_types.append("ParticlePair")
1591 
1592 
1593 ParticleTripletsTemp=list
1594 _plural_types.append("ParticleTripletsTemp")
1595 _value_types.append("ParticleTriplet")
1596 
1597 
1598 ParticleQuadsTemp=list
1599 _plural_types.append("ParticleQuadsTemp")
1600 _value_types.append("ParticleQuad")
1601 
1602 
1603 ParticleIndexPairs=list
1604 _plural_types.append("ParticleIndexPairs")
1605 _value_types.append("ParticleIndexPair")
1606 
1607 
1608 ParticleIndexTriplets=list
1609 _plural_types.append("ParticleIndexTriplets")
1610 _value_types.append("ParticleIndexTriplet")
1611 
1612 
1613 ParticleIndexQuads=list
1614 _plural_types.append("ParticleIndexQuads")
1615 _value_types.append("ParticleIndexQuad")
1616 
1617 
1618 _object_types.append("SingletonPredicate")
1619 
1620 
1621 def _object_cast_to_SingletonPredicate(o):
1622  r"""_object_cast_to_SingletonPredicate(Object o) -> SingletonPredicate"""
1623  return _IMP_kernel._object_cast_to_SingletonPredicate(o)
1624 
1625 _object_types.append("PairPredicate")
1626 
1627 
1628 def _object_cast_to_PairPredicate(o):
1629  r"""_object_cast_to_PairPredicate(Object o) -> PairPredicate"""
1630  return _IMP_kernel._object_cast_to_PairPredicate(o)
1631 
1632 _object_types.append("TripletPredicate")
1633 
1634 
1635 def _object_cast_to_TripletPredicate(o):
1636  r"""_object_cast_to_TripletPredicate(Object o) -> TripletPredicate"""
1637  return _IMP_kernel._object_cast_to_TripletPredicate(o)
1638 
1639 _object_types.append("QuadPredicate")
1640 
1641 
1642 def _object_cast_to_QuadPredicate(o):
1643  r"""_object_cast_to_QuadPredicate(Object o) -> QuadPredicate"""
1644  return _IMP_kernel._object_cast_to_QuadPredicate(o)
1645 
1646 _object_types.append("SaveToConfigurationSetOptimizerState")
1647 
1648 
1649 def _object_cast_to_SaveToConfigurationSetOptimizerState(o):
1650  r"""_object_cast_to_SaveToConfigurationSetOptimizerState(Object o) -> SaveToConfigurationSetOptimizerState"""
1651  return _IMP_kernel._object_cast_to_SaveToConfigurationSetOptimizerState(o)
1652 
1653 EvaluationStates=list
1654 _plural_types.append("EvaluationStates")
1655 _value_types.append("EvaluationState")
1656 
1657 
1658 ScoreAccumulators=list
1659 _plural_types.append("ScoreAccumulators")
1660 _value_types.append("ScoreAccumulator")
1661 
1662 
1663 ParticleIndexes=list
1664 _plural_types.append("ParticleIndexes")
1665 _value_types.append("ParticleIndex")
1666 
1667 
1668 FloatIndexes=list
1669 _plural_types.append("FloatIndexes")
1670 _value_types.append("FloatIndex")
1671 
1672 
1673 FloatKeys=list
1674 _plural_types.append("FloatKeys")
1675 _value_types.append("FloatKey")
1676 
1677 
1678 FloatsKeys=list
1679 _plural_types.append("FloatsKeys")
1680 _value_types.append("FloatsKey")
1681 
1682 
1683 IntKeys=list
1684 _plural_types.append("IntKeys")
1685 _value_types.append("IntKey")
1686 
1687 
1688 IntsKeys=list
1689 _plural_types.append("IntsKeys")
1690 _value_types.append("IntsKey")
1691 
1692 
1693 StringKeys=list
1694 _plural_types.append("StringKeys")
1695 _value_types.append("StringKey")
1696 
1697 
1698 ParticleIndexKeys=list
1699 _plural_types.append("ParticleIndexKeys")
1700 _value_types.append("ParticleIndexKey")
1701 
1702 
1703 ParticleIndexesKeys=list
1704 _plural_types.append("ParticleIndexesKeys")
1705 _value_types.append("ParticleIndexesKey")
1706 
1707 
1708 ObjectKeys=list
1709 _plural_types.append("ObjectKeys")
1710 _value_types.append("ObjectKey")
1711 
1712 
1713 ModelKeys=list
1714 _plural_types.append("ModelKeys")
1715 _value_types.append("ModelKey")
1716 
1717 
1718 TriggerKeys=list
1719 _plural_types.append("TriggerKeys")
1720 _value_types.append("TriggerKey")
1721 
1722 
1723 SparseFloatKeys=list
1724 _plural_types.append("SparseFloatKeys")
1725 _value_types.append("SparseFloatKey")
1726 
1727 
1728 SparseIntKeys=list
1729 _plural_types.append("SparseIntKeys")
1730 _value_types.append("SparseIntKey")
1731 
1732 
1733 SparseStringKeys=list
1734 _plural_types.append("SparseStringKeys")
1735 _value_types.append("SparseStringKey")
1736 
1737 
1738 SparseParticleIndexKeys=list
1739 _plural_types.append("SparseParticleIndexKeys")
1740 _value_types.append("SparseParticleIndexKey")
1741 
1742 
1743 Vector3DKeys=list
1744 _plural_types.append("Vector3DKeys")
1745 _value_types.append("Vector3DKey")
1746 
1747 
1748 _raii_types.append("ScopedSetFloatAttribute")
1749 
1750 
1751 _object_types.append("ScoringFunction")
1752 
1753 
1754 def _object_cast_to_ScoringFunction(o):
1755  r"""_object_cast_to_ScoringFunction(Object o) -> ScoringFunction"""
1756  return _IMP_kernel._object_cast_to_ScoringFunction(o)
1757 
1758 _object_types.append("ModelObject")
1759 
1760 
1761 def _object_cast_to_ModelObject(o):
1762  r"""_object_cast_to_ModelObject(Object o) -> ModelObject"""
1763  return _IMP_kernel._object_cast_to_ModelObject(o)
1764 
1765 _object_types.append("_RestraintsScoringFunction")
1766 
1767 
1768 def _object_cast_to__RestraintsScoringFunction(o):
1769  r"""_object_cast_to__RestraintsScoringFunction(Object o) -> _RestraintsScoringFunction"""
1770  return _IMP_kernel._object_cast_to__RestraintsScoringFunction(o)
1771 
1772 def _TrivialDecorators(l=[]):
1773  return [_TrivialDecorator(x) for x in l]
1774 _plural_types.append("_TrivialDecorators")
1775 
1776 
1777 _value_types.append("_TrivialDecorator")
1778 
1779 
1780 def _TrivialDerivedDecorators(l=[]):
1781  return [_TrivialDerivedDecorator(x) for x in l]
1782 _plural_types.append("_TrivialDerivedDecorators")
1783 
1784 
1785 _value_types.append("_TrivialDerivedDecorator")
1786 
1787 
1788 def _TrivialTraitsDecorators(l=[]):
1789  return [_TrivialTraitsDecorator(x) for x in l]
1790 _plural_types.append("_TrivialTraitsDecorators")
1791 
1792 
1793 _value_types.append("_TrivialTraitsDecorator")
1794 
1795 
1796 _object_types.append("_ConstRestraint")
1797 
1798 
1799 def _object_cast_to__ConstRestraint(o):
1800  r"""_object_cast_to__ConstRestraint(Object o) -> _ConstRestraint"""
1801  return _IMP_kernel._object_cast_to__ConstRestraint(o)
1802 
1803 _object_types.append("_ConstOptimizer")
1804 
1805 
1806 def _object_cast_to__ConstOptimizer(o):
1807  r"""_object_cast_to__ConstOptimizer(Object o) -> _ConstOptimizer"""
1808  return _IMP_kernel._object_cast_to__ConstOptimizer(o)
1809 
1810 _object_types.append("_ConstSingletonScore")
1811 
1812 
1813 def _object_cast_to__ConstSingletonScore(o):
1814  r"""_object_cast_to__ConstSingletonScore(Object o) -> _ConstSingletonScore"""
1815  return _IMP_kernel._object_cast_to__ConstSingletonScore(o)
1816 
1817 _object_types.append("_ConstPairScore")
1818 
1819 
1820 def _object_cast_to__ConstPairScore(o):
1821  r"""_object_cast_to__ConstPairScore(Object o) -> _ConstPairScore"""
1822  return _IMP_kernel._object_cast_to__ConstPairScore(o)
1823 class DependencyGraph(Object):
1824  r"""Proxy of C++ IMP::internal::BoostDigraph< IMP::DependencyGraph,IMP::ModelObject *,IMP::ShowDependencyGraphVertex > class."""
1825 
1826  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1827  __repr__ = _swig_repr
1828 
1829  def __init__(self):
1830  r"""__init__(DependencyGraph self) -> DependencyGraph"""
1831  _IMP_kernel.DependencyGraph_swiginit(self, _IMP_kernel.new_DependencyGraph())
1832 
1833  def get_graph(self):
1834  r"""get_graph(DependencyGraph self) -> IMP::DependencyGraph const &"""
1835  return _IMP_kernel.DependencyGraph_get_graph(self)
1836 
1837  def get_vertices(self):
1838  r"""get_vertices(DependencyGraph self) -> IMP::internal::BoostDigraph< IMP::DependencyGraph,IMP::ModelObject *,IMP::ShowDependencyGraphVertex >::VertexDescriptors"""
1839  return _IMP_kernel.DependencyGraph_get_vertices(self)
1840 
1841  def get_vertex_name(self, i):
1842  r"""get_vertex_name(DependencyGraph self, IMP::internal::BoostDigraph< IMP::DependencyGraph,IMP::ModelObject *,IMP::ShowDependencyGraphVertex >::VertexDescriptor i) -> ModelObject"""
1843  return _IMP_kernel.DependencyGraph_get_vertex_name(self, i)
1844 
1845  def get_in_neighbors(self, v):
1846  r"""get_in_neighbors(DependencyGraph self, IMP::internal::BoostDigraph< IMP::DependencyGraph,IMP::ModelObject *,IMP::ShowDependencyGraphVertex >::VertexDescriptor v) -> IMP::internal::BoostDigraph< IMP::DependencyGraph,IMP::ModelObject *,IMP::ShowDependencyGraphVertex >::VertexDescriptors"""
1847  return _IMP_kernel.DependencyGraph_get_in_neighbors(self, v)
1848 
1849  def get_out_neighbors(self, v):
1850  r"""get_out_neighbors(DependencyGraph self, IMP::internal::BoostDigraph< IMP::DependencyGraph,IMP::ModelObject *,IMP::ShowDependencyGraphVertex >::VertexDescriptor v) -> IMP::internal::BoostDigraph< IMP::DependencyGraph,IMP::ModelObject *,IMP::ShowDependencyGraphVertex >::VertexDescriptors"""
1851  return _IMP_kernel.DependencyGraph_get_out_neighbors(self, v)
1852 
1853  def show_graphviz(self, *args):
1854  r"""show_graphviz(DependencyGraph self, _ostream out=std::cout)"""
1855  return _IMP_kernel.DependencyGraph_show_graphviz(self, *args)
1856 
1857  def get_graphviz_string(self):
1858  r"""get_graphviz_string(DependencyGraph self) -> std::string"""
1859  return _IMP_kernel.DependencyGraph_get_graphviz_string(self)
1860 
1861  def add_edge(self, v0, v1):
1862  r"""add_edge(DependencyGraph self, IMP::internal::BoostDigraph< IMP::DependencyGraph,IMP::ModelObject *,IMP::ShowDependencyGraphVertex >::VertexDescriptor v0, IMP::internal::BoostDigraph< IMP::DependencyGraph,IMP::ModelObject *,IMP::ShowDependencyGraphVertex >::VertexDescriptor v1)"""
1863  return _IMP_kernel.DependencyGraph_add_edge(self, v0, v1)
1864 
1865  def add_vertex(self, l):
1866  r"""add_vertex(DependencyGraph self, ModelObject l) -> IMP::internal::BoostDigraph< IMP::DependencyGraph,IMP::ModelObject *,IMP::ShowDependencyGraphVertex >::VertexDescriptor"""
1867  return _IMP_kernel.DependencyGraph_add_vertex(self, l)
1868 
1869  def remove_vertex(self, l):
1870  r"""remove_vertex(DependencyGraph self, IMP::internal::BoostDigraph< IMP::DependencyGraph,IMP::ModelObject *,IMP::ShowDependencyGraphVertex >::VertexDescriptor l)"""
1871  return _IMP_kernel.DependencyGraph_remove_vertex(self, l)
1872  __swig_destroy__ = _IMP_kernel.delete_DependencyGraph
1873 
1874 # Register DependencyGraph in _IMP_kernel:
1875 _IMP_kernel.DependencyGraph_swigregister(DependencyGraph)
1876 
1877 _value_types.append("DependencyGraph")
1878 
1879 class FloatKey(_Value):
1880  r"""Proxy of C++ IMP::Key< 0 > class."""
1881 
1882  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1883 
1884  def __init__(self, *args):
1885  r"""
1886  __init__(FloatKey self) -> FloatKey
1887  __init__(FloatKey self, std::string const & c, bool is_implicit_add_permitted=True) -> FloatKey
1888  __init__(FloatKey self, unsigned int i) -> FloatKey
1889  """
1890  _IMP_kernel.FloatKey_swiginit(self, _IMP_kernel.new_FloatKey(*args))
1891 
1892  @staticmethod
1893  def add_key(sc):
1894  r"""add_key(std::string sc) -> unsigned int"""
1895  return _IMP_kernel.FloatKey_add_key(sc)
1896 
1897  @staticmethod
1898  def get_key_exists(sc):
1899  r"""get_key_exists(std::string sc) -> bool"""
1900  return _IMP_kernel.FloatKey_get_key_exists(sc)
1901 
1902  def get_string(self):
1903  r"""get_string(FloatKey self) -> std::string const"""
1904  return _IMP_kernel.FloatKey_get_string(self)
1905 
1906  def __cmp__(self, o):
1907  r"""__cmp__(FloatKey self, FloatKey o) -> int"""
1908  return _IMP_kernel.FloatKey___cmp__(self, o)
1909 
1910  def __eq__(self, o):
1911  r"""__eq__(FloatKey self, FloatKey o) -> bool"""
1912  return _IMP_kernel.FloatKey___eq__(self, o)
1913 
1914  def __ne__(self, o):
1915  r"""__ne__(FloatKey self, FloatKey o) -> bool"""
1916  return _IMP_kernel.FloatKey___ne__(self, o)
1917 
1918  def __lt__(self, o):
1919  r"""__lt__(FloatKey self, FloatKey o) -> bool"""
1920  return _IMP_kernel.FloatKey___lt__(self, o)
1921 
1922  def __gt__(self, o):
1923  r"""__gt__(FloatKey self, FloatKey o) -> bool"""
1924  return _IMP_kernel.FloatKey___gt__(self, o)
1925 
1926  def __ge__(self, o):
1927  r"""__ge__(FloatKey self, FloatKey o) -> bool"""
1928  return _IMP_kernel.FloatKey___ge__(self, o)
1929 
1930  def __le__(self, o):
1931  r"""__le__(FloatKey self, FloatKey o) -> bool"""
1932  return _IMP_kernel.FloatKey___le__(self, o)
1933 
1934  def __hash__(self):
1935  r"""__hash__(FloatKey self) -> std::size_t"""
1936  return _IMP_kernel.FloatKey___hash__(self)
1937 
1938  def show(self, *args):
1939  r"""show(FloatKey self, _ostream out=std::cout)"""
1940  return _IMP_kernel.FloatKey_show(self, *args)
1941 
1942  @staticmethod
1943  def add_alias(old_key, new_name):
1944  r"""add_alias(FloatKey old_key, std::string new_name) -> FloatKey"""
1945  return _IMP_kernel.FloatKey_add_alias(old_key, new_name)
1946 
1947  @staticmethod
1948  def get_number_of_keys():
1949  r"""get_number_of_keys() -> unsigned int"""
1950  return _IMP_kernel.FloatKey_get_number_of_keys()
1951 
1952  def get_index(self):
1953  r"""get_index(FloatKey self) -> unsigned int"""
1954  return _IMP_kernel.FloatKey_get_index(self)
1955 
1956  @staticmethod
1957  def show_all(out):
1958  r"""show_all(_ostream out)"""
1959  return _IMP_kernel.FloatKey_show_all(out)
1960 
1961  @staticmethod
1962  def get_all_strings():
1963  r"""get_all_strings() -> IMP::Vector< std::string >"""
1964  return _IMP_kernel.FloatKey_get_all_strings()
1965 
1966  @staticmethod
1967  def get_number_unique():
1968  r"""get_number_unique() -> unsigned int"""
1969  return _IMP_kernel.FloatKey_get_number_unique()
1970 
1971  def __str__(self):
1972  r"""__str__(FloatKey self) -> std::string"""
1973  return _IMP_kernel.FloatKey___str__(self)
1974 
1975  def __repr__(self):
1976  r"""__repr__(FloatKey self) -> std::string"""
1977  return _IMP_kernel.FloatKey___repr__(self)
1978  __swig_destroy__ = _IMP_kernel.delete_FloatKey
1979 
1980 # Register FloatKey in _IMP_kernel:
1981 _IMP_kernel.FloatKey_swigregister(FloatKey)
1982 class IntKey(_Value):
1983  r"""Proxy of C++ IMP::Key< 1 > class."""
1984 
1985  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1986 
1987  def __init__(self, *args):
1988  r"""
1989  __init__(IntKey self) -> IntKey
1990  __init__(IntKey self, std::string const & c, bool is_implicit_add_permitted=True) -> IntKey
1991  __init__(IntKey self, unsigned int i) -> IntKey
1992  """
1993  _IMP_kernel.IntKey_swiginit(self, _IMP_kernel.new_IntKey(*args))
1994 
1995  @staticmethod
1996  def add_key(sc):
1997  r"""add_key(std::string sc) -> unsigned int"""
1998  return _IMP_kernel.IntKey_add_key(sc)
1999 
2000  @staticmethod
2001  def get_key_exists(sc):
2002  r"""get_key_exists(std::string sc) -> bool"""
2003  return _IMP_kernel.IntKey_get_key_exists(sc)
2004 
2005  def get_string(self):
2006  r"""get_string(IntKey self) -> std::string const"""
2007  return _IMP_kernel.IntKey_get_string(self)
2008 
2009  def __cmp__(self, o):
2010  r"""__cmp__(IntKey self, IntKey o) -> int"""
2011  return _IMP_kernel.IntKey___cmp__(self, o)
2012 
2013  def __eq__(self, o):
2014  r"""__eq__(IntKey self, IntKey o) -> bool"""
2015  return _IMP_kernel.IntKey___eq__(self, o)
2016 
2017  def __ne__(self, o):
2018  r"""__ne__(IntKey self, IntKey o) -> bool"""
2019  return _IMP_kernel.IntKey___ne__(self, o)
2020 
2021  def __lt__(self, o):
2022  r"""__lt__(IntKey self, IntKey o) -> bool"""
2023  return _IMP_kernel.IntKey___lt__(self, o)
2024 
2025  def __gt__(self, o):
2026  r"""__gt__(IntKey self, IntKey o) -> bool"""
2027  return _IMP_kernel.IntKey___gt__(self, o)
2028 
2029  def __ge__(self, o):
2030  r"""__ge__(IntKey self, IntKey o) -> bool"""
2031  return _IMP_kernel.IntKey___ge__(self, o)
2032 
2033  def __le__(self, o):
2034  r"""__le__(IntKey self, IntKey o) -> bool"""
2035  return _IMP_kernel.IntKey___le__(self, o)
2036 
2037  def __hash__(self):
2038  r"""__hash__(IntKey self) -> std::size_t"""
2039  return _IMP_kernel.IntKey___hash__(self)
2040 
2041  def show(self, *args):
2042  r"""show(IntKey self, _ostream out=std::cout)"""
2043  return _IMP_kernel.IntKey_show(self, *args)
2044 
2045  @staticmethod
2046  def add_alias(old_key, new_name):
2047  r"""add_alias(IntKey old_key, std::string new_name) -> IntKey"""
2048  return _IMP_kernel.IntKey_add_alias(old_key, new_name)
2049 
2050  @staticmethod
2051  def get_number_of_keys():
2052  r"""get_number_of_keys() -> unsigned int"""
2053  return _IMP_kernel.IntKey_get_number_of_keys()
2054 
2055  def get_index(self):
2056  r"""get_index(IntKey self) -> unsigned int"""
2057  return _IMP_kernel.IntKey_get_index(self)
2058 
2059  @staticmethod
2060  def show_all(out):
2061  r"""show_all(_ostream out)"""
2062  return _IMP_kernel.IntKey_show_all(out)
2063 
2064  @staticmethod
2065  def get_all_strings():
2066  r"""get_all_strings() -> IMP::Vector< std::string >"""
2067  return _IMP_kernel.IntKey_get_all_strings()
2068 
2069  @staticmethod
2070  def get_number_unique():
2071  r"""get_number_unique() -> unsigned int"""
2072  return _IMP_kernel.IntKey_get_number_unique()
2073 
2074  def __str__(self):
2075  r"""__str__(IntKey self) -> std::string"""
2076  return _IMP_kernel.IntKey___str__(self)
2077 
2078  def __repr__(self):
2079  r"""__repr__(IntKey self) -> std::string"""
2080  return _IMP_kernel.IntKey___repr__(self)
2081  __swig_destroy__ = _IMP_kernel.delete_IntKey
2082 
2083 # Register IntKey in _IMP_kernel:
2084 _IMP_kernel.IntKey_swigregister(IntKey)
2085 class StringKey(_Value):
2086  r"""Proxy of C++ IMP::Key< 2 > class."""
2087 
2088  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2089 
2090  def __init__(self, *args):
2091  r"""
2092  __init__(StringKey self) -> StringKey
2093  __init__(StringKey self, std::string const & c, bool is_implicit_add_permitted=True) -> StringKey
2094  __init__(StringKey self, unsigned int i) -> StringKey
2095  """
2096  _IMP_kernel.StringKey_swiginit(self, _IMP_kernel.new_StringKey(*args))
2097 
2098  @staticmethod
2099  def add_key(sc):
2100  r"""add_key(std::string sc) -> unsigned int"""
2101  return _IMP_kernel.StringKey_add_key(sc)
2102 
2103  @staticmethod
2104  def get_key_exists(sc):
2105  r"""get_key_exists(std::string sc) -> bool"""
2106  return _IMP_kernel.StringKey_get_key_exists(sc)
2107 
2108  def get_string(self):
2109  r"""get_string(StringKey self) -> std::string const"""
2110  return _IMP_kernel.StringKey_get_string(self)
2111 
2112  def __cmp__(self, o):
2113  r"""__cmp__(StringKey self, StringKey o) -> int"""
2114  return _IMP_kernel.StringKey___cmp__(self, o)
2115 
2116  def __eq__(self, o):
2117  r"""__eq__(StringKey self, StringKey o) -> bool"""
2118  return _IMP_kernel.StringKey___eq__(self, o)
2119 
2120  def __ne__(self, o):
2121  r"""__ne__(StringKey self, StringKey o) -> bool"""
2122  return _IMP_kernel.StringKey___ne__(self, o)
2123 
2124  def __lt__(self, o):
2125  r"""__lt__(StringKey self, StringKey o) -> bool"""
2126  return _IMP_kernel.StringKey___lt__(self, o)
2127 
2128  def __gt__(self, o):
2129  r"""__gt__(StringKey self, StringKey o) -> bool"""
2130  return _IMP_kernel.StringKey___gt__(self, o)
2131 
2132  def __ge__(self, o):
2133  r"""__ge__(StringKey self, StringKey o) -> bool"""
2134  return _IMP_kernel.StringKey___ge__(self, o)
2135 
2136  def __le__(self, o):
2137  r"""__le__(StringKey self, StringKey o) -> bool"""
2138  return _IMP_kernel.StringKey___le__(self, o)
2139 
2140  def __hash__(self):
2141  r"""__hash__(StringKey self) -> std::size_t"""
2142  return _IMP_kernel.StringKey___hash__(self)
2143 
2144  def show(self, *args):
2145  r"""show(StringKey self, _ostream out=std::cout)"""
2146  return _IMP_kernel.StringKey_show(self, *args)
2147 
2148  @staticmethod
2149  def add_alias(old_key, new_name):
2150  r"""add_alias(StringKey old_key, std::string new_name) -> StringKey"""
2151  return _IMP_kernel.StringKey_add_alias(old_key, new_name)
2152 
2153  @staticmethod
2154  def get_number_of_keys():
2155  r"""get_number_of_keys() -> unsigned int"""
2156  return _IMP_kernel.StringKey_get_number_of_keys()
2157 
2158  def get_index(self):
2159  r"""get_index(StringKey self) -> unsigned int"""
2160  return _IMP_kernel.StringKey_get_index(self)
2161 
2162  @staticmethod
2163  def show_all(out):
2164  r"""show_all(_ostream out)"""
2165  return _IMP_kernel.StringKey_show_all(out)
2166 
2167  @staticmethod
2168  def get_all_strings():
2169  r"""get_all_strings() -> IMP::Vector< std::string >"""
2170  return _IMP_kernel.StringKey_get_all_strings()
2171 
2172  @staticmethod
2173  def get_number_unique():
2174  r"""get_number_unique() -> unsigned int"""
2175  return _IMP_kernel.StringKey_get_number_unique()
2176 
2177  def __str__(self):
2178  r"""__str__(StringKey self) -> std::string"""
2179  return _IMP_kernel.StringKey___str__(self)
2180 
2181  def __repr__(self):
2182  r"""__repr__(StringKey self) -> std::string"""
2183  return _IMP_kernel.StringKey___repr__(self)
2184  __swig_destroy__ = _IMP_kernel.delete_StringKey
2185 
2186 # Register StringKey in _IMP_kernel:
2187 _IMP_kernel.StringKey_swigregister(StringKey)
2188 class ParticleIndexKey(_Value):
2189  r"""Proxy of C++ IMP::Key< 3 > class."""
2190 
2191  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2192 
2193  def __init__(self, *args):
2194  r"""
2195  __init__(ParticleIndexKey self) -> ParticleIndexKey
2196  __init__(ParticleIndexKey self, std::string const & c, bool is_implicit_add_permitted=True) -> ParticleIndexKey
2197  __init__(ParticleIndexKey self, unsigned int i) -> ParticleIndexKey
2198  """
2199  _IMP_kernel.ParticleIndexKey_swiginit(self, _IMP_kernel.new_ParticleIndexKey(*args))
2200 
2201  @staticmethod
2202  def add_key(sc):
2203  r"""add_key(std::string sc) -> unsigned int"""
2204  return _IMP_kernel.ParticleIndexKey_add_key(sc)
2205 
2206  @staticmethod
2207  def get_key_exists(sc):
2208  r"""get_key_exists(std::string sc) -> bool"""
2209  return _IMP_kernel.ParticleIndexKey_get_key_exists(sc)
2210 
2211  def get_string(self):
2212  r"""get_string(ParticleIndexKey self) -> std::string const"""
2213  return _IMP_kernel.ParticleIndexKey_get_string(self)
2214 
2215  def __cmp__(self, o):
2216  r"""__cmp__(ParticleIndexKey self, ParticleIndexKey o) -> int"""
2217  return _IMP_kernel.ParticleIndexKey___cmp__(self, o)
2218 
2219  def __eq__(self, o):
2220  r"""__eq__(ParticleIndexKey self, ParticleIndexKey o) -> bool"""
2221  return _IMP_kernel.ParticleIndexKey___eq__(self, o)
2222 
2223  def __ne__(self, o):
2224  r"""__ne__(ParticleIndexKey self, ParticleIndexKey o) -> bool"""
2225  return _IMP_kernel.ParticleIndexKey___ne__(self, o)
2226 
2227  def __lt__(self, o):
2228  r"""__lt__(ParticleIndexKey self, ParticleIndexKey o) -> bool"""
2229  return _IMP_kernel.ParticleIndexKey___lt__(self, o)
2230 
2231  def __gt__(self, o):
2232  r"""__gt__(ParticleIndexKey self, ParticleIndexKey o) -> bool"""
2233  return _IMP_kernel.ParticleIndexKey___gt__(self, o)
2234 
2235  def __ge__(self, o):
2236  r"""__ge__(ParticleIndexKey self, ParticleIndexKey o) -> bool"""
2237  return _IMP_kernel.ParticleIndexKey___ge__(self, o)
2238 
2239  def __le__(self, o):
2240  r"""__le__(ParticleIndexKey self, ParticleIndexKey o) -> bool"""
2241  return _IMP_kernel.ParticleIndexKey___le__(self, o)
2242 
2243  def __hash__(self):
2244  r"""__hash__(ParticleIndexKey self) -> std::size_t"""
2245  return _IMP_kernel.ParticleIndexKey___hash__(self)
2246 
2247  def show(self, *args):
2248  r"""show(ParticleIndexKey self, _ostream out=std::cout)"""
2249  return _IMP_kernel.ParticleIndexKey_show(self, *args)
2250 
2251  @staticmethod
2252  def add_alias(old_key, new_name):
2253  r"""add_alias(ParticleIndexKey old_key, std::string new_name) -> ParticleIndexKey"""
2254  return _IMP_kernel.ParticleIndexKey_add_alias(old_key, new_name)
2255 
2256  @staticmethod
2257  def get_number_of_keys():
2258  r"""get_number_of_keys() -> unsigned int"""
2259  return _IMP_kernel.ParticleIndexKey_get_number_of_keys()
2260 
2261  def get_index(self):
2262  r"""get_index(ParticleIndexKey self) -> unsigned int"""
2263  return _IMP_kernel.ParticleIndexKey_get_index(self)
2264 
2265  @staticmethod
2266  def show_all(out):
2267  r"""show_all(_ostream out)"""
2268  return _IMP_kernel.ParticleIndexKey_show_all(out)
2269 
2270  @staticmethod
2271  def get_all_strings():
2272  r"""get_all_strings() -> IMP::Vector< std::string >"""
2273  return _IMP_kernel.ParticleIndexKey_get_all_strings()
2274 
2275  @staticmethod
2276  def get_number_unique():
2277  r"""get_number_unique() -> unsigned int"""
2278  return _IMP_kernel.ParticleIndexKey_get_number_unique()
2279 
2280  def __str__(self):
2281  r"""__str__(ParticleIndexKey self) -> std::string"""
2282  return _IMP_kernel.ParticleIndexKey___str__(self)
2283 
2284  def __repr__(self):
2285  r"""__repr__(ParticleIndexKey self) -> std::string"""
2286  return _IMP_kernel.ParticleIndexKey___repr__(self)
2287  __swig_destroy__ = _IMP_kernel.delete_ParticleIndexKey
2288 
2289 # Register ParticleIndexKey in _IMP_kernel:
2290 _IMP_kernel.ParticleIndexKey_swigregister(ParticleIndexKey)
2291 class ObjectKey(_Value):
2292  r"""Proxy of C++ IMP::Key< 4 > class."""
2293 
2294  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2295 
2296  def __init__(self, *args):
2297  r"""
2298  __init__(ObjectKey self) -> ObjectKey
2299  __init__(ObjectKey self, std::string const & c, bool is_implicit_add_permitted=True) -> ObjectKey
2300  __init__(ObjectKey self, unsigned int i) -> ObjectKey
2301  """
2302  _IMP_kernel.ObjectKey_swiginit(self, _IMP_kernel.new_ObjectKey(*args))
2303 
2304  @staticmethod
2305  def add_key(sc):
2306  r"""add_key(std::string sc) -> unsigned int"""
2307  return _IMP_kernel.ObjectKey_add_key(sc)
2308 
2309  @staticmethod
2310  def get_key_exists(sc):
2311  r"""get_key_exists(std::string sc) -> bool"""
2312  return _IMP_kernel.ObjectKey_get_key_exists(sc)
2313 
2314  def get_string(self):
2315  r"""get_string(ObjectKey self) -> std::string const"""
2316  return _IMP_kernel.ObjectKey_get_string(self)
2317 
2318  def __cmp__(self, o):
2319  r"""__cmp__(ObjectKey self, ObjectKey o) -> int"""
2320  return _IMP_kernel.ObjectKey___cmp__(self, o)
2321 
2322  def __eq__(self, o):
2323  r"""__eq__(ObjectKey self, ObjectKey o) -> bool"""
2324  return _IMP_kernel.ObjectKey___eq__(self, o)
2325 
2326  def __ne__(self, o):
2327  r"""__ne__(ObjectKey self, ObjectKey o) -> bool"""
2328  return _IMP_kernel.ObjectKey___ne__(self, o)
2329 
2330  def __lt__(self, o):
2331  r"""__lt__(ObjectKey self, ObjectKey o) -> bool"""
2332  return _IMP_kernel.ObjectKey___lt__(self, o)
2333 
2334  def __gt__(self, o):
2335  r"""__gt__(ObjectKey self, ObjectKey o) -> bool"""
2336  return _IMP_kernel.ObjectKey___gt__(self, o)
2337 
2338  def __ge__(self, o):
2339  r"""__ge__(ObjectKey self, ObjectKey o) -> bool"""
2340  return _IMP_kernel.ObjectKey___ge__(self, o)
2341 
2342  def __le__(self, o):
2343  r"""__le__(ObjectKey self, ObjectKey o) -> bool"""
2344  return _IMP_kernel.ObjectKey___le__(self, o)
2345 
2346  def __hash__(self):
2347  r"""__hash__(ObjectKey self) -> std::size_t"""
2348  return _IMP_kernel.ObjectKey___hash__(self)
2349 
2350  def show(self, *args):
2351  r"""show(ObjectKey self, _ostream out=std::cout)"""
2352  return _IMP_kernel.ObjectKey_show(self, *args)
2353 
2354  @staticmethod
2355  def add_alias(old_key, new_name):
2356  r"""add_alias(ObjectKey old_key, std::string new_name) -> ObjectKey"""
2357  return _IMP_kernel.ObjectKey_add_alias(old_key, new_name)
2358 
2359  @staticmethod
2360  def get_number_of_keys():
2361  r"""get_number_of_keys() -> unsigned int"""
2362  return _IMP_kernel.ObjectKey_get_number_of_keys()
2363 
2364  def get_index(self):
2365  r"""get_index(ObjectKey self) -> unsigned int"""
2366  return _IMP_kernel.ObjectKey_get_index(self)
2367 
2368  @staticmethod
2369  def show_all(out):
2370  r"""show_all(_ostream out)"""
2371  return _IMP_kernel.ObjectKey_show_all(out)
2372 
2373  @staticmethod
2374  def get_all_strings():
2375  r"""get_all_strings() -> IMP::Vector< std::string >"""
2376  return _IMP_kernel.ObjectKey_get_all_strings()
2377 
2378  @staticmethod
2379  def get_number_unique():
2380  r"""get_number_unique() -> unsigned int"""
2381  return _IMP_kernel.ObjectKey_get_number_unique()
2382 
2383  def __str__(self):
2384  r"""__str__(ObjectKey self) -> std::string"""
2385  return _IMP_kernel.ObjectKey___str__(self)
2386 
2387  def __repr__(self):
2388  r"""__repr__(ObjectKey self) -> std::string"""
2389  return _IMP_kernel.ObjectKey___repr__(self)
2390  __swig_destroy__ = _IMP_kernel.delete_ObjectKey
2391 
2392 # Register ObjectKey in _IMP_kernel:
2393 _IMP_kernel.ObjectKey_swigregister(ObjectKey)
2394 class IntsKey(_Value):
2395  r"""Proxy of C++ IMP::Key< 5 > class."""
2396 
2397  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2398 
2399  def __init__(self, *args):
2400  r"""
2401  __init__(IntsKey self) -> IntsKey
2402  __init__(IntsKey self, std::string const & c, bool is_implicit_add_permitted=True) -> IntsKey
2403  __init__(IntsKey self, unsigned int i) -> IntsKey
2404  """
2405  _IMP_kernel.IntsKey_swiginit(self, _IMP_kernel.new_IntsKey(*args))
2406 
2407  @staticmethod
2408  def add_key(sc):
2409  r"""add_key(std::string sc) -> unsigned int"""
2410  return _IMP_kernel.IntsKey_add_key(sc)
2411 
2412  @staticmethod
2413  def get_key_exists(sc):
2414  r"""get_key_exists(std::string sc) -> bool"""
2415  return _IMP_kernel.IntsKey_get_key_exists(sc)
2416 
2417  def get_string(self):
2418  r"""get_string(IntsKey self) -> std::string const"""
2419  return _IMP_kernel.IntsKey_get_string(self)
2420 
2421  def __cmp__(self, o):
2422  r"""__cmp__(IntsKey self, IntsKey o) -> int"""
2423  return _IMP_kernel.IntsKey___cmp__(self, o)
2424 
2425  def __eq__(self, o):
2426  r"""__eq__(IntsKey self, IntsKey o) -> bool"""
2427  return _IMP_kernel.IntsKey___eq__(self, o)
2428 
2429  def __ne__(self, o):
2430  r"""__ne__(IntsKey self, IntsKey o) -> bool"""
2431  return _IMP_kernel.IntsKey___ne__(self, o)
2432 
2433  def __lt__(self, o):
2434  r"""__lt__(IntsKey self, IntsKey o) -> bool"""
2435  return _IMP_kernel.IntsKey___lt__(self, o)
2436 
2437  def __gt__(self, o):
2438  r"""__gt__(IntsKey self, IntsKey o) -> bool"""
2439  return _IMP_kernel.IntsKey___gt__(self, o)
2440 
2441  def __ge__(self, o):
2442  r"""__ge__(IntsKey self, IntsKey o) -> bool"""
2443  return _IMP_kernel.IntsKey___ge__(self, o)
2444 
2445  def __le__(self, o):
2446  r"""__le__(IntsKey self, IntsKey o) -> bool"""
2447  return _IMP_kernel.IntsKey___le__(self, o)
2448 
2449  def __hash__(self):
2450  r"""__hash__(IntsKey self) -> std::size_t"""
2451  return _IMP_kernel.IntsKey___hash__(self)
2452 
2453  def show(self, *args):
2454  r"""show(IntsKey self, _ostream out=std::cout)"""
2455  return _IMP_kernel.IntsKey_show(self, *args)
2456 
2457  @staticmethod
2458  def add_alias(old_key, new_name):
2459  r"""add_alias(IntsKey old_key, std::string new_name) -> IntsKey"""
2460  return _IMP_kernel.IntsKey_add_alias(old_key, new_name)
2461 
2462  @staticmethod
2463  def get_number_of_keys():
2464  r"""get_number_of_keys() -> unsigned int"""
2465  return _IMP_kernel.IntsKey_get_number_of_keys()
2466 
2467  def get_index(self):
2468  r"""get_index(IntsKey self) -> unsigned int"""
2469  return _IMP_kernel.IntsKey_get_index(self)
2470 
2471  @staticmethod
2472  def show_all(out):
2473  r"""show_all(_ostream out)"""
2474  return _IMP_kernel.IntsKey_show_all(out)
2475 
2476  @staticmethod
2477  def get_all_strings():
2478  r"""get_all_strings() -> IMP::Vector< std::string >"""
2479  return _IMP_kernel.IntsKey_get_all_strings()
2480 
2481  @staticmethod
2482  def get_number_unique():
2483  r"""get_number_unique() -> unsigned int"""
2484  return _IMP_kernel.IntsKey_get_number_unique()
2485 
2486  def __str__(self):
2487  r"""__str__(IntsKey self) -> std::string"""
2488  return _IMP_kernel.IntsKey___str__(self)
2489 
2490  def __repr__(self):
2491  r"""__repr__(IntsKey self) -> std::string"""
2492  return _IMP_kernel.IntsKey___repr__(self)
2493  __swig_destroy__ = _IMP_kernel.delete_IntsKey
2494 
2495 # Register IntsKey in _IMP_kernel:
2496 _IMP_kernel.IntsKey_swigregister(IntsKey)
2497 class ParticleIndexesKey(_Value):
2498  r"""Proxy of C++ IMP::Key< 6 > class."""
2499 
2500  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2501 
2502  def __init__(self, *args):
2503  r"""
2504  __init__(ParticleIndexesKey self) -> ParticleIndexesKey
2505  __init__(ParticleIndexesKey self, std::string const & c, bool is_implicit_add_permitted=True) -> ParticleIndexesKey
2506  __init__(ParticleIndexesKey self, unsigned int i) -> ParticleIndexesKey
2507  """
2508  _IMP_kernel.ParticleIndexesKey_swiginit(self, _IMP_kernel.new_ParticleIndexesKey(*args))
2509 
2510  @staticmethod
2511  def add_key(sc):
2512  r"""add_key(std::string sc) -> unsigned int"""
2513  return _IMP_kernel.ParticleIndexesKey_add_key(sc)
2514 
2515  @staticmethod
2516  def get_key_exists(sc):
2517  r"""get_key_exists(std::string sc) -> bool"""
2518  return _IMP_kernel.ParticleIndexesKey_get_key_exists(sc)
2519 
2520  def get_string(self):
2521  r"""get_string(ParticleIndexesKey self) -> std::string const"""
2522  return _IMP_kernel.ParticleIndexesKey_get_string(self)
2523 
2524  def __cmp__(self, o):
2525  r"""__cmp__(ParticleIndexesKey self, ParticleIndexesKey o) -> int"""
2526  return _IMP_kernel.ParticleIndexesKey___cmp__(self, o)
2527 
2528  def __eq__(self, o):
2529  r"""__eq__(ParticleIndexesKey self, ParticleIndexesKey o) -> bool"""
2530  return _IMP_kernel.ParticleIndexesKey___eq__(self, o)
2531 
2532  def __ne__(self, o):
2533  r"""__ne__(ParticleIndexesKey self, ParticleIndexesKey o) -> bool"""
2534  return _IMP_kernel.ParticleIndexesKey___ne__(self, o)
2535 
2536  def __lt__(self, o):
2537  r"""__lt__(ParticleIndexesKey self, ParticleIndexesKey o) -> bool"""
2538  return _IMP_kernel.ParticleIndexesKey___lt__(self, o)
2539 
2540  def __gt__(self, o):
2541  r"""__gt__(ParticleIndexesKey self, ParticleIndexesKey o) -> bool"""
2542  return _IMP_kernel.ParticleIndexesKey___gt__(self, o)
2543 
2544  def __ge__(self, o):
2545  r"""__ge__(ParticleIndexesKey self, ParticleIndexesKey o) -> bool"""
2546  return _IMP_kernel.ParticleIndexesKey___ge__(self, o)
2547 
2548  def __le__(self, o):
2549  r"""__le__(ParticleIndexesKey self, ParticleIndexesKey o) -> bool"""
2550  return _IMP_kernel.ParticleIndexesKey___le__(self, o)
2551 
2552  def __hash__(self):
2553  r"""__hash__(ParticleIndexesKey self) -> std::size_t"""
2554  return _IMP_kernel.ParticleIndexesKey___hash__(self)
2555 
2556  def show(self, *args):
2557  r"""show(ParticleIndexesKey self, _ostream out=std::cout)"""
2558  return _IMP_kernel.ParticleIndexesKey_show(self, *args)
2559 
2560  @staticmethod
2561  def add_alias(old_key, new_name):
2562  r"""add_alias(ParticleIndexesKey old_key, std::string new_name) -> ParticleIndexesKey"""
2563  return _IMP_kernel.ParticleIndexesKey_add_alias(old_key, new_name)
2564 
2565  @staticmethod
2566  def get_number_of_keys():
2567  r"""get_number_of_keys() -> unsigned int"""
2568  return _IMP_kernel.ParticleIndexesKey_get_number_of_keys()
2569 
2570  def get_index(self):
2571  r"""get_index(ParticleIndexesKey self) -> unsigned int"""
2572  return _IMP_kernel.ParticleIndexesKey_get_index(self)
2573 
2574  @staticmethod
2575  def show_all(out):
2576  r"""show_all(_ostream out)"""
2577  return _IMP_kernel.ParticleIndexesKey_show_all(out)
2578 
2579  @staticmethod
2580  def get_all_strings():
2581  r"""get_all_strings() -> IMP::Vector< std::string >"""
2582  return _IMP_kernel.ParticleIndexesKey_get_all_strings()
2583 
2584  @staticmethod
2585  def get_number_unique():
2586  r"""get_number_unique() -> unsigned int"""
2587  return _IMP_kernel.ParticleIndexesKey_get_number_unique()
2588 
2589  def __str__(self):
2590  r"""__str__(ParticleIndexesKey self) -> std::string"""
2591  return _IMP_kernel.ParticleIndexesKey___str__(self)
2592 
2593  def __repr__(self):
2594  r"""__repr__(ParticleIndexesKey self) -> std::string"""
2595  return _IMP_kernel.ParticleIndexesKey___repr__(self)
2596  __swig_destroy__ = _IMP_kernel.delete_ParticleIndexesKey
2597 
2598 # Register ParticleIndexesKey in _IMP_kernel:
2599 _IMP_kernel.ParticleIndexesKey_swigregister(ParticleIndexesKey)
2600 class ModelKey(_Value):
2601  r"""Proxy of C++ IMP::Key< 8 > class."""
2602 
2603  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2604 
2605  def __init__(self, *args):
2606  r"""
2607  __init__(ModelKey self) -> ModelKey
2608  __init__(ModelKey self, std::string const & c, bool is_implicit_add_permitted=True) -> ModelKey
2609  __init__(ModelKey self, unsigned int i) -> ModelKey
2610  """
2611  _IMP_kernel.ModelKey_swiginit(self, _IMP_kernel.new_ModelKey(*args))
2612 
2613  @staticmethod
2614  def add_key(sc):
2615  r"""add_key(std::string sc) -> unsigned int"""
2616  return _IMP_kernel.ModelKey_add_key(sc)
2617 
2618  @staticmethod
2619  def get_key_exists(sc):
2620  r"""get_key_exists(std::string sc) -> bool"""
2621  return _IMP_kernel.ModelKey_get_key_exists(sc)
2622 
2623  def get_string(self):
2624  r"""get_string(ModelKey self) -> std::string const"""
2625  return _IMP_kernel.ModelKey_get_string(self)
2626 
2627  def __cmp__(self, o):
2628  r"""__cmp__(ModelKey self, ModelKey o) -> int"""
2629  return _IMP_kernel.ModelKey___cmp__(self, o)
2630 
2631  def __eq__(self, o):
2632  r"""__eq__(ModelKey self, ModelKey o) -> bool"""
2633  return _IMP_kernel.ModelKey___eq__(self, o)
2634 
2635  def __ne__(self, o):
2636  r"""__ne__(ModelKey self, ModelKey o) -> bool"""
2637  return _IMP_kernel.ModelKey___ne__(self, o)
2638 
2639  def __lt__(self, o):
2640  r"""__lt__(ModelKey self, ModelKey o) -> bool"""
2641  return _IMP_kernel.ModelKey___lt__(self, o)
2642 
2643  def __gt__(self, o):
2644  r"""__gt__(ModelKey self, ModelKey o) -> bool"""
2645  return _IMP_kernel.ModelKey___gt__(self, o)
2646 
2647  def __ge__(self, o):
2648  r"""__ge__(ModelKey self, ModelKey o) -> bool"""
2649  return _IMP_kernel.ModelKey___ge__(self, o)
2650 
2651  def __le__(self, o):
2652  r"""__le__(ModelKey self, ModelKey o) -> bool"""
2653  return _IMP_kernel.ModelKey___le__(self, o)
2654 
2655  def __hash__(self):
2656  r"""__hash__(ModelKey self) -> std::size_t"""
2657  return _IMP_kernel.ModelKey___hash__(self)
2658 
2659  def show(self, *args):
2660  r"""show(ModelKey self, _ostream out=std::cout)"""
2661  return _IMP_kernel.ModelKey_show(self, *args)
2662 
2663  @staticmethod
2664  def add_alias(old_key, new_name):
2665  r"""add_alias(ModelKey old_key, std::string new_name) -> ModelKey"""
2666  return _IMP_kernel.ModelKey_add_alias(old_key, new_name)
2667 
2668  @staticmethod
2669  def get_number_of_keys():
2670  r"""get_number_of_keys() -> unsigned int"""
2671  return _IMP_kernel.ModelKey_get_number_of_keys()
2672 
2673  def get_index(self):
2674  r"""get_index(ModelKey self) -> unsigned int"""
2675  return _IMP_kernel.ModelKey_get_index(self)
2676 
2677  @staticmethod
2678  def show_all(out):
2679  r"""show_all(_ostream out)"""
2680  return _IMP_kernel.ModelKey_show_all(out)
2681 
2682  @staticmethod
2683  def get_all_strings():
2684  r"""get_all_strings() -> IMP::Vector< std::string >"""
2685  return _IMP_kernel.ModelKey_get_all_strings()
2686 
2687  @staticmethod
2688  def get_number_unique():
2689  r"""get_number_unique() -> unsigned int"""
2690  return _IMP_kernel.ModelKey_get_number_unique()
2691 
2692  def __str__(self):
2693  r"""__str__(ModelKey self) -> std::string"""
2694  return _IMP_kernel.ModelKey___str__(self)
2695 
2696  def __repr__(self):
2697  r"""__repr__(ModelKey self) -> std::string"""
2698  return _IMP_kernel.ModelKey___repr__(self)
2699  __swig_destroy__ = _IMP_kernel.delete_ModelKey
2700 
2701 # Register ModelKey in _IMP_kernel:
2702 _IMP_kernel.ModelKey_swigregister(ModelKey)
2703 class TriggerKey(_Value):
2704  r"""Proxy of C++ IMP::Key< 11 > class."""
2705 
2706  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2707 
2708  def __init__(self, *args):
2709  r"""
2710  __init__(TriggerKey self) -> TriggerKey
2711  __init__(TriggerKey self, std::string const & c, bool is_implicit_add_permitted=True) -> TriggerKey
2712  __init__(TriggerKey self, unsigned int i) -> TriggerKey
2713  """
2714  _IMP_kernel.TriggerKey_swiginit(self, _IMP_kernel.new_TriggerKey(*args))
2715 
2716  @staticmethod
2717  def add_key(sc):
2718  r"""add_key(std::string sc) -> unsigned int"""
2719  return _IMP_kernel.TriggerKey_add_key(sc)
2720 
2721  @staticmethod
2722  def get_key_exists(sc):
2723  r"""get_key_exists(std::string sc) -> bool"""
2724  return _IMP_kernel.TriggerKey_get_key_exists(sc)
2725 
2726  def get_string(self):
2727  r"""get_string(TriggerKey self) -> std::string const"""
2728  return _IMP_kernel.TriggerKey_get_string(self)
2729 
2730  def __cmp__(self, o):
2731  r"""__cmp__(TriggerKey self, TriggerKey o) -> int"""
2732  return _IMP_kernel.TriggerKey___cmp__(self, o)
2733 
2734  def __eq__(self, o):
2735  r"""__eq__(TriggerKey self, TriggerKey o) -> bool"""
2736  return _IMP_kernel.TriggerKey___eq__(self, o)
2737 
2738  def __ne__(self, o):
2739  r"""__ne__(TriggerKey self, TriggerKey o) -> bool"""
2740  return _IMP_kernel.TriggerKey___ne__(self, o)
2741 
2742  def __lt__(self, o):
2743  r"""__lt__(TriggerKey self, TriggerKey o) -> bool"""
2744  return _IMP_kernel.TriggerKey___lt__(self, o)
2745 
2746  def __gt__(self, o):
2747  r"""__gt__(TriggerKey self, TriggerKey o) -> bool"""
2748  return _IMP_kernel.TriggerKey___gt__(self, o)
2749 
2750  def __ge__(self, o):
2751  r"""__ge__(TriggerKey self, TriggerKey o) -> bool"""
2752  return _IMP_kernel.TriggerKey___ge__(self, o)
2753 
2754  def __le__(self, o):
2755  r"""__le__(TriggerKey self, TriggerKey o) -> bool"""
2756  return _IMP_kernel.TriggerKey___le__(self, o)
2757 
2758  def __hash__(self):
2759  r"""__hash__(TriggerKey self) -> std::size_t"""
2760  return _IMP_kernel.TriggerKey___hash__(self)
2761 
2762  def show(self, *args):
2763  r"""show(TriggerKey self, _ostream out=std::cout)"""
2764  return _IMP_kernel.TriggerKey_show(self, *args)
2765 
2766  @staticmethod
2767  def add_alias(old_key, new_name):
2768  r"""add_alias(TriggerKey old_key, std::string new_name) -> TriggerKey"""
2769  return _IMP_kernel.TriggerKey_add_alias(old_key, new_name)
2770 
2771  @staticmethod
2772  def get_number_of_keys():
2773  r"""get_number_of_keys() -> unsigned int"""
2774  return _IMP_kernel.TriggerKey_get_number_of_keys()
2775 
2776  def get_index(self):
2777  r"""get_index(TriggerKey self) -> unsigned int"""
2778  return _IMP_kernel.TriggerKey_get_index(self)
2779 
2780  @staticmethod
2781  def show_all(out):
2782  r"""show_all(_ostream out)"""
2783  return _IMP_kernel.TriggerKey_show_all(out)
2784 
2785  @staticmethod
2786  def get_all_strings():
2787  r"""get_all_strings() -> IMP::Vector< std::string >"""
2788  return _IMP_kernel.TriggerKey_get_all_strings()
2789 
2790  @staticmethod
2791  def get_number_unique():
2792  r"""get_number_unique() -> unsigned int"""
2793  return _IMP_kernel.TriggerKey_get_number_unique()
2794 
2795  def __str__(self):
2796  r"""__str__(TriggerKey self) -> std::string"""
2797  return _IMP_kernel.TriggerKey___str__(self)
2798 
2799  def __repr__(self):
2800  r"""__repr__(TriggerKey self) -> std::string"""
2801  return _IMP_kernel.TriggerKey___repr__(self)
2802  __swig_destroy__ = _IMP_kernel.delete_TriggerKey
2803 
2804 # Register TriggerKey in _IMP_kernel:
2805 _IMP_kernel.TriggerKey_swigregister(TriggerKey)
2806 class ParticleIndex(object):
2807  r"""Proxy of C++ IMP::Index< IMP::ParticleIndexTag > class."""
2808 
2809  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2810 
2811  def __init__(self, *args):
2812  r"""
2813  __init__(ParticleIndex self, int i) -> ParticleIndex
2814  __init__(ParticleIndex self) -> ParticleIndex
2815  """
2816  _IMP_kernel.ParticleIndex_swiginit(self, _IMP_kernel.new_ParticleIndex(*args))
2817 
2818  def get_index(self):
2819  r"""get_index(ParticleIndex self) -> int"""
2820  return _IMP_kernel.ParticleIndex_get_index(self)
2821 
2822  def __cmp__(self, o):
2823  r"""__cmp__(ParticleIndex self, ParticleIndex o) -> int"""
2824  return _IMP_kernel.ParticleIndex___cmp__(self, o)
2825 
2826  def __eq__(self, o):
2827  r"""__eq__(ParticleIndex self, ParticleIndex o) -> bool"""
2828  return _IMP_kernel.ParticleIndex___eq__(self, o)
2829 
2830  def __ne__(self, o):
2831  r"""__ne__(ParticleIndex self, ParticleIndex o) -> bool"""
2832  return _IMP_kernel.ParticleIndex___ne__(self, o)
2833 
2834  def __lt__(self, o):
2835  r"""__lt__(ParticleIndex self, ParticleIndex o) -> bool"""
2836  return _IMP_kernel.ParticleIndex___lt__(self, o)
2837 
2838  def __gt__(self, o):
2839  r"""__gt__(ParticleIndex self, ParticleIndex o) -> bool"""
2840  return _IMP_kernel.ParticleIndex___gt__(self, o)
2841 
2842  def __ge__(self, o):
2843  r"""__ge__(ParticleIndex self, ParticleIndex o) -> bool"""
2844  return _IMP_kernel.ParticleIndex___ge__(self, o)
2845 
2846  def __le__(self, o):
2847  r"""__le__(ParticleIndex self, ParticleIndex o) -> bool"""
2848  return _IMP_kernel.ParticleIndex___le__(self, o)
2849 
2850  def show(self, *args):
2851  r"""show(ParticleIndex self, _ostream out=std::cout)"""
2852  return _IMP_kernel.ParticleIndex_show(self, *args)
2853 
2854  def __hash__(self):
2855  r"""__hash__(ParticleIndex self) -> std::size_t"""
2856  return _IMP_kernel.ParticleIndex___hash__(self)
2857 
2858  def __str__(self):
2859  r"""__str__(ParticleIndex self) -> std::string"""
2860  return _IMP_kernel.ParticleIndex___str__(self)
2861 
2862  def __repr__(self):
2863  r"""__repr__(ParticleIndex self) -> std::string"""
2864  return _IMP_kernel.ParticleIndex___repr__(self)
2865  __swig_destroy__ = _IMP_kernel.delete_ParticleIndex
2866 
2867 # Register ParticleIndex in _IMP_kernel:
2868 _IMP_kernel.ParticleIndex_swigregister(ParticleIndex)
2869 class FloatsKey(_Value):
2870  r"""Proxy of C++ IMP::Key< 10 > class."""
2871 
2872  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2873 
2874  def __init__(self, *args):
2875  r"""
2876  __init__(FloatsKey self) -> FloatsKey
2877  __init__(FloatsKey self, std::string const & c, bool is_implicit_add_permitted=True) -> FloatsKey
2878  __init__(FloatsKey self, unsigned int i) -> FloatsKey
2879  """
2880  _IMP_kernel.FloatsKey_swiginit(self, _IMP_kernel.new_FloatsKey(*args))
2881 
2882  @staticmethod
2883  def add_key(sc):
2884  r"""add_key(std::string sc) -> unsigned int"""
2885  return _IMP_kernel.FloatsKey_add_key(sc)
2886 
2887  @staticmethod
2888  def get_key_exists(sc):
2889  r"""get_key_exists(std::string sc) -> bool"""
2890  return _IMP_kernel.FloatsKey_get_key_exists(sc)
2891 
2892  def get_string(self):
2893  r"""get_string(FloatsKey self) -> std::string const"""
2894  return _IMP_kernel.FloatsKey_get_string(self)
2895 
2896  def __cmp__(self, o):
2897  r"""__cmp__(FloatsKey self, FloatsKey o) -> int"""
2898  return _IMP_kernel.FloatsKey___cmp__(self, o)
2899 
2900  def __eq__(self, o):
2901  r"""__eq__(FloatsKey self, FloatsKey o) -> bool"""
2902  return _IMP_kernel.FloatsKey___eq__(self, o)
2903 
2904  def __ne__(self, o):
2905  r"""__ne__(FloatsKey self, FloatsKey o) -> bool"""
2906  return _IMP_kernel.FloatsKey___ne__(self, o)
2907 
2908  def __lt__(self, o):
2909  r"""__lt__(FloatsKey self, FloatsKey o) -> bool"""
2910  return _IMP_kernel.FloatsKey___lt__(self, o)
2911 
2912  def __gt__(self, o):
2913  r"""__gt__(FloatsKey self, FloatsKey o) -> bool"""
2914  return _IMP_kernel.FloatsKey___gt__(self, o)
2915 
2916  def __ge__(self, o):
2917  r"""__ge__(FloatsKey self, FloatsKey o) -> bool"""
2918  return _IMP_kernel.FloatsKey___ge__(self, o)
2919 
2920  def __le__(self, o):
2921  r"""__le__(FloatsKey self, FloatsKey o) -> bool"""
2922  return _IMP_kernel.FloatsKey___le__(self, o)
2923 
2924  def __hash__(self):
2925  r"""__hash__(FloatsKey self) -> std::size_t"""
2926  return _IMP_kernel.FloatsKey___hash__(self)
2927 
2928  def show(self, *args):
2929  r"""show(FloatsKey self, _ostream out=std::cout)"""
2930  return _IMP_kernel.FloatsKey_show(self, *args)
2931 
2932  @staticmethod
2933  def add_alias(old_key, new_name):
2934  r"""add_alias(FloatsKey old_key, std::string new_name) -> FloatsKey"""
2935  return _IMP_kernel.FloatsKey_add_alias(old_key, new_name)
2936 
2937  @staticmethod
2938  def get_number_of_keys():
2939  r"""get_number_of_keys() -> unsigned int"""
2940  return _IMP_kernel.FloatsKey_get_number_of_keys()
2941 
2942  def get_index(self):
2943  r"""get_index(FloatsKey self) -> unsigned int"""
2944  return _IMP_kernel.FloatsKey_get_index(self)
2945 
2946  @staticmethod
2947  def show_all(out):
2948  r"""show_all(_ostream out)"""
2949  return _IMP_kernel.FloatsKey_show_all(out)
2950 
2951  @staticmethod
2952  def get_all_strings():
2953  r"""get_all_strings() -> IMP::Vector< std::string >"""
2954  return _IMP_kernel.FloatsKey_get_all_strings()
2955 
2956  @staticmethod
2957  def get_number_unique():
2958  r"""get_number_unique() -> unsigned int"""
2959  return _IMP_kernel.FloatsKey_get_number_unique()
2960 
2961  def __str__(self):
2962  r"""__str__(FloatsKey self) -> std::string"""
2963  return _IMP_kernel.FloatsKey___str__(self)
2964 
2965  def __repr__(self):
2966  r"""__repr__(FloatsKey self) -> std::string"""
2967  return _IMP_kernel.FloatsKey___repr__(self)
2968  __swig_destroy__ = _IMP_kernel.delete_FloatsKey
2969 
2970 # Register FloatsKey in _IMP_kernel:
2971 _IMP_kernel.FloatsKey_swigregister(FloatsKey)
2972 class SparseStringKey(_Value):
2973  r"""Proxy of C++ IMP::Key< 12 > class."""
2974 
2975  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2976 
2977  def __init__(self, *args):
2978  r"""
2979  __init__(SparseStringKey self) -> SparseStringKey
2980  __init__(SparseStringKey self, std::string const & c, bool is_implicit_add_permitted=True) -> SparseStringKey
2981  __init__(SparseStringKey self, unsigned int i) -> SparseStringKey
2982  """
2983  _IMP_kernel.SparseStringKey_swiginit(self, _IMP_kernel.new_SparseStringKey(*args))
2984 
2985  @staticmethod
2986  def add_key(sc):
2987  r"""add_key(std::string sc) -> unsigned int"""
2988  return _IMP_kernel.SparseStringKey_add_key(sc)
2989 
2990  @staticmethod
2991  def get_key_exists(sc):
2992  r"""get_key_exists(std::string sc) -> bool"""
2993  return _IMP_kernel.SparseStringKey_get_key_exists(sc)
2994 
2995  def get_string(self):
2996  r"""get_string(SparseStringKey self) -> std::string const"""
2997  return _IMP_kernel.SparseStringKey_get_string(self)
2998 
2999  def __cmp__(self, o):
3000  r"""__cmp__(SparseStringKey self, SparseStringKey o) -> int"""
3001  return _IMP_kernel.SparseStringKey___cmp__(self, o)
3002 
3003  def __eq__(self, o):
3004  r"""__eq__(SparseStringKey self, SparseStringKey o) -> bool"""
3005  return _IMP_kernel.SparseStringKey___eq__(self, o)
3006 
3007  def __ne__(self, o):
3008  r"""__ne__(SparseStringKey self, SparseStringKey o) -> bool"""
3009  return _IMP_kernel.SparseStringKey___ne__(self, o)
3010 
3011  def __lt__(self, o):
3012  r"""__lt__(SparseStringKey self, SparseStringKey o) -> bool"""
3013  return _IMP_kernel.SparseStringKey___lt__(self, o)
3014 
3015  def __gt__(self, o):
3016  r"""__gt__(SparseStringKey self, SparseStringKey o) -> bool"""
3017  return _IMP_kernel.SparseStringKey___gt__(self, o)
3018 
3019  def __ge__(self, o):
3020  r"""__ge__(SparseStringKey self, SparseStringKey o) -> bool"""
3021  return _IMP_kernel.SparseStringKey___ge__(self, o)
3022 
3023  def __le__(self, o):
3024  r"""__le__(SparseStringKey self, SparseStringKey o) -> bool"""
3025  return _IMP_kernel.SparseStringKey___le__(self, o)
3026 
3027  def __hash__(self):
3028  r"""__hash__(SparseStringKey self) -> std::size_t"""
3029  return _IMP_kernel.SparseStringKey___hash__(self)
3030 
3031  def show(self, *args):
3032  r"""show(SparseStringKey self, _ostream out=std::cout)"""
3033  return _IMP_kernel.SparseStringKey_show(self, *args)
3034 
3035  @staticmethod
3036  def add_alias(old_key, new_name):
3037  r"""add_alias(SparseStringKey old_key, std::string new_name) -> SparseStringKey"""
3038  return _IMP_kernel.SparseStringKey_add_alias(old_key, new_name)
3039 
3040  @staticmethod
3041  def get_number_of_keys():
3042  r"""get_number_of_keys() -> unsigned int"""
3043  return _IMP_kernel.SparseStringKey_get_number_of_keys()
3044 
3045  def get_index(self):
3046  r"""get_index(SparseStringKey self) -> unsigned int"""
3047  return _IMP_kernel.SparseStringKey_get_index(self)
3048 
3049  @staticmethod
3050  def show_all(out):
3051  r"""show_all(_ostream out)"""
3052  return _IMP_kernel.SparseStringKey_show_all(out)
3053 
3054  @staticmethod
3055  def get_all_strings():
3056  r"""get_all_strings() -> IMP::Vector< std::string >"""
3057  return _IMP_kernel.SparseStringKey_get_all_strings()
3058 
3059  @staticmethod
3060  def get_number_unique():
3061  r"""get_number_unique() -> unsigned int"""
3062  return _IMP_kernel.SparseStringKey_get_number_unique()
3063 
3064  def __str__(self):
3065  r"""__str__(SparseStringKey self) -> std::string"""
3066  return _IMP_kernel.SparseStringKey___str__(self)
3067 
3068  def __repr__(self):
3069  r"""__repr__(SparseStringKey self) -> std::string"""
3070  return _IMP_kernel.SparseStringKey___repr__(self)
3071  __swig_destroy__ = _IMP_kernel.delete_SparseStringKey
3072 
3073 # Register SparseStringKey in _IMP_kernel:
3074 _IMP_kernel.SparseStringKey_swigregister(SparseStringKey)
3075 class SparseIntKey(_Value):
3076  r"""Proxy of C++ IMP::Key< 13 > class."""
3077 
3078  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3079 
3080  def __init__(self, *args):
3081  r"""
3082  __init__(SparseIntKey self) -> SparseIntKey
3083  __init__(SparseIntKey self, std::string const & c, bool is_implicit_add_permitted=True) -> SparseIntKey
3084  __init__(SparseIntKey self, unsigned int i) -> SparseIntKey
3085  """
3086  _IMP_kernel.SparseIntKey_swiginit(self, _IMP_kernel.new_SparseIntKey(*args))
3087 
3088  @staticmethod
3089  def add_key(sc):
3090  r"""add_key(std::string sc) -> unsigned int"""
3091  return _IMP_kernel.SparseIntKey_add_key(sc)
3092 
3093  @staticmethod
3094  def get_key_exists(sc):
3095  r"""get_key_exists(std::string sc) -> bool"""
3096  return _IMP_kernel.SparseIntKey_get_key_exists(sc)
3097 
3098  def get_string(self):
3099  r"""get_string(SparseIntKey self) -> std::string const"""
3100  return _IMP_kernel.SparseIntKey_get_string(self)
3101 
3102  def __cmp__(self, o):
3103  r"""__cmp__(SparseIntKey self, SparseIntKey o) -> int"""
3104  return _IMP_kernel.SparseIntKey___cmp__(self, o)
3105 
3106  def __eq__(self, o):
3107  r"""__eq__(SparseIntKey self, SparseIntKey o) -> bool"""
3108  return _IMP_kernel.SparseIntKey___eq__(self, o)
3109 
3110  def __ne__(self, o):
3111  r"""__ne__(SparseIntKey self, SparseIntKey o) -> bool"""
3112  return _IMP_kernel.SparseIntKey___ne__(self, o)
3113 
3114  def __lt__(self, o):
3115  r"""__lt__(SparseIntKey self, SparseIntKey o) -> bool"""
3116  return _IMP_kernel.SparseIntKey___lt__(self, o)
3117 
3118  def __gt__(self, o):
3119  r"""__gt__(SparseIntKey self, SparseIntKey o) -> bool"""
3120  return _IMP_kernel.SparseIntKey___gt__(self, o)
3121 
3122  def __ge__(self, o):
3123  r"""__ge__(SparseIntKey self, SparseIntKey o) -> bool"""
3124  return _IMP_kernel.SparseIntKey___ge__(self, o)
3125 
3126  def __le__(self, o):
3127  r"""__le__(SparseIntKey self, SparseIntKey o) -> bool"""
3128  return _IMP_kernel.SparseIntKey___le__(self, o)
3129 
3130  def __hash__(self):
3131  r"""__hash__(SparseIntKey self) -> std::size_t"""
3132  return _IMP_kernel.SparseIntKey___hash__(self)
3133 
3134  def show(self, *args):
3135  r"""show(SparseIntKey self, _ostream out=std::cout)"""
3136  return _IMP_kernel.SparseIntKey_show(self, *args)
3137 
3138  @staticmethod
3139  def add_alias(old_key, new_name):
3140  r"""add_alias(SparseIntKey old_key, std::string new_name) -> SparseIntKey"""
3141  return _IMP_kernel.SparseIntKey_add_alias(old_key, new_name)
3142 
3143  @staticmethod
3144  def get_number_of_keys():
3145  r"""get_number_of_keys() -> unsigned int"""
3146  return _IMP_kernel.SparseIntKey_get_number_of_keys()
3147 
3148  def get_index(self):
3149  r"""get_index(SparseIntKey self) -> unsigned int"""
3150  return _IMP_kernel.SparseIntKey_get_index(self)
3151 
3152  @staticmethod
3153  def show_all(out):
3154  r"""show_all(_ostream out)"""
3155  return _IMP_kernel.SparseIntKey_show_all(out)
3156 
3157  @staticmethod
3158  def get_all_strings():
3159  r"""get_all_strings() -> IMP::Vector< std::string >"""
3160  return _IMP_kernel.SparseIntKey_get_all_strings()
3161 
3162  @staticmethod
3163  def get_number_unique():
3164  r"""get_number_unique() -> unsigned int"""
3165  return _IMP_kernel.SparseIntKey_get_number_unique()
3166 
3167  def __str__(self):
3168  r"""__str__(SparseIntKey self) -> std::string"""
3169  return _IMP_kernel.SparseIntKey___str__(self)
3170 
3171  def __repr__(self):
3172  r"""__repr__(SparseIntKey self) -> std::string"""
3173  return _IMP_kernel.SparseIntKey___repr__(self)
3174  __swig_destroy__ = _IMP_kernel.delete_SparseIntKey
3175 
3176 # Register SparseIntKey in _IMP_kernel:
3177 _IMP_kernel.SparseIntKey_swigregister(SparseIntKey)
3178 class SparseFloatKey(_Value):
3179  r"""Proxy of C++ IMP::Key< 14 > class."""
3180 
3181  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3182 
3183  def __init__(self, *args):
3184  r"""
3185  __init__(SparseFloatKey self) -> SparseFloatKey
3186  __init__(SparseFloatKey self, std::string const & c, bool is_implicit_add_permitted=True) -> SparseFloatKey
3187  __init__(SparseFloatKey self, unsigned int i) -> SparseFloatKey
3188  """
3189  _IMP_kernel.SparseFloatKey_swiginit(self, _IMP_kernel.new_SparseFloatKey(*args))
3190 
3191  @staticmethod
3192  def add_key(sc):
3193  r"""add_key(std::string sc) -> unsigned int"""
3194  return _IMP_kernel.SparseFloatKey_add_key(sc)
3195 
3196  @staticmethod
3197  def get_key_exists(sc):
3198  r"""get_key_exists(std::string sc) -> bool"""
3199  return _IMP_kernel.SparseFloatKey_get_key_exists(sc)
3200 
3201  def get_string(self):
3202  r"""get_string(SparseFloatKey self) -> std::string const"""
3203  return _IMP_kernel.SparseFloatKey_get_string(self)
3204 
3205  def __cmp__(self, o):
3206  r"""__cmp__(SparseFloatKey self, SparseFloatKey o) -> int"""
3207  return _IMP_kernel.SparseFloatKey___cmp__(self, o)
3208 
3209  def __eq__(self, o):
3210  r"""__eq__(SparseFloatKey self, SparseFloatKey o) -> bool"""
3211  return _IMP_kernel.SparseFloatKey___eq__(self, o)
3212 
3213  def __ne__(self, o):
3214  r"""__ne__(SparseFloatKey self, SparseFloatKey o) -> bool"""
3215  return _IMP_kernel.SparseFloatKey___ne__(self, o)
3216 
3217  def __lt__(self, o):
3218  r"""__lt__(SparseFloatKey self, SparseFloatKey o) -> bool"""
3219  return _IMP_kernel.SparseFloatKey___lt__(self, o)
3220 
3221  def __gt__(self, o):
3222  r"""__gt__(SparseFloatKey self, SparseFloatKey o) -> bool"""
3223  return _IMP_kernel.SparseFloatKey___gt__(self, o)
3224 
3225  def __ge__(self, o):
3226  r"""__ge__(SparseFloatKey self, SparseFloatKey o) -> bool"""
3227  return _IMP_kernel.SparseFloatKey___ge__(self, o)
3228 
3229  def __le__(self, o):
3230  r"""__le__(SparseFloatKey self, SparseFloatKey o) -> bool"""
3231  return _IMP_kernel.SparseFloatKey___le__(self, o)
3232 
3233  def __hash__(self):
3234  r"""__hash__(SparseFloatKey self) -> std::size_t"""
3235  return _IMP_kernel.SparseFloatKey___hash__(self)
3236 
3237  def show(self, *args):
3238  r"""show(SparseFloatKey self, _ostream out=std::cout)"""
3239  return _IMP_kernel.SparseFloatKey_show(self, *args)
3240 
3241  @staticmethod
3242  def add_alias(old_key, new_name):
3243  r"""add_alias(SparseFloatKey old_key, std::string new_name) -> SparseFloatKey"""
3244  return _IMP_kernel.SparseFloatKey_add_alias(old_key, new_name)
3245 
3246  @staticmethod
3247  def get_number_of_keys():
3248  r"""get_number_of_keys() -> unsigned int"""
3249  return _IMP_kernel.SparseFloatKey_get_number_of_keys()
3250 
3251  def get_index(self):
3252  r"""get_index(SparseFloatKey self) -> unsigned int"""
3253  return _IMP_kernel.SparseFloatKey_get_index(self)
3254 
3255  @staticmethod
3256  def show_all(out):
3257  r"""show_all(_ostream out)"""
3258  return _IMP_kernel.SparseFloatKey_show_all(out)
3259 
3260  @staticmethod
3261  def get_all_strings():
3262  r"""get_all_strings() -> IMP::Vector< std::string >"""
3263  return _IMP_kernel.SparseFloatKey_get_all_strings()
3264 
3265  @staticmethod
3266  def get_number_unique():
3267  r"""get_number_unique() -> unsigned int"""
3268  return _IMP_kernel.SparseFloatKey_get_number_unique()
3269 
3270  def __str__(self):
3271  r"""__str__(SparseFloatKey self) -> std::string"""
3272  return _IMP_kernel.SparseFloatKey___str__(self)
3273 
3274  def __repr__(self):
3275  r"""__repr__(SparseFloatKey self) -> std::string"""
3276  return _IMP_kernel.SparseFloatKey___repr__(self)
3277  __swig_destroy__ = _IMP_kernel.delete_SparseFloatKey
3278 
3279 # Register SparseFloatKey in _IMP_kernel:
3280 _IMP_kernel.SparseFloatKey_swigregister(SparseFloatKey)
3281 class SparseParticleIndexKey(_Value):
3282  r"""Proxy of C++ IMP::Key< 15 > class."""
3283 
3284  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3285 
3286  def __init__(self, *args):
3287  r"""
3288  __init__(SparseParticleIndexKey self) -> SparseParticleIndexKey
3289  __init__(SparseParticleIndexKey self, std::string const & c, bool is_implicit_add_permitted=True) -> SparseParticleIndexKey
3290  __init__(SparseParticleIndexKey self, unsigned int i) -> SparseParticleIndexKey
3291  """
3292  _IMP_kernel.SparseParticleIndexKey_swiginit(self, _IMP_kernel.new_SparseParticleIndexKey(*args))
3293 
3294  @staticmethod
3295  def add_key(sc):
3296  r"""add_key(std::string sc) -> unsigned int"""
3297  return _IMP_kernel.SparseParticleIndexKey_add_key(sc)
3298 
3299  @staticmethod
3300  def get_key_exists(sc):
3301  r"""get_key_exists(std::string sc) -> bool"""
3302  return _IMP_kernel.SparseParticleIndexKey_get_key_exists(sc)
3303 
3304  def get_string(self):
3305  r"""get_string(SparseParticleIndexKey self) -> std::string const"""
3306  return _IMP_kernel.SparseParticleIndexKey_get_string(self)
3307 
3308  def __cmp__(self, o):
3309  r"""__cmp__(SparseParticleIndexKey self, SparseParticleIndexKey o) -> int"""
3310  return _IMP_kernel.SparseParticleIndexKey___cmp__(self, o)
3311 
3312  def __eq__(self, o):
3313  r"""__eq__(SparseParticleIndexKey self, SparseParticleIndexKey o) -> bool"""
3314  return _IMP_kernel.SparseParticleIndexKey___eq__(self, o)
3315 
3316  def __ne__(self, o):
3317  r"""__ne__(SparseParticleIndexKey self, SparseParticleIndexKey o) -> bool"""
3318  return _IMP_kernel.SparseParticleIndexKey___ne__(self, o)
3319 
3320  def __lt__(self, o):
3321  r"""__lt__(SparseParticleIndexKey self, SparseParticleIndexKey o) -> bool"""
3322  return _IMP_kernel.SparseParticleIndexKey___lt__(self, o)
3323 
3324  def __gt__(self, o):
3325  r"""__gt__(SparseParticleIndexKey self, SparseParticleIndexKey o) -> bool"""
3326  return _IMP_kernel.SparseParticleIndexKey___gt__(self, o)
3327 
3328  def __ge__(self, o):
3329  r"""__ge__(SparseParticleIndexKey self, SparseParticleIndexKey o) -> bool"""
3330  return _IMP_kernel.SparseParticleIndexKey___ge__(self, o)
3331 
3332  def __le__(self, o):
3333  r"""__le__(SparseParticleIndexKey self, SparseParticleIndexKey o) -> bool"""
3334  return _IMP_kernel.SparseParticleIndexKey___le__(self, o)
3335 
3336  def __hash__(self):
3337  r"""__hash__(SparseParticleIndexKey self) -> std::size_t"""
3338  return _IMP_kernel.SparseParticleIndexKey___hash__(self)
3339 
3340  def show(self, *args):
3341  r"""show(SparseParticleIndexKey self, _ostream out=std::cout)"""
3342  return _IMP_kernel.SparseParticleIndexKey_show(self, *args)
3343 
3344  @staticmethod
3345  def add_alias(old_key, new_name):
3346  r"""add_alias(SparseParticleIndexKey old_key, std::string new_name) -> SparseParticleIndexKey"""
3347  return _IMP_kernel.SparseParticleIndexKey_add_alias(old_key, new_name)
3348 
3349  @staticmethod
3350  def get_number_of_keys():
3351  r"""get_number_of_keys() -> unsigned int"""
3352  return _IMP_kernel.SparseParticleIndexKey_get_number_of_keys()
3353 
3354  def get_index(self):
3355  r"""get_index(SparseParticleIndexKey self) -> unsigned int"""
3356  return _IMP_kernel.SparseParticleIndexKey_get_index(self)
3357 
3358  @staticmethod
3359  def show_all(out):
3360  r"""show_all(_ostream out)"""
3361  return _IMP_kernel.SparseParticleIndexKey_show_all(out)
3362 
3363  @staticmethod
3364  def get_all_strings():
3365  r"""get_all_strings() -> IMP::Vector< std::string >"""
3366  return _IMP_kernel.SparseParticleIndexKey_get_all_strings()
3367 
3368  @staticmethod
3369  def get_number_unique():
3370  r"""get_number_unique() -> unsigned int"""
3371  return _IMP_kernel.SparseParticleIndexKey_get_number_unique()
3372 
3373  def __str__(self):
3374  r"""__str__(SparseParticleIndexKey self) -> std::string"""
3375  return _IMP_kernel.SparseParticleIndexKey___str__(self)
3376 
3377  def __repr__(self):
3378  r"""__repr__(SparseParticleIndexKey self) -> std::string"""
3379  return _IMP_kernel.SparseParticleIndexKey___repr__(self)
3380  __swig_destroy__ = _IMP_kernel.delete_SparseParticleIndexKey
3381 
3382 # Register SparseParticleIndexKey in _IMP_kernel:
3383 _IMP_kernel.SparseParticleIndexKey_swigregister(SparseParticleIndexKey)
3384 class Vector3DKey(_Value):
3385  r"""Proxy of C++ IMP::Key< 16 > class."""
3386 
3387  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3388 
3389  def __init__(self, *args):
3390  r"""
3391  __init__(Vector3DKey self) -> Vector3DKey
3392  __init__(Vector3DKey self, std::string const & c, bool is_implicit_add_permitted=True) -> Vector3DKey
3393  __init__(Vector3DKey self, unsigned int i) -> Vector3DKey
3394  """
3395  _IMP_kernel.Vector3DKey_swiginit(self, _IMP_kernel.new_Vector3DKey(*args))
3396 
3397  @staticmethod
3398  def add_key(sc):
3399  r"""add_key(std::string sc) -> unsigned int"""
3400  return _IMP_kernel.Vector3DKey_add_key(sc)
3401 
3402  @staticmethod
3403  def get_key_exists(sc):
3404  r"""get_key_exists(std::string sc) -> bool"""
3405  return _IMP_kernel.Vector3DKey_get_key_exists(sc)
3406 
3407  def get_string(self):
3408  r"""get_string(Vector3DKey self) -> std::string const"""
3409  return _IMP_kernel.Vector3DKey_get_string(self)
3410 
3411  def __cmp__(self, o):
3412  r"""__cmp__(Vector3DKey self, Vector3DKey o) -> int"""
3413  return _IMP_kernel.Vector3DKey___cmp__(self, o)
3414 
3415  def __eq__(self, o):
3416  r"""__eq__(Vector3DKey self, Vector3DKey o) -> bool"""
3417  return _IMP_kernel.Vector3DKey___eq__(self, o)
3418 
3419  def __ne__(self, o):
3420  r"""__ne__(Vector3DKey self, Vector3DKey o) -> bool"""
3421  return _IMP_kernel.Vector3DKey___ne__(self, o)
3422 
3423  def __lt__(self, o):
3424  r"""__lt__(Vector3DKey self, Vector3DKey o) -> bool"""
3425  return _IMP_kernel.Vector3DKey___lt__(self, o)
3426 
3427  def __gt__(self, o):
3428  r"""__gt__(Vector3DKey self, Vector3DKey o) -> bool"""
3429  return _IMP_kernel.Vector3DKey___gt__(self, o)
3430 
3431  def __ge__(self, o):
3432  r"""__ge__(Vector3DKey self, Vector3DKey o) -> bool"""
3433  return _IMP_kernel.Vector3DKey___ge__(self, o)
3434 
3435  def __le__(self, o):
3436  r"""__le__(Vector3DKey self, Vector3DKey o) -> bool"""
3437  return _IMP_kernel.Vector3DKey___le__(self, o)
3438 
3439  def __hash__(self):
3440  r"""__hash__(Vector3DKey self) -> std::size_t"""
3441  return _IMP_kernel.Vector3DKey___hash__(self)
3442 
3443  def show(self, *args):
3444  r"""show(Vector3DKey self, _ostream out=std::cout)"""
3445  return _IMP_kernel.Vector3DKey_show(self, *args)
3446 
3447  @staticmethod
3448  def add_alias(old_key, new_name):
3449  r"""add_alias(Vector3DKey old_key, std::string new_name) -> Vector3DKey"""
3450  return _IMP_kernel.Vector3DKey_add_alias(old_key, new_name)
3451 
3452  @staticmethod
3453  def get_number_of_keys():
3454  r"""get_number_of_keys() -> unsigned int"""
3455  return _IMP_kernel.Vector3DKey_get_number_of_keys()
3456 
3457  def get_index(self):
3458  r"""get_index(Vector3DKey self) -> unsigned int"""
3459  return _IMP_kernel.Vector3DKey_get_index(self)
3460 
3461  @staticmethod
3462  def show_all(out):
3463  r"""show_all(_ostream out)"""
3464  return _IMP_kernel.Vector3DKey_show_all(out)
3465 
3466  @staticmethod
3467  def get_all_strings():
3468  r"""get_all_strings() -> IMP::Vector< std::string >"""
3469  return _IMP_kernel.Vector3DKey_get_all_strings()
3470 
3471  @staticmethod
3472  def get_number_unique():
3473  r"""get_number_unique() -> unsigned int"""
3474  return _IMP_kernel.Vector3DKey_get_number_unique()
3475 
3476  def __str__(self):
3477  r"""__str__(Vector3DKey self) -> std::string"""
3478  return _IMP_kernel.Vector3DKey___str__(self)
3479 
3480  def __repr__(self):
3481  r"""__repr__(Vector3DKey self) -> std::string"""
3482  return _IMP_kernel.Vector3DKey___repr__(self)
3483  __swig_destroy__ = _IMP_kernel.delete_Vector3DKey
3484 
3485 # Register Vector3DKey in _IMP_kernel:
3486 _IMP_kernel.Vector3DKey_swigregister(Vector3DKey)
3487 
3488 def ParticlePair(a, b):
3489  return (a,b)
3490 def ParticleTriplet(a, b, c):
3491  return (a,b,c)
3492 def ParticleQuad(a, b, c, d):
3493  return (a,b,c,d)
3494 
3495 class FloatIndex(_Value):
3496  r"""Proxy of C++ IMP::FloatIndex class."""
3497 
3498  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3499 
3500  def __init__(self, *args):
3501  r"""__init__(FloatIndex self, ParticleIndex i0=ParticleIndex(), FloatKey i1=FloatKey()) -> FloatIndex"""
3502  _IMP_kernel.FloatIndex_swiginit(self, _IMP_kernel.new_FloatIndex(*args))
3503 
3504  def __hash__(self):
3505  r"""__hash__(FloatIndex self) -> std::size_t"""
3506  return _IMP_kernel.FloatIndex___hash__(self)
3507 
3508  def show(self, *args):
3509  r"""show(FloatIndex self, _ostream out=std::cout)"""
3510  return _IMP_kernel.FloatIndex_show(self, *args)
3511 
3512  def __cmp__(self, o):
3513  r"""__cmp__(FloatIndex self, FloatIndex o) -> int"""
3514  return _IMP_kernel.FloatIndex___cmp__(self, o)
3515 
3516  def __eq__(self, o):
3517  r"""__eq__(FloatIndex self, FloatIndex o) -> bool"""
3518  return _IMP_kernel.FloatIndex___eq__(self, o)
3519 
3520  def __ne__(self, o):
3521  r"""__ne__(FloatIndex self, FloatIndex o) -> bool"""
3522  return _IMP_kernel.FloatIndex___ne__(self, o)
3523 
3524  def __lt__(self, o):
3525  r"""__lt__(FloatIndex self, FloatIndex o) -> bool"""
3526  return _IMP_kernel.FloatIndex___lt__(self, o)
3527 
3528  def __gt__(self, o):
3529  r"""__gt__(FloatIndex self, FloatIndex o) -> bool"""
3530  return _IMP_kernel.FloatIndex___gt__(self, o)
3531 
3532  def __ge__(self, o):
3533  r"""__ge__(FloatIndex self, FloatIndex o) -> bool"""
3534  return _IMP_kernel.FloatIndex___ge__(self, o)
3535 
3536  def __le__(self, o):
3537  r"""__le__(FloatIndex self, FloatIndex o) -> bool"""
3538  return _IMP_kernel.FloatIndex___le__(self, o)
3539 
3540  def get_particle(self):
3541  r"""get_particle(FloatIndex self) -> ParticleIndex const &"""
3542  return _IMP_kernel.FloatIndex_get_particle(self)
3543 
3544  def set_particle(self, v):
3545  r"""set_particle(FloatIndex self, ParticleIndex const & v)"""
3546  return _IMP_kernel.FloatIndex_set_particle(self, v)
3547 
3548  def get_key(self):
3549  r"""get_key(FloatIndex self) -> FloatKey const &"""
3550  return _IMP_kernel.FloatIndex_get_key(self)
3551 
3552  def set_key(self, v):
3553  r"""set_key(FloatIndex self, FloatKey const & v)"""
3554  return _IMP_kernel.FloatIndex_set_key(self, v)
3555 
3556  def __str__(self):
3557  r"""__str__(FloatIndex self) -> std::string"""
3558  return _IMP_kernel.FloatIndex___str__(self)
3559 
3560  def __repr__(self):
3561  r"""__repr__(FloatIndex self) -> std::string"""
3562  return _IMP_kernel.FloatIndex___repr__(self)
3563  __swig_destroy__ = _IMP_kernel.delete_FloatIndex
3564 
3565 # Register FloatIndex in _IMP_kernel:
3566 _IMP_kernel.FloatIndex_swigregister(FloatIndex)
3567 class _ParticleIndexTag(object):
3568  r"""Proxy of C++ IMP::ParticleIndexTag class."""
3569 
3570  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3571  __repr__ = _swig_repr
3572 
3573  def __init__(self):
3574  r"""__init__(_ParticleIndexTag self) -> _ParticleIndexTag"""
3575  _IMP_kernel._ParticleIndexTag_swiginit(self, _IMP_kernel.new__ParticleIndexTag())
3576  __swig_destroy__ = _IMP_kernel.delete__ParticleIndexTag
3577 
3578 # Register _ParticleIndexTag in _IMP_kernel:
3579 _IMP_kernel._ParticleIndexTag_swigregister(_ParticleIndexTag)
3580 class ModelObject(Object):
3581  r"""Proxy of C++ IMP::ModelObject class."""
3582 
3583  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3584 
3585  def __init__(self, *args):
3586  r"""
3587  __init__(ModelObject self, Model m, std::string name) -> ModelObject
3588  __init__(ModelObject self) -> ModelObject
3589  """
3590  if self.__class__ == ModelObject:
3591  _self = None
3592  else:
3593  _self = self
3594  _IMP_kernel.ModelObject_swiginit(self, _IMP_kernel.new_ModelObject(_self, *args))
3595 
3596  if self.__class__ != ModelObject:
3597  _director_objects.register(self)
3598 
3599 
3600 
3601  __swig_destroy__ = _IMP_kernel.delete_ModelObject
3602 
3603  def get_model(self):
3604  m = _IMP_kernel.ModelObject_get_model(self)
3605  if m in _models_set:
3606  m = _models_set_get(m)
3607  return m
3608 
3609 
3610 
3611  def get_inputs(self):
3612  r"""get_inputs(ModelObject self) -> IMP::ModelObjectsTemp"""
3613  return _IMP_kernel.ModelObject_get_inputs(self)
3614 
3615  def get_outputs(self):
3616  r"""get_outputs(ModelObject self) -> IMP::ModelObjectsTemp"""
3617  return _IMP_kernel.ModelObject_get_outputs(self)
3618 
3619  def get_interactions(self):
3620  r"""get_interactions(ModelObject self) -> IMP::ModelObjectsTemps"""
3621  return _IMP_kernel.ModelObject_get_interactions(self)
3622 
3623  def get_has_dependencies(self):
3624  r"""get_has_dependencies(ModelObject self) -> bool"""
3625  return _IMP_kernel.ModelObject_get_has_dependencies(self)
3626 
3627  def set_has_dependencies(self, tf):
3628  r"""set_has_dependencies(ModelObject self, bool tf)"""
3629  return _IMP_kernel.ModelObject_set_has_dependencies(self, tf)
3630 
3631  def set_has_required_score_states(self, tf):
3632  r"""set_has_required_score_states(ModelObject self, bool tf)"""
3633  return _IMP_kernel.ModelObject_set_has_required_score_states(self, tf)
3634 
3635  def get_has_required_score_states(self):
3636  r"""get_has_required_score_states(ModelObject self) -> bool"""
3637  return _IMP_kernel.ModelObject_get_has_required_score_states(self)
3638 
3639  def get_required_score_states(self):
3640  r"""get_required_score_states(ModelObject self) -> IMP::ScoreStatesTemp const &"""
3641  return _IMP_kernel.ModelObject_get_required_score_states(self)
3642 
3643  def handle_set_has_required_score_states(self, arg0):
3644  r"""handle_set_has_required_score_states(ModelObject self, bool arg0)"""
3645  return _IMP_kernel.ModelObject_handle_set_has_required_score_states(self, arg0)
3646 
3647  def do_get_inputs(self):
3648  r"""do_get_inputs(ModelObject self) -> IMP::ModelObjectsTemp"""
3649  return _IMP_kernel.ModelObject_do_get_inputs(self)
3650 
3651  def do_get_outputs(self):
3652  r"""do_get_outputs(ModelObject self) -> IMP::ModelObjectsTemp"""
3653  return _IMP_kernel.ModelObject_do_get_outputs(self)
3654 
3655  def do_get_interactions(self):
3656  r"""do_get_interactions(ModelObject self) -> IMP::ModelObjectsTemps"""
3657  return _IMP_kernel.ModelObject_do_get_interactions(self)
3658 
3659  def __str__(self):
3660  r"""__str__(ModelObject self) -> std::string"""
3661  return _IMP_kernel.ModelObject___str__(self)
3662 
3663  def __repr__(self):
3664  r"""__repr__(ModelObject self) -> std::string"""
3665  return _IMP_kernel.ModelObject___repr__(self)
3666 
3667  @staticmethod
3668  def get_from(o):
3669  return _object_cast_to_ModelObject(o)
3670 
3671 
3672  def do_show(self, out):
3673  pass
3674 
3675  @staticmethod
3676  def get_from(o):
3677  return _object_cast_to_ModelObject(o)
3678 
3679  def __disown__(self):
3680  self.this.disown()
3681  _IMP_kernel.disown_ModelObject(self)
3682  return weakref.proxy(self)
3683 
3684  def do_destroy(self):
3685  r"""do_destroy(ModelObject self)"""
3686  return _IMP_kernel.ModelObject_do_destroy(self)
3687 
3688 # Register ModelObject in _IMP_kernel:
3689 _IMP_kernel.ModelObject_swigregister(ModelObject)
3690 cvar = _IMP_kernel.cvar
3691 NO_MAX = cvar.NO_MAX
3692 BAD_SCORE = cvar.BAD_SCORE
3693 
3694 class _ParticleInputs(object):
3695  r"""Proxy of C++ IMP::ParticleInputs class."""
3696 
3697  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3698 
3699  def __init__(self, *args, **kwargs):
3700  raise AttributeError("No constructor defined - class is abstract")
3701  __repr__ = _swig_repr
3702 
3703  def get_inputs(self, m, pis):
3704  r"""get_inputs(_ParticleInputs self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
3705  return _IMP_kernel._ParticleInputs_get_inputs(self, m, pis)
3706 
3707 # Register _ParticleInputs in _IMP_kernel:
3708 _IMP_kernel._ParticleInputs_swigregister(_ParticleInputs)
3709 class _ParticleOutputs(object):
3710  r"""Proxy of C++ IMP::ParticleOutputs class."""
3711 
3712  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3713 
3714  def __init__(self, *args, **kwargs):
3715  raise AttributeError("No constructor defined - class is abstract")
3716  __repr__ = _swig_repr
3717 
3718  def get_outputs(self, m, pis):
3719  r"""get_outputs(_ParticleOutputs self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
3720  return _IMP_kernel._ParticleOutputs_get_outputs(self, m, pis)
3721 
3722 # Register _ParticleOutputs in _IMP_kernel:
3723 _IMP_kernel._ParticleOutputs_swigregister(_ParticleOutputs)
3724 
3725 def get_input_particles(mos):
3726  r"""get_input_particles(IMP::ModelObjectsTemp const & mos) -> IMP::ParticlesTemp"""
3727  return _IMP_kernel.get_input_particles(mos)
3728 
3729 def get_input_containers(mos):
3730  r"""get_input_containers(IMP::ModelObjectsTemp const & mos) -> IMP::ContainersTemp"""
3731  return _IMP_kernel.get_input_containers(mos)
3732 
3733 def get_output_particles(mos):
3734  r"""get_output_particles(IMP::ModelObjectsTemp const & mos) -> IMP::ParticlesTemp"""
3735  return _IMP_kernel.get_output_particles(mos)
3736 
3737 def get_output_containers(mos):
3738  r"""get_output_containers(IMP::ModelObjectsTemp const & mos) -> IMP::ContainersTemp"""
3739  return _IMP_kernel.get_output_containers(mos)
3740 class DerivativeAccumulator(object):
3741  r"""Proxy of C++ IMP::DerivativeAccumulator class."""
3742 
3743  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3744  __repr__ = _swig_repr
3745 
3746  def __init__(self, *args):
3747  r"""
3748  __init__(DerivativeAccumulator self, DerivativeAccumulator arg2) -> DerivativeAccumulator
3749  __init__(DerivativeAccumulator self, double weight=1.0) -> DerivativeAccumulator
3750  __init__(DerivativeAccumulator self, DerivativeAccumulator copy, double weight) -> DerivativeAccumulator
3751  """
3752  _IMP_kernel.DerivativeAccumulator_swiginit(self, _IMP_kernel.new_DerivativeAccumulator(*args))
3753 
3754  def __call__(self, value):
3755  r"""__call__(DerivativeAccumulator self, double const value) -> double"""
3756  return _IMP_kernel.DerivativeAccumulator___call__(self, value)
3757 
3758  def get_weight(self):
3759  r"""get_weight(DerivativeAccumulator self) -> double"""
3760  return _IMP_kernel.DerivativeAccumulator_get_weight(self)
3761 
3762  def show(self, *args):
3763  r"""show(DerivativeAccumulator self, _ostream out=std::cout)"""
3764  return _IMP_kernel.DerivativeAccumulator_show(self, *args)
3765  __swig_destroy__ = _IMP_kernel.delete_DerivativeAccumulator
3766 
3767 # Register DerivativeAccumulator in _IMP_kernel:
3768 _IMP_kernel.DerivativeAccumulator_swigregister(DerivativeAccumulator)
3769 class EvaluationState(object):
3770  r"""Proxy of C++ IMP::EvaluationState class."""
3771 
3772  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3773  score = property(_IMP_kernel.EvaluationState_score_get, _IMP_kernel.EvaluationState_score_set, doc=r"""score : double""")
3774  good = property(_IMP_kernel.EvaluationState_good_get, _IMP_kernel.EvaluationState_good_set, doc=r"""good : bool""")
3775 
3776  def __init__(self, *args):
3777  r"""
3778  __init__(EvaluationState self, double oscore, bool ogood) -> EvaluationState
3779  __init__(EvaluationState self) -> EvaluationState
3780  """
3781  _IMP_kernel.EvaluationState_swiginit(self, _IMP_kernel.new_EvaluationState(*args))
3782 
3783  def show(self, *args):
3784  r"""show(EvaluationState self, _ostream out=std::cout)"""
3785  return _IMP_kernel.EvaluationState_show(self, *args)
3786 
3787  def __str__(self):
3788  r"""__str__(EvaluationState self) -> std::string"""
3789  return _IMP_kernel.EvaluationState___str__(self)
3790 
3791  def __repr__(self):
3792  r"""__repr__(EvaluationState self) -> std::string"""
3793  return _IMP_kernel.EvaluationState___repr__(self)
3794  __swig_destroy__ = _IMP_kernel.delete_EvaluationState
3795 
3796 # Register EvaluationState in _IMP_kernel:
3797 _IMP_kernel.EvaluationState_swigregister(EvaluationState)
3798 class ScoreAccumulator(_Value):
3799  r"""Proxy of C++ IMP::ScoreAccumulator class."""
3800 
3801  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3802 
3803  def __init__(self, *args):
3804  r"""
3805  __init__(ScoreAccumulator self, ScoreAccumulator arg2) -> ScoreAccumulator
3806  __init__(ScoreAccumulator self) -> ScoreAccumulator
3807  __init__(ScoreAccumulator self, ScoreAccumulator o, Restraint r) -> ScoreAccumulator
3808  __init__(ScoreAccumulator self, ScoreAccumulator o, double weight, double local_max) -> ScoreAccumulator
3809  """
3810  _IMP_kernel.ScoreAccumulator_swiginit(self, _IMP_kernel.new_ScoreAccumulator(*args))
3811 
3812  def add_score(self, score):
3813  r"""add_score(ScoreAccumulator self, double score)"""
3814  return _IMP_kernel.ScoreAccumulator_add_score(self, score)
3815 
3816  def get_abort_evaluation(self):
3817  r"""get_abort_evaluation(ScoreAccumulator self) -> bool"""
3818  return _IMP_kernel.ScoreAccumulator_get_abort_evaluation(self)
3819 
3820  def get_is_evaluate_if_below(self):
3821  r"""get_is_evaluate_if_below(ScoreAccumulator self) -> bool"""
3822  return _IMP_kernel.ScoreAccumulator_get_is_evaluate_if_below(self)
3823 
3824  def get_is_evaluate_if_good(self):
3825  r"""get_is_evaluate_if_good(ScoreAccumulator self) -> bool"""
3826  return _IMP_kernel.ScoreAccumulator_get_is_evaluate_if_good(self)
3827 
3828  def get_maximum(self):
3829  r"""get_maximum(ScoreAccumulator self) -> double"""
3830  return _IMP_kernel.ScoreAccumulator_get_maximum(self)
3831 
3832  def get_derivative_accumulator(self):
3833  r"""get_derivative_accumulator(ScoreAccumulator self) -> DerivativeAccumulator"""
3834  return _IMP_kernel.ScoreAccumulator_get_derivative_accumulator(self)
3835 
3836  def show(self, *args):
3837  r"""show(ScoreAccumulator self, _ostream out=std::cout)"""
3838  return _IMP_kernel.ScoreAccumulator_show(self, *args)
3839 
3840  def __str__(self):
3841  r"""__str__(ScoreAccumulator self) -> std::string"""
3842  return _IMP_kernel.ScoreAccumulator___str__(self)
3843 
3844  def __repr__(self):
3845  r"""__repr__(ScoreAccumulator self) -> std::string"""
3846  return _IMP_kernel.ScoreAccumulator___repr__(self)
3847  __swig_destroy__ = _IMP_kernel.delete_ScoreAccumulator
3848 
3849 # Register ScoreAccumulator in _IMP_kernel:
3850 _IMP_kernel.ScoreAccumulator_swigregister(ScoreAccumulator)
3851 class ScoreState(ModelObject):
3852  r"""Proxy of C++ IMP::ScoreState class."""
3853 
3854  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3855 
3856  def set_can_skip(self, can_skip):
3857  r"""set_can_skip(ScoreState self, bool can_skip)"""
3858  return _IMP_kernel.ScoreState_set_can_skip(self, can_skip)
3859 
3860  def __init__(self, *args):
3861  r"""
3862  __init__(ScoreState self, Model m, std::string name) -> ScoreState
3863  __init__(ScoreState self) -> ScoreState
3864  """
3865  if self.__class__ == ScoreState:
3866  _self = None
3867  else:
3868  _self = self
3869  _IMP_kernel.ScoreState_swiginit(self, _IMP_kernel.new_ScoreState(_self, *args))
3870 
3871  if self.__class__ != ScoreState:
3872  _director_objects.register(self)
3873 
3874 
3875 
3876 
3877  def before_evaluate(self):
3878  r"""before_evaluate(ScoreState self)"""
3879  return _IMP_kernel.ScoreState_before_evaluate(self)
3880 
3881  def after_evaluate(self, accpt):
3882  r"""after_evaluate(ScoreState self, DerivativeAccumulator accpt)"""
3883  return _IMP_kernel.ScoreState_after_evaluate(self, accpt)
3884 
3885  def get_can_skip(self):
3886  r"""get_can_skip(ScoreState self) -> bool"""
3887  return _IMP_kernel.ScoreState_get_can_skip(self)
3888 
3889  def get_has_update_order(self):
3890  r"""get_has_update_order(ScoreState self) -> bool"""
3891  return _IMP_kernel.ScoreState_get_has_update_order(self)
3892 
3893  def get_update_order(self):
3894  r"""get_update_order(ScoreState self) -> unsigned int"""
3895  return _IMP_kernel.ScoreState_get_update_order(self)
3896 
3897  def handle_set_has_required_score_states(self, tf):
3898  r"""handle_set_has_required_score_states(ScoreState self, bool tf)"""
3899  return _IMP_kernel.ScoreState_handle_set_has_required_score_states(self, tf)
3900 
3901  def do_before_evaluate(self):
3902  r"""do_before_evaluate(ScoreState self)"""
3903  return _IMP_kernel.ScoreState_do_before_evaluate(self)
3904 
3905  def do_after_evaluate(self, accpt):
3906  r"""do_after_evaluate(ScoreState self, DerivativeAccumulator accpt)"""
3907  return _IMP_kernel.ScoreState_do_after_evaluate(self, accpt)
3908  __swig_destroy__ = _IMP_kernel.delete_ScoreState
3909 
3910  def __str__(self):
3911  r"""__str__(ScoreState self) -> std::string"""
3912  return _IMP_kernel.ScoreState___str__(self)
3913 
3914  def __repr__(self):
3915  r"""__repr__(ScoreState self) -> std::string"""
3916  return _IMP_kernel.ScoreState___repr__(self)
3917 
3918  @staticmethod
3919  def get_from(o):
3920  return _object_cast_to_ScoreState(o)
3921 
3922 
3923  def do_show(self, out):
3924  pass
3925 
3926  @staticmethod
3927  def get_from(o):
3928  return _object_cast_to_ScoreState(o)
3929 
3930 
3931  def _wrap_jax(self, apply_func, keys=None):
3932  """Create the return value for _get_jax.
3933  Use this method in _get_jax() to wrap the JAX apply function
3934  with other model- and ScoreState-specific information.
3935 
3936  @param apply_func A function implemented using JAX that takes
3937  a single argument (the current JAX Model) and returns
3938  a new JAX Model with the ScoreState's transformation
3939  applied.
3940  @param keys If given, a set of IMP::Key objects describing Model
3941  attributes (other than xyz and radius) that the ScoreState
3942  uses.
3943  """
3944  from IMP._jax_util import JAXScoreStateInfo
3945  return JAXScoreStateInfo(m=self.get_model(), apply_func=apply_func,
3946  keys=keys)
3947 
3948  def _get_jax(self):
3949  """Return a JAX implementation of this ScoreState.
3950  Implement this method in a ScoreState subclass to provide
3951  an equivalent function using [JAX](https://docs.jax.dev/)
3952  that modifies the JAX Model. See also _wrap_jax.
3953  """
3954  raise NotImplementedError(f"No JAX implementation for {self}")
3955 
3956  def __disown__(self):
3957  self.this.disown()
3958  _IMP_kernel.disown_ScoreState(self)
3959  return weakref.proxy(self)
3960 
3961  def do_destroy(self):
3962  r"""do_destroy(ScoreState self)"""
3963  return _IMP_kernel.ScoreState_do_destroy(self)
3964 
3965  def do_get_inputs(self):
3966  r"""do_get_inputs(ScoreState self) -> IMP::ModelObjectsTemp"""
3967  return _IMP_kernel.ScoreState_do_get_inputs(self)
3968 
3969  def do_get_outputs(self):
3970  r"""do_get_outputs(ScoreState self) -> IMP::ModelObjectsTemp"""
3971  return _IMP_kernel.ScoreState_do_get_outputs(self)
3972 
3973  def do_get_interactions(self):
3974  r"""do_get_interactions(ScoreState self) -> IMP::ModelObjectsTemps"""
3975  return _IMP_kernel.ScoreState_do_get_interactions(self)
3976 
3977 # Register ScoreState in _IMP_kernel:
3978 _IMP_kernel.ScoreState_swigregister(ScoreState)
3979 
3980 def get_update_order(input):
3981  r"""get_update_order(IMP::ScoreStatesTemp input) -> IMP::ScoreStatesTemp"""
3982  return _IMP_kernel.get_update_order(input)
3983 class Constraint(ScoreState):
3984  r"""Proxy of C++ IMP::Constraint class."""
3985 
3986  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
3987 
3988  def __init__(self, *args):
3989  r"""
3990  __init__(Constraint self, Model m, std::string name="Constraint %1%") -> Constraint
3991  __init__(Constraint self) -> Constraint
3992  """
3993  if self.__class__ == Constraint:
3994  _self = None
3995  else:
3996  _self = self
3997  _IMP_kernel.Constraint_swiginit(self, _IMP_kernel.new_Constraint(_self, *args))
3998 
3999  if self.__class__ != Constraint:
4000  _director_objects.register(self)
4001 
4002 
4003 
4004 
4005  def do_update_attributes(self):
4006  r"""do_update_attributes(Constraint self)"""
4007  return _IMP_kernel.Constraint_do_update_attributes(self)
4008 
4009  def do_update_derivatives(self, da):
4010  r"""do_update_derivatives(Constraint self, DerivativeAccumulator da)"""
4011  return _IMP_kernel.Constraint_do_update_derivatives(self, da)
4012 
4013  def do_before_evaluate(self):
4014  r"""do_before_evaluate(Constraint self)"""
4015  return _IMP_kernel.Constraint_do_before_evaluate(self)
4016 
4017  def do_after_evaluate(self, da):
4018  r"""do_after_evaluate(Constraint self, DerivativeAccumulator da)"""
4019  return _IMP_kernel.Constraint_do_after_evaluate(self, da)
4020  __swig_destroy__ = _IMP_kernel.delete_Constraint
4021 
4022  def __str__(self):
4023  r"""__str__(Constraint self) -> std::string"""
4024  return _IMP_kernel.Constraint___str__(self)
4025 
4026  def __repr__(self):
4027  r"""__repr__(Constraint self) -> std::string"""
4028  return _IMP_kernel.Constraint___repr__(self)
4029 
4030  @staticmethod
4031  def get_from(o):
4032  return _object_cast_to_Constraint(o)
4033 
4034 
4035  def do_show(self, out):
4036  pass
4037 
4038  @staticmethod
4039  def get_from(o):
4040  return _object_cast_to_Constraint(o)
4041 
4042  def __disown__(self):
4043  self.this.disown()
4044  _IMP_kernel.disown_Constraint(self)
4045  return weakref.proxy(self)
4046 
4047  def do_destroy(self):
4048  r"""do_destroy(Constraint self)"""
4049  return _IMP_kernel.Constraint_do_destroy(self)
4050 
4051  def do_get_inputs(self):
4052  r"""do_get_inputs(Constraint self) -> IMP::ModelObjectsTemp"""
4053  return _IMP_kernel.Constraint_do_get_inputs(self)
4054 
4055  def do_get_outputs(self):
4056  r"""do_get_outputs(Constraint self) -> IMP::ModelObjectsTemp"""
4057  return _IMP_kernel.Constraint_do_get_outputs(self)
4058 
4059  def do_get_interactions(self):
4060  r"""do_get_interactions(Constraint self) -> IMP::ModelObjectsTemps"""
4061  return _IMP_kernel.Constraint_do_get_interactions(self)
4062 
4063 # Register Constraint in _IMP_kernel:
4064 _IMP_kernel.Constraint_swigregister(Constraint)
4065 class Container(ModelObject):
4066  r"""Proxy of C++ IMP::Container class."""
4067 
4068  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4069 
4070  def __init__(self, *args):
4071  r"""
4072  __init__(Container self, Model m, std::string name="Container %1%") -> Container
4073  __init__(Container self) -> Container
4074  """
4075  if self.__class__ == Container:
4076  _self = None
4077  else:
4078  _self = self
4079  _IMP_kernel.Container_swiginit(self, _IMP_kernel.new_Container(_self, *args))
4080 
4081  if self.__class__ != Container:
4082  _director_objects.register(self)
4083 
4084 
4085 
4086 
4087  def do_get_contents_hash(self):
4088  r"""do_get_contents_hash(Container self) -> std::size_t"""
4089  return _IMP_kernel.Container_do_get_contents_hash(self)
4090 
4091  def get_all_possible_indexes(self):
4092  r"""get_all_possible_indexes(Container self) -> IMP::ParticleIndexes"""
4093  return _IMP_kernel.Container_get_all_possible_indexes(self)
4094 
4095  def get_contents_hash(self):
4096  r"""get_contents_hash(Container self) -> std::size_t"""
4097  return _IMP_kernel.Container_get_contents_hash(self)
4098 
4099  def do_get_outputs(self):
4100  r"""do_get_outputs(Container self) -> IMP::ModelObjectsTemp"""
4101  return _IMP_kernel.Container_do_get_outputs(self)
4102 
4103  def get_is_decomposable(self):
4104  r"""get_is_decomposable(Container self) -> bool"""
4105  return _IMP_kernel.Container_get_is_decomposable(self)
4106 
4107  def validate_readable(self):
4108  r"""validate_readable(Container self)"""
4109  return _IMP_kernel.Container_validate_readable(self)
4110 
4111  def validate_writable(self):
4112  r"""validate_writable(Container self)"""
4113  return _IMP_kernel.Container_validate_writable(self)
4114 
4115  def set_is_readable(self, tf):
4116  r"""set_is_readable(Container self, bool tf)"""
4117  return _IMP_kernel.Container_set_is_readable(self, tf)
4118 
4119  def set_is_writable(self, tf):
4120  r"""set_is_writable(Container self, bool tf)"""
4121  return _IMP_kernel.Container_set_is_writable(self, tf)
4122  __swig_destroy__ = _IMP_kernel.delete_Container
4123 
4124  def __str__(self):
4125  r"""__str__(Container self) -> std::string"""
4126  return _IMP_kernel.Container___str__(self)
4127 
4128  def __repr__(self):
4129  r"""__repr__(Container self) -> std::string"""
4130  return _IMP_kernel.Container___repr__(self)
4131 
4132  @staticmethod
4133  def get_from(o):
4134  return _object_cast_to_Container(o)
4135 
4136 
4137  def do_show(self, out):
4138  pass
4139 
4140  @staticmethod
4141  def get_from(o):
4142  return _object_cast_to_Container(o)
4143 
4144  def __disown__(self):
4145  self.this.disown()
4146  _IMP_kernel.disown_Container(self)
4147  return weakref.proxy(self)
4148 
4149  def do_destroy(self):
4150  r"""do_destroy(Container self)"""
4151  return _IMP_kernel.Container_do_destroy(self)
4152 
4153  def handle_set_has_required_score_states(self, arg0):
4154  r"""handle_set_has_required_score_states(Container self, bool arg0)"""
4155  return _IMP_kernel.Container_handle_set_has_required_score_states(self, arg0)
4156 
4157  def do_get_inputs(self):
4158  r"""do_get_inputs(Container self) -> IMP::ModelObjectsTemp"""
4159  return _IMP_kernel.Container_do_get_inputs(self)
4160 
4161  def do_get_interactions(self):
4162  r"""do_get_interactions(Container self) -> IMP::ModelObjectsTemps"""
4163  return _IMP_kernel.Container_do_get_interactions(self)
4164 
4165 # Register Container in _IMP_kernel:
4166 _IMP_kernel.Container_swigregister(Container)
4167 class RestraintInfo(Object):
4168  r"""Proxy of C++ IMP::RestraintInfo class."""
4169 
4170  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4171 
4172  def __init__(self, *args):
4173  r"""__init__(RestraintInfo self, std::string name="RestraintInfo %1%") -> RestraintInfo"""
4174  _IMP_kernel.RestraintInfo_swiginit(self, _IMP_kernel.new_RestraintInfo(*args))
4175 
4176  def clear(self):
4177  r"""clear(RestraintInfo self)"""
4178  return _IMP_kernel.RestraintInfo_clear(self)
4179 
4180  def add_int(self, key, value):
4181  r"""add_int(RestraintInfo self, std::string key, int value)"""
4182  return _IMP_kernel.RestraintInfo_add_int(self, key, value)
4183 
4184  def get_number_of_int(self):
4185  r"""get_number_of_int(RestraintInfo self) -> unsigned int"""
4186  return _IMP_kernel.RestraintInfo_get_number_of_int(self)
4187 
4188  def get_int_key(self, i):
4189  r"""get_int_key(RestraintInfo self, unsigned int i) -> std::string"""
4190  return _IMP_kernel.RestraintInfo_get_int_key(self, i)
4191 
4192  def get_int_value(self, i):
4193  r"""get_int_value(RestraintInfo self, unsigned int i) -> int"""
4194  return _IMP_kernel.RestraintInfo_get_int_value(self, i)
4195 
4196  def add_float(self, key, value):
4197  r"""add_float(RestraintInfo self, std::string key, double value)"""
4198  return _IMP_kernel.RestraintInfo_add_float(self, key, value)
4199 
4200  def get_number_of_float(self):
4201  r"""get_number_of_float(RestraintInfo self) -> unsigned int"""
4202  return _IMP_kernel.RestraintInfo_get_number_of_float(self)
4203 
4204  def get_float_key(self, i):
4205  r"""get_float_key(RestraintInfo self, unsigned int i) -> std::string"""
4206  return _IMP_kernel.RestraintInfo_get_float_key(self, i)
4207 
4208  def get_float_value(self, i):
4209  r"""get_float_value(RestraintInfo self, unsigned int i) -> double"""
4210  return _IMP_kernel.RestraintInfo_get_float_value(self, i)
4211 
4212  def add_string(self, key, value):
4213  r"""add_string(RestraintInfo self, std::string key, std::string value)"""
4214  return _IMP_kernel.RestraintInfo_add_string(self, key, value)
4215 
4216  def get_number_of_string(self):
4217  r"""get_number_of_string(RestraintInfo self) -> unsigned int"""
4218  return _IMP_kernel.RestraintInfo_get_number_of_string(self)
4219 
4220  def get_string_key(self, i):
4221  r"""get_string_key(RestraintInfo self, unsigned int i) -> std::string"""
4222  return _IMP_kernel.RestraintInfo_get_string_key(self, i)
4223 
4224  def get_string_value(self, i):
4225  r"""get_string_value(RestraintInfo self, unsigned int i) -> std::string"""
4226  return _IMP_kernel.RestraintInfo_get_string_value(self, i)
4227 
4228  def add_filename(self, key, value):
4229  r"""add_filename(RestraintInfo self, std::string key, std::string value)"""
4230  return _IMP_kernel.RestraintInfo_add_filename(self, key, value)
4231 
4232  def get_number_of_filename(self):
4233  r"""get_number_of_filename(RestraintInfo self) -> unsigned int"""
4234  return _IMP_kernel.RestraintInfo_get_number_of_filename(self)
4235 
4236  def get_filename_key(self, i):
4237  r"""get_filename_key(RestraintInfo self, unsigned int i) -> std::string"""
4238  return _IMP_kernel.RestraintInfo_get_filename_key(self, i)
4239 
4240  def get_filename_value(self, i):
4241  r"""get_filename_value(RestraintInfo self, unsigned int i) -> std::string"""
4242  return _IMP_kernel.RestraintInfo_get_filename_value(self, i)
4243 
4244  def add_floats(self, key, value):
4245  r"""add_floats(RestraintInfo self, std::string key, IMP::Floats value)"""
4246  return _IMP_kernel.RestraintInfo_add_floats(self, key, value)
4247 
4248  def get_number_of_floats(self):
4249  r"""get_number_of_floats(RestraintInfo self) -> unsigned int"""
4250  return _IMP_kernel.RestraintInfo_get_number_of_floats(self)
4251 
4252  def get_floats_key(self, i):
4253  r"""get_floats_key(RestraintInfo self, unsigned int i) -> std::string"""
4254  return _IMP_kernel.RestraintInfo_get_floats_key(self, i)
4255 
4256  def get_floats_value(self, i):
4257  r"""get_floats_value(RestraintInfo self, unsigned int i) -> IMP::Floats"""
4258  return _IMP_kernel.RestraintInfo_get_floats_value(self, i)
4259 
4260  def add_ints(self, key, value):
4261  r"""add_ints(RestraintInfo self, std::string key, IMP::Ints value)"""
4262  return _IMP_kernel.RestraintInfo_add_ints(self, key, value)
4263 
4264  def get_number_of_ints(self):
4265  r"""get_number_of_ints(RestraintInfo self) -> unsigned int"""
4266  return _IMP_kernel.RestraintInfo_get_number_of_ints(self)
4267 
4268  def get_ints_key(self, i):
4269  r"""get_ints_key(RestraintInfo self, unsigned int i) -> std::string"""
4270  return _IMP_kernel.RestraintInfo_get_ints_key(self, i)
4271 
4272  def get_ints_value(self, i):
4273  r"""get_ints_value(RestraintInfo self, unsigned int i) -> IMP::Ints"""
4274  return _IMP_kernel.RestraintInfo_get_ints_value(self, i)
4275 
4276  def add_strings(self, key, value):
4277  r"""add_strings(RestraintInfo self, std::string key, IMP::Strings value)"""
4278  return _IMP_kernel.RestraintInfo_add_strings(self, key, value)
4279 
4280  def get_number_of_strings(self):
4281  r"""get_number_of_strings(RestraintInfo self) -> unsigned int"""
4282  return _IMP_kernel.RestraintInfo_get_number_of_strings(self)
4283 
4284  def get_strings_key(self, i):
4285  r"""get_strings_key(RestraintInfo self, unsigned int i) -> std::string"""
4286  return _IMP_kernel.RestraintInfo_get_strings_key(self, i)
4287 
4288  def get_strings_value(self, i):
4289  r"""get_strings_value(RestraintInfo self, unsigned int i) -> IMP::Strings"""
4290  return _IMP_kernel.RestraintInfo_get_strings_value(self, i)
4291 
4292  def add_filenames(self, key, value):
4293  r"""add_filenames(RestraintInfo self, std::string key, IMP::Strings value)"""
4294  return _IMP_kernel.RestraintInfo_add_filenames(self, key, value)
4295 
4296  def get_number_of_filenames(self):
4297  r"""get_number_of_filenames(RestraintInfo self) -> unsigned int"""
4298  return _IMP_kernel.RestraintInfo_get_number_of_filenames(self)
4299 
4300  def get_filenames_key(self, i):
4301  r"""get_filenames_key(RestraintInfo self, unsigned int i) -> std::string"""
4302  return _IMP_kernel.RestraintInfo_get_filenames_key(self, i)
4303 
4304  def get_filenames_value(self, i):
4305  r"""get_filenames_value(RestraintInfo self, unsigned int i) -> IMP::Strings"""
4306  return _IMP_kernel.RestraintInfo_get_filenames_value(self, i)
4307 
4308  def add_particle_indexes(self, key, value):
4309  r"""add_particle_indexes(RestraintInfo self, std::string key, IMP::ParticleIndexes value)"""
4310  return _IMP_kernel.RestraintInfo_add_particle_indexes(self, key, value)
4311 
4312  def get_number_of_particle_indexes(self):
4313  r"""get_number_of_particle_indexes(RestraintInfo self) -> unsigned int"""
4314  return _IMP_kernel.RestraintInfo_get_number_of_particle_indexes(self)
4315 
4316  def get_particle_indexes_key(self, i):
4317  r"""get_particle_indexes_key(RestraintInfo self, unsigned int i) -> std::string"""
4318  return _IMP_kernel.RestraintInfo_get_particle_indexes_key(self, i)
4319 
4320  def get_particle_indexes_value(self, i):
4321  r"""get_particle_indexes_value(RestraintInfo self, unsigned int i) -> IMP::ParticleIndexes"""
4322  return _IMP_kernel.RestraintInfo_get_particle_indexes_value(self, i)
4323 
4324  def get_version_info(self):
4325  r"""get_version_info(RestraintInfo self) -> VersionInfo"""
4326  return _IMP_kernel.RestraintInfo_get_version_info(self)
4327  __swig_destroy__ = _IMP_kernel.delete_RestraintInfo
4328 
4329  def __str__(self):
4330  r"""__str__(RestraintInfo self) -> std::string"""
4331  return _IMP_kernel.RestraintInfo___str__(self)
4332 
4333  def __repr__(self):
4334  r"""__repr__(RestraintInfo self) -> std::string"""
4335  return _IMP_kernel.RestraintInfo___repr__(self)
4336 
4337  @staticmethod
4338  def get_from(o):
4339  return _object_cast_to_RestraintInfo(o)
4340 
4341 
4342 # Register RestraintInfo in _IMP_kernel:
4343 _IMP_kernel.RestraintInfo_swigregister(RestraintInfo)
4344 class Restraint(ModelObject):
4345  r"""Proxy of C++ IMP::Restraint class."""
4346 
4347  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4348 
4349  def __init__(self, *args):
4350  r"""
4351  __init__(Restraint self, Model m, std::string name) -> Restraint
4352  __init__(Restraint self) -> Restraint
4353  """
4354  if self.__class__ == Restraint:
4355  _self = None
4356  else:
4357  _self = self
4358  _IMP_kernel.Restraint_swiginit(self, _IMP_kernel.new_Restraint(_self, *args))
4359 
4360  if self.__class__ != Restraint:
4361  _director_objects.register(self)
4362 
4363 
4364 
4365 
4366  def get_score(self):
4367  r"""get_score(Restraint self) -> double"""
4368  return _IMP_kernel.Restraint_get_score(self)
4369 
4370  def evaluate(self, calc_derivs):
4371  r"""evaluate(Restraint self, bool calc_derivs) -> double"""
4372  return _IMP_kernel.Restraint_evaluate(self, calc_derivs)
4373 
4374  def evaluate_moved(self, calc_derivs, moved_pis, reset_pis):
4375  r"""evaluate_moved(Restraint self, bool calc_derivs, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis) -> double"""
4376  return _IMP_kernel.Restraint_evaluate_moved(self, calc_derivs, moved_pis, reset_pis)
4377 
4378  def evaluate_moved_if_below(self, calc_derivatives, moved_pis, reset_pis, max):
4379  r"""evaluate_moved_if_below(Restraint self, bool calc_derivatives, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis, double max) -> double"""
4380  return _IMP_kernel.Restraint_evaluate_moved_if_below(self, calc_derivatives, moved_pis, reset_pis, max)
4381 
4382  def evaluate_moved_if_good(self, calc_derivatives, moved_pis, reset_pis):
4383  r"""evaluate_moved_if_good(Restraint self, bool calc_derivatives, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis) -> double"""
4384  return _IMP_kernel.Restraint_evaluate_moved_if_good(self, calc_derivatives, moved_pis, reset_pis)
4385 
4386  def evaluate_if_good(self, calc_derivatives):
4387  r"""evaluate_if_good(Restraint self, bool calc_derivatives) -> double"""
4388  return _IMP_kernel.Restraint_evaluate_if_good(self, calc_derivatives)
4389 
4390  def evaluate_if_below(self, calc_derivatives, max):
4391  r"""evaluate_if_below(Restraint self, bool calc_derivatives, double max) -> double"""
4392  return _IMP_kernel.Restraint_evaluate_if_below(self, calc_derivatives, max)
4393 
4394  def unprotected_evaluate(self, da):
4395  r"""unprotected_evaluate(Restraint self, DerivativeAccumulator da) -> double"""
4396  return _IMP_kernel.Restraint_unprotected_evaluate(self, da)
4397 
4398  def unprotected_evaluate_moved(self, da, moved_pis, reset_pis):
4399  r"""unprotected_evaluate_moved(Restraint self, DerivativeAccumulator da, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis) -> double"""
4400  return _IMP_kernel.Restraint_unprotected_evaluate_moved(self, da, moved_pis, reset_pis)
4401 
4402  def unprotected_evaluate_if_good(self, da, max):
4403  r"""unprotected_evaluate_if_good(Restraint self, DerivativeAccumulator da, double max) -> double"""
4404  return _IMP_kernel.Restraint_unprotected_evaluate_if_good(self, da, max)
4405 
4406  def unprotected_evaluate_if_below(self, da, max):
4407  r"""unprotected_evaluate_if_below(Restraint self, DerivativeAccumulator da, double max) -> double"""
4408  return _IMP_kernel.Restraint_unprotected_evaluate_if_below(self, da, max)
4409 
4410  def unprotected_evaluate_moved_if_below(self, da, moved_pis, reset_pis, max):
4411  r"""unprotected_evaluate_moved_if_below(Restraint self, DerivativeAccumulator da, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis, double max) -> double"""
4412  return _IMP_kernel.Restraint_unprotected_evaluate_moved_if_below(self, da, moved_pis, reset_pis, max)
4413 
4414  def unprotected_evaluate_moved_if_good(self, da, moved_pis, reset_pis, max):
4415  r"""unprotected_evaluate_moved_if_good(Restraint self, DerivativeAccumulator da, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis, double max) -> double"""
4416  return _IMP_kernel.Restraint_unprotected_evaluate_moved_if_good(self, da, moved_pis, reset_pis, max)
4417 
4418  def get_static_info(self):
4419  r"""get_static_info(Restraint self) -> RestraintInfo"""
4420  return _IMP_kernel.Restraint_get_static_info(self)
4421 
4422  def get_dynamic_info(self):
4423  r"""get_dynamic_info(Restraint self) -> RestraintInfo"""
4424  return _IMP_kernel.Restraint_get_dynamic_info(self)
4425 
4426  def add_score_and_derivatives(self, sa):
4427  r"""add_score_and_derivatives(Restraint self, ScoreAccumulator sa)"""
4428  return _IMP_kernel.Restraint_add_score_and_derivatives(self, sa)
4429 
4430  def add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis):
4431  r"""add_score_and_derivatives_moved(Restraint self, ScoreAccumulator sa, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
4432  return _IMP_kernel.Restraint_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis)
4433 
4434  def create_decomposition(self):
4435  r"""create_decomposition(Restraint self) -> Restraint"""
4436  return _IMP_kernel.Restraint_create_decomposition(self)
4437 
4438  def create_current_decomposition(self):
4439  r"""create_current_decomposition(Restraint self) -> Restraint"""
4440  return _IMP_kernel.Restraint_create_current_decomposition(self)
4441 
4442  def set_weight(self, weight):
4443  r"""set_weight(Restraint self, IMP::Float weight)"""
4444  return _IMP_kernel.Restraint_set_weight(self, weight)
4445 
4446  def get_weight(self):
4447  r"""get_weight(Restraint self) -> IMP::Float"""
4448  return _IMP_kernel.Restraint_get_weight(self)
4449 
4450  def get_maximum_score(self):
4451  r"""get_maximum_score(Restraint self) -> double"""
4452  return _IMP_kernel.Restraint_get_maximum_score(self)
4453 
4454  def set_maximum_score(self, s):
4455  r"""set_maximum_score(Restraint self, double s)"""
4456  return _IMP_kernel.Restraint_set_maximum_score(self, s)
4457 
4458  def create_scoring_function(self, *args):
4459  r"""create_scoring_function(Restraint self, double weight=1.0, double max=NO_MAX) -> ScoringFunction"""
4460  return _IMP_kernel.Restraint_create_scoring_function(self, *args)
4461 
4462  def set_last_score(self, s):
4463  r"""set_last_score(Restraint self, double s)"""
4464  return _IMP_kernel.Restraint_set_last_score(self, s)
4465 
4466  def set_last_last_score(self, s):
4467  r"""set_last_last_score(Restraint self, double s)"""
4468  return _IMP_kernel.Restraint_set_last_last_score(self, s)
4469 
4470  def get_last_score(self):
4471  r"""get_last_score(Restraint self) -> double"""
4472  return _IMP_kernel.Restraint_get_last_score(self)
4473 
4474  def get_last_last_score(self):
4475  r"""get_last_last_score(Restraint self) -> double"""
4476  return _IMP_kernel.Restraint_get_last_last_score(self)
4477 
4478  def get_is_aggregate(self):
4479  r"""get_is_aggregate(Restraint self) -> bool"""
4480  return _IMP_kernel.Restraint_get_is_aggregate(self)
4481 
4482  def get_was_good(self):
4483  r"""get_was_good(Restraint self) -> bool"""
4484  return _IMP_kernel.Restraint_get_was_good(self)
4485  __swig_destroy__ = _IMP_kernel.delete_Restraint
4486 
4487  def do_create_decomposition(self):
4488  r"""do_create_decomposition(Restraint self) -> IMP::Restraints"""
4489  return _IMP_kernel.Restraint_do_create_decomposition(self)
4490 
4491  def do_create_current_decomposition(self):
4492  r"""do_create_current_decomposition(Restraint self) -> IMP::Restraints"""
4493  return _IMP_kernel.Restraint_do_create_current_decomposition(self)
4494 
4495  def do_add_score_and_derivatives(self, sa):
4496  r"""do_add_score_and_derivatives(Restraint self, ScoreAccumulator sa)"""
4497  return _IMP_kernel.Restraint_do_add_score_and_derivatives(self, sa)
4498 
4499  def do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis):
4500  r"""do_add_score_and_derivatives_moved(Restraint self, ScoreAccumulator sa, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
4501  return _IMP_kernel.Restraint_do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis)
4502 
4503  def do_get_outputs(self):
4504  r"""do_get_outputs(Restraint self) -> IMP::ModelObjectsTemp"""
4505  return _IMP_kernel.Restraint_do_get_outputs(self)
4506  is_aggregate_ = property(_IMP_kernel.Restraint_is_aggregate__get, _IMP_kernel.Restraint_is_aggregate__set, doc=r"""is_aggregate_ : bool""")
4507 
4508  def __str__(self):
4509  r"""__str__(Restraint self) -> std::string"""
4510  return _IMP_kernel.Restraint___str__(self)
4511 
4512  def __repr__(self):
4513  r"""__repr__(Restraint self) -> std::string"""
4514  return _IMP_kernel.Restraint___repr__(self)
4515 
4516  @staticmethod
4517  def get_from(o):
4518  return _object_cast_to_Restraint(o)
4519 
4520 
4521  def do_show(self, out):
4522  pass
4523 
4524  @staticmethod
4525  def get_from(o):
4526  return _object_cast_to_Restraint(o)
4527 
4528 
4529  def _wrap_jax(self, score_func, keys=None):
4530  """Create the return value for _get_jax.
4531  Use this method in _get_jax() to wrap the JAX scoring function
4532  with other model- and restraint-specific information.
4533 
4534  @param score_func A function implemented using JAX that takes
4535  a single argument (the current JAX Model) and returns
4536  the score of the restraint.
4537  @param keys If given, a set of IMP::Key objects describing Model
4538  attributes (other than xyz and radius) that the restraint
4539  uses. For example, a restraint that uses electrostatic charge
4540  would pass IMP::atom::Charged::get_charge_key() here.
4541  """
4542  from IMP._jax_util import JAXRestraintInfo
4543  return JAXRestraintInfo(m=self.get_model(), score_func=score_func,
4544  weight=self.get_weight(), keys=keys)
4545 
4546  def _get_jax(self):
4547  """Return a JAX implementation of this Restraint.
4548  Implement this method in a Restraint subclass to provide
4549  an equivalent function using [JAX](https://docs.jax.dev/)
4550  that scores the current JAX Model. See also _wrap_jax.
4551  """
4552  raise NotImplementedError(f"No JAX implementation for {self}")
4553 
4554  def _evaluate_jax(self):
4555  """Similar to evaluate(False), but using JAX.
4556  This is intended to be useful for testing purposes. It will likely
4557  not be particularly fast as it will copy the IMP Model and
4558  jax.jit-compile the scoring function each time."""
4559  import jax
4560  ji = self._get_jax()
4561  jm = ji.get_jax_model()
4562  j = jax.jit(ji.score_func)
4563  return j(jm)
4564 
4565  def __disown__(self):
4566  self.this.disown()
4567  _IMP_kernel.disown_Restraint(self)
4568  return weakref.proxy(self)
4569 
4570  def do_destroy(self):
4571  r"""do_destroy(Restraint self)"""
4572  return _IMP_kernel.Restraint_do_destroy(self)
4573 
4574  def handle_set_has_required_score_states(self, arg0):
4575  r"""handle_set_has_required_score_states(Restraint self, bool arg0)"""
4576  return _IMP_kernel.Restraint_handle_set_has_required_score_states(self, arg0)
4577 
4578  def do_get_inputs(self):
4579  r"""do_get_inputs(Restraint self) -> IMP::ModelObjectsTemp"""
4580  return _IMP_kernel.Restraint_do_get_inputs(self)
4581 
4582  def do_get_interactions(self):
4583  r"""do_get_interactions(Restraint self) -> IMP::ModelObjectsTemps"""
4584  return _IMP_kernel.Restraint_do_get_interactions(self)
4585 
4586 # Register Restraint in _IMP_kernel:
4587 _IMP_kernel.Restraint_swigregister(Restraint)
4588 class _RestraintsAdaptor(_InputAdaptor):
4589  r"""Proxy of C++ IMP::RestraintsAdaptor class."""
4590 
4591  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4592  __repr__ = _swig_repr
4593 
4594  def __init__(self, *args):
4595  r"""
4596  __init__(_RestraintsAdaptor self) -> _RestraintsAdaptor
4597  __init__(_RestraintsAdaptor self, IMP::Restraints const & sf) -> _RestraintsAdaptor
4598  __init__(_RestraintsAdaptor self, IMP::RestraintsTemp const & sf) -> _RestraintsAdaptor
4599  __init__(_RestraintsAdaptor self, Restraint sf) -> _RestraintsAdaptor
4600  """
4601  _IMP_kernel._RestraintsAdaptor_swiginit(self, _IMP_kernel.new__RestraintsAdaptor(*args))
4602  __swig_destroy__ = _IMP_kernel.delete__RestraintsAdaptor
4603 
4604 # Register _RestraintsAdaptor in _IMP_kernel:
4605 _IMP_kernel._RestraintsAdaptor_swigregister(_RestraintsAdaptor)
4606 class RestraintSet(Restraint):
4607  r"""Proxy of C++ IMP::RestraintSet class."""
4608 
4609  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4610 
4611  def __init__(self, *args):
4612  r"""
4613  __init__(RestraintSet self, Model m, double weight, std::string const & name="RestraintSet %1%") -> RestraintSet
4614  __init__(RestraintSet self, Model m, std::string const & name="RestraintSet %1%") -> RestraintSet
4615  __init__(RestraintSet self, IMP::RestraintsTemp const & rs, double weight, std::string const & name="RestraintSet %1%") -> RestraintSet
4616  __init__(RestraintSet self) -> RestraintSet
4617  """
4618  if self.__class__ == RestraintSet:
4619  _self = None
4620  else:
4621  _self = self
4622  _IMP_kernel.RestraintSet_swiginit(self, _IMP_kernel.new_RestraintSet(_self, *args))
4623 
4624  if self.__class__ != RestraintSet:
4625  _director_objects.register(self)
4626 
4627 
4628 
4629 
4630  def unprotected_evaluate(self, da):
4631  r"""unprotected_evaluate(RestraintSet self, DerivativeAccumulator da) -> double"""
4632  return _IMP_kernel.RestraintSet_unprotected_evaluate(self, da)
4633 
4634  def get_type_name(self):
4635  r"""get_type_name(RestraintSet self) -> std::string"""
4636  return _IMP_kernel.RestraintSet_get_type_name(self)
4637 
4638  def get_version_info(self):
4639  r"""get_version_info(RestraintSet self) -> VersionInfo"""
4640  return _IMP_kernel.RestraintSet_get_version_info(self)
4641  __swig_destroy__ = _IMP_kernel.delete_RestraintSet
4642  def __get_restraints(self): return _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)
4643  def __set_restraints(self, obj): _list_util.set_varlist(self.restraints, obj)
4644  def __del_restraints(self): _list_util.del_varlist(self.restraints)
4645  restraints = property(__get_restraints, __set_restraints, __del_restraints, doc="List of ##ucnames")
4646 
4647  def remove_restraint(self, d):
4648  r"""remove_restraint(RestraintSet self, Restraint d)"""
4649  return _IMP_kernel.RestraintSet_remove_restraint(self, d)
4650 
4651  def _python_index_restraint(self, d, start, stop):
4652  r"""_python_index_restraint(RestraintSet self, Restraint d, unsigned int start, unsigned int stop) -> unsigned int"""
4653  return _IMP_kernel.RestraintSet__python_index_restraint(self, d, start, stop)
4654 
4655  def remove_restraints(self, d):
4656  r"""remove_restraints(RestraintSet self, IMP::Restraints const & d)"""
4657  return _IMP_kernel.RestraintSet_remove_restraints(self, d)
4658 
4659  def set_restraints(self, ps):
4660  r"""set_restraints(RestraintSet self, IMP::Restraints const & ps)"""
4661  return _IMP_kernel.RestraintSet_set_restraints(self, ps)
4662 
4663  def set_restraints_order(self, objs):
4664  r"""set_restraints_order(RestraintSet self, IMP::Restraints const & objs)"""
4665  return _IMP_kernel.RestraintSet_set_restraints_order(self, objs)
4666 
4667  def add_restraint(self, obj):
4668  r"""add_restraint(RestraintSet self, Restraint obj) -> unsigned int"""
4669  return _IMP_kernel.RestraintSet_add_restraint(self, obj)
4670 
4671  def add_restraints(self, objs):
4672  r"""add_restraints(RestraintSet self, IMP::Restraints const & objs)"""
4673  return _IMP_kernel.RestraintSet_add_restraints(self, objs)
4674 
4675  def clear_restraints(self):
4676  r"""clear_restraints(RestraintSet self)"""
4677  return _IMP_kernel.RestraintSet_clear_restraints(self)
4678 
4679  def get_number_of_restraints(self):
4680  r"""get_number_of_restraints(RestraintSet self) -> unsigned int"""
4681  return _IMP_kernel.RestraintSet_get_number_of_restraints(self)
4682 
4683  def get_has_restraints(self):
4684  r"""get_has_restraints(RestraintSet self) -> bool"""
4685  return _IMP_kernel.RestraintSet_get_has_restraints(self)
4686 
4687  def get_restraint(self, i):
4688  r"""get_restraint(RestraintSet self, unsigned int i) -> Restraint"""
4689  return _IMP_kernel.RestraintSet_get_restraint(self, i)
4690 
4691  def get_restraints(self):
4692  r"""get_restraints(RestraintSet self) -> IMP::Restraints"""
4693  return _IMP_kernel.RestraintSet_get_restraints(self)
4694 
4695  def erase_restraint(self, i):
4696  r"""erase_restraint(RestraintSet self, unsigned int i)"""
4697  return _IMP_kernel.RestraintSet_erase_restraint(self, i)
4698 
4699  def reserve_restraints(self, sz):
4700  r"""reserve_restraints(RestraintSet self, unsigned int sz)"""
4701  return _IMP_kernel.RestraintSet_reserve_restraints(self, sz)
4702 
4703  def get_non_sets_and_sets(self):
4704  r"""get_non_sets_and_sets(RestraintSet self) -> std::pair< IMP::RestraintsTemp,IMP::RestraintSetsTemp >"""
4705  return _IMP_kernel.RestraintSet_get_non_sets_and_sets(self)
4706 
4707  def do_get_inputs(self):
4708  r"""do_get_inputs(RestraintSet self) -> IMP::ModelObjectsTemp"""
4709  return _IMP_kernel.RestraintSet_do_get_inputs(self)
4710 
4711  def create_scoring_function(self, *args):
4712  r"""create_scoring_function(RestraintSet self, double weight=1.0, double max=std::numeric_limits< double >::max()) -> ScoringFunction"""
4713  return _IMP_kernel.RestraintSet_create_scoring_function(self, *args)
4714 
4715  def get_last_score(self):
4716  r"""get_last_score(RestraintSet self) -> double"""
4717  return _IMP_kernel.RestraintSet_get_last_score(self)
4718 
4719  def __str__(self):
4720  r"""__str__(RestraintSet self) -> std::string"""
4721  return _IMP_kernel.RestraintSet___str__(self)
4722 
4723  def __repr__(self):
4724  r"""__repr__(RestraintSet self) -> std::string"""
4725  return _IMP_kernel.RestraintSet___repr__(self)
4726 
4727  @staticmethod
4728  def get_from(o):
4729  return _object_cast_to_RestraintSet(o)
4730 
4731 
4732  def do_show(self, out):
4733  pass
4734 
4735  @staticmethod
4736  def get_from(o):
4737  return _object_cast_to_RestraintSet(o)
4738 
4739 
4740  def _get_as_binary(self):
4741  r"""_get_as_binary(RestraintSet self) -> PyObject *"""
4742  return _IMP_kernel.RestraintSet__get_as_binary(self)
4743 
4744  def _set_from_binary(self, p):
4745  r"""_set_from_binary(RestraintSet self, PyObject * p)"""
4746  return _IMP_kernel.RestraintSet__set_from_binary(self, p)
4747 
4748  def __getstate__(self):
4749  p = self._get_as_binary()
4750  if len(self.__dict__) > 1:
4751  d = self.__dict__.copy()
4752  del d['this']
4753  p = (d, p)
4754  return p
4755 
4756  def __setstate__(self, p):
4757  if not hasattr(self, 'this'):
4758  self.__init__()
4759  if isinstance(p, tuple):
4760  d, p = p
4761  self.__dict__.update(d)
4762  return self._set_from_binary(p)
4763 
4764 
4765  def _get_jax(self):
4766  jis = [r.get_derived_object()._get_jax() for r in self.restraints]
4767  funcs = [j.score_func for j in jis]
4768  keys = frozenset(x for j in jis for x in j._keys)
4769  def jax_sf(jm):
4770  if funcs:
4771  return sum(f(jm) for f in funcs)
4772  else:
4773  # sum([]) returns int, but we must return float
4774  return 0.
4775  return self._wrap_jax(jax_sf, keys=keys)
4776 
4777  def __disown__(self):
4778  self.this.disown()
4779  _IMP_kernel.disown_RestraintSet(self)
4780  return weakref.proxy(self)
4781 
4782  def do_destroy(self):
4783  r"""do_destroy(RestraintSet self)"""
4784  return _IMP_kernel.RestraintSet_do_destroy(self)
4785 
4786  def handle_set_has_required_score_states(self, arg0):
4787  r"""handle_set_has_required_score_states(RestraintSet self, bool arg0)"""
4788  return _IMP_kernel.RestraintSet_handle_set_has_required_score_states(self, arg0)
4789 
4790  def do_get_outputs(self):
4791  r"""do_get_outputs(RestraintSet self) -> IMP::ModelObjectsTemp"""
4792  return _IMP_kernel.RestraintSet_do_get_outputs(self)
4793 
4794  def do_get_interactions(self):
4795  r"""do_get_interactions(RestraintSet self) -> IMP::ModelObjectsTemps"""
4796  return _IMP_kernel.RestraintSet_do_get_interactions(self)
4797 
4798  def do_create_decomposition(self):
4799  r"""do_create_decomposition(RestraintSet self) -> IMP::Restraints"""
4800  return _IMP_kernel.RestraintSet_do_create_decomposition(self)
4801 
4802  def do_create_current_decomposition(self):
4803  r"""do_create_current_decomposition(RestraintSet self) -> IMP::Restraints"""
4804  return _IMP_kernel.RestraintSet_do_create_current_decomposition(self)
4805 
4806  def do_add_score_and_derivatives(self, sa):
4807  r"""do_add_score_and_derivatives(RestraintSet self, ScoreAccumulator sa)"""
4808  return _IMP_kernel.RestraintSet_do_add_score_and_derivatives(self, sa)
4809 
4810  def do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis):
4811  r"""do_add_score_and_derivatives_moved(RestraintSet self, ScoreAccumulator sa, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
4812  return _IMP_kernel.RestraintSet_do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis)
4813 
4814 # Register RestraintSet in _IMP_kernel:
4815 _IMP_kernel.RestraintSet_swigregister(RestraintSet)
4816 
4817 def get_restraints(rs):
4818  r"""get_restraints(IMP::RestraintsTemp const & rs) -> IMP::RestraintsTemp"""
4819  return _IMP_kernel.get_restraints(rs)
4820 
4821 def _check_particle(p, a):
4822  if (not p.get_is_active()):
4823  raise ValueError("Inactive Particle")
4824  if (type(a)() == a):
4825  raise IndexError("Cannot use default Index")
4826  if (not p.has_attribute(a)):
4827  raise IndexError("Particle does not have attribute")
4828 
4829 class Particle(ModelObject):
4830  r"""Proxy of C++ IMP::Particle class."""
4831 
4832  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
4833 
4834  def get_version_info(self):
4835  r"""get_version_info(Particle self) -> VersionInfo"""
4836  return _IMP_kernel.Particle_get_version_info(self)
4837  __swig_destroy__ = _IMP_kernel.delete_Particle
4838 
4839  def __init__(self, *args):
4840  r"""
4841  __init__(Particle self, Model m, std::string name) -> Particle
4842  __init__(Particle self, Model m) -> Particle
4843  __init__(Particle self) -> Particle
4844  """
4845  _IMP_kernel.Particle_swiginit(self, _IMP_kernel.new_Particle(*args))
4846 
4847  def get_float_keys(self):
4848  r"""get_float_keys(Particle self) -> IMP::FloatKeys"""
4849  return _IMP_kernel.Particle_get_float_keys(self)
4850 
4851  def get_floats_keys(self):
4852  r"""get_floats_keys(Particle self) -> IMP::FloatsKeys"""
4853  return _IMP_kernel.Particle_get_floats_keys(self)
4854 
4855  def get_int_keys(self):
4856  r"""get_int_keys(Particle self) -> IMP::IntKeys"""
4857  return _IMP_kernel.Particle_get_int_keys(self)
4858 
4859  def get_ints_keys(self):
4860  r"""get_ints_keys(Particle self) -> IMP::IntsKeys"""
4861  return _IMP_kernel.Particle_get_ints_keys(self)
4862 
4863  def get_string_keys(self):
4864  r"""get_string_keys(Particle self) -> IMP::StringKeys"""
4865  return _IMP_kernel.Particle_get_string_keys(self)
4866 
4867  def get_object_keys(self):
4868  r"""get_object_keys(Particle self) -> IMP::ObjectKeys"""
4869  return _IMP_kernel.Particle_get_object_keys(self)
4870 
4871  def add_cache_attribute(self, *args):
4872  r"""
4873  add_cache_attribute(Particle self, FloatKey name, IMP::Float value)
4874  add_cache_attribute(Particle self, FloatsKey name, IMP::Floats value)
4875  add_cache_attribute(Particle self, IntKey name, IMP::Int value)
4876  add_cache_attribute(Particle self, IntsKey name, IMP::Ints value)
4877  add_cache_attribute(Particle self, StringKey name, IMP::String value)
4878  add_cache_attribute(Particle self, ObjectKey name, Object value)
4879  add_cache_attribute(Particle self, IMP::WeakObjectKey name, Object value)
4880  """
4881  return _IMP_kernel.Particle_add_cache_attribute(self, *args)
4882 
4883  def get_weak_object_keys(self):
4884  r"""get_weak_object_keys(Particle self) -> IMP::WeakObjectKeys"""
4885  return _IMP_kernel.Particle_get_weak_object_keys(self)
4886 
4887  def add_to_derivative(self, key, value, da):
4888  r"""add_to_derivative(Particle self, FloatKey key, IMP::Float value, DerivativeAccumulator da)"""
4889  return _IMP_kernel.Particle_add_to_derivative(self, key, value, da)
4890 
4891  def set_is_optimized(self, k, tf):
4892  r"""set_is_optimized(Particle self, FloatKey k, bool tf)"""
4893  return _IMP_kernel.Particle_set_is_optimized(self, k, tf)
4894 
4895  def get_is_optimized(self, k):
4896  r"""get_is_optimized(Particle self, FloatKey k) -> bool"""
4897  return _IMP_kernel.Particle_get_is_optimized(self, k)
4898 
4899  def get_derivative(self, k):
4900  r"""get_derivative(Particle self, FloatKey k) -> IMP::Float"""
4901  return _IMP_kernel.Particle_get_derivative(self, k)
4902 
4903  def add_attribute(self, *args):
4904  r"""
4905  add_attribute(Particle self, FloatKey name, IMP::Float initial_value)
4906  add_attribute(Particle self, FloatsKey name, IMP::Floats initial_value)
4907  add_attribute(Particle self, IntKey name, IMP::Int initial_value)
4908  add_attribute(Particle self, IntsKey name, IMP::Ints initial_value)
4909  add_attribute(Particle self, StringKey name, IMP::String initial_value)
4910  add_attribute(Particle self, ObjectKey name, Object initial_value)
4911  add_attribute(Particle self, IMP::WeakObjectKey name, Object initial_value)
4912  add_attribute(Particle self, SparseStringKey name, IMP::String initial_value)
4913  add_attribute(Particle self, SparseIntKey name, IMP::Int initial_value)
4914  add_attribute(Particle self, SparseFloatKey name, IMP::Float initial_value)
4915  add_attribute(Particle self, SparseParticleIndexKey name, ParticleIndex initial_value)
4916  add_attribute(Particle self, FloatKey name, IMP::Float const initial_value, bool optimized)
4917  add_attribute(Particle self, ParticleIndexKey k, Particle v)
4918  """
4919  return _IMP_kernel.Particle_add_attribute(self, *args)
4920 
4921  def has_attribute(self, *args):
4922  r"""
4923  has_attribute(Particle self, FloatKey name) -> bool
4924  has_attribute(Particle self, FloatsKey name) -> bool
4925  has_attribute(Particle self, IntKey name) -> bool
4926  has_attribute(Particle self, IntsKey name) -> bool
4927  has_attribute(Particle self, StringKey name) -> bool
4928  has_attribute(Particle self, ObjectKey name) -> bool
4929  has_attribute(Particle self, IMP::WeakObjectKey name) -> bool
4930  has_attribute(Particle self, SparseStringKey name) -> bool
4931  has_attribute(Particle self, SparseIntKey name) -> bool
4932  has_attribute(Particle self, SparseFloatKey name) -> bool
4933  has_attribute(Particle self, SparseParticleIndexKey name) -> bool
4934  has_attribute(Particle self, ParticleIndexKey k) -> bool
4935  """
4936  return _IMP_kernel.Particle_has_attribute(self, *args)
4937 
4938  def set_value(self, *args):
4939  r"""
4940  set_value(Particle self, FloatKey name, IMP::Float value)
4941  set_value(Particle self, FloatsKey name, IMP::Floats value)
4942  set_value(Particle self, IntKey name, IMP::Int value)
4943  set_value(Particle self, IntsKey name, IMP::Ints value)
4944  set_value(Particle self, StringKey name, IMP::String value)
4945  set_value(Particle self, ObjectKey name, Object value)
4946  set_value(Particle self, IMP::WeakObjectKey name, Object value)
4947  set_value(Particle self, SparseStringKey name, IMP::String value)
4948  set_value(Particle self, SparseIntKey name, IMP::Int value)
4949  set_value(Particle self, SparseFloatKey name, IMP::Float value)
4950  set_value(Particle self, SparseParticleIndexKey name, ParticleIndex value)
4951  set_value(Particle self, ParticleIndexKey k, Particle v)
4952  """
4953  return _IMP_kernel.Particle_set_value(self, *args)
4954 
4955  def get_value(self, *args):
4956  r"""
4957  get_value(Particle self, FloatKey name) -> IMP::Float
4958  get_value(Particle self, FloatsKey name) -> IMP::Floats
4959  get_value(Particle self, IntKey name) -> IMP::Int
4960  get_value(Particle self, IntsKey name) -> IMP::Ints
4961  get_value(Particle self, StringKey name) -> IMP::String
4962  get_value(Particle self, ObjectKey name) -> Object
4963  get_value(Particle self, IMP::WeakObjectKey name) -> Object
4964  get_value(Particle self, SparseStringKey name) -> IMP::String
4965  get_value(Particle self, SparseIntKey name) -> IMP::Int
4966  get_value(Particle self, SparseFloatKey name) -> IMP::Float
4967  get_value(Particle self, SparseParticleIndexKey name) -> ParticleIndex
4968  get_value(Particle self, ParticleIndexKey k) -> Particle
4969  """
4970  return _IMP_kernel.Particle_get_value(self, *args)
4971 
4972  def remove_attribute(self, *args):
4973  r"""
4974  remove_attribute(Particle self, FloatKey name)
4975  remove_attribute(Particle self, FloatsKey name)
4976  remove_attribute(Particle self, IntKey name)
4977  remove_attribute(Particle self, IntsKey name)
4978  remove_attribute(Particle self, StringKey name)
4979  remove_attribute(Particle self, ObjectKey name)
4980  remove_attribute(Particle self, IMP::WeakObjectKey name)
4981  remove_attribute(Particle self, SparseStringKey name)
4982  remove_attribute(Particle self, SparseIntKey name)
4983  remove_attribute(Particle self, SparseFloatKey name)
4984  remove_attribute(Particle self, SparseParticleIndexKey name)
4985  remove_attribute(Particle self, ParticleIndexKey k)
4986  """
4987  return _IMP_kernel.Particle_remove_attribute(self, *args)
4988 
4989  def get_particle_keys(self):
4990  r"""get_particle_keys(Particle self) -> IMP::ParticleIndexKeys"""
4991  return _IMP_kernel.Particle_get_particle_keys(self)
4992 
4993  def show(self, *args):
4994  r"""show(Particle self, _ostream out=std::cout)"""
4995  return _IMP_kernel.Particle_show(self, *args)
4996 
4997  def get_is_active(self):
4998  r"""get_is_active(Particle self) -> bool"""
4999  return _IMP_kernel.Particle_get_is_active(self)
5000 
5001  def get_index(self):
5002  r"""get_index(Particle self) -> ParticleIndex"""
5003  return _IMP_kernel.Particle_get_index(self)
5004 
5005  def __eq__(self, *args):
5006  r"""
5007  __eq__(Particle self, Particle o) -> bool
5008  __eq__(Particle self, Decorator d) -> bool
5009  """
5010  return _IMP_kernel.Particle___eq__(self, *args)
5011 
5012  def __ne__(self, *args):
5013  r"""
5014  __ne__(Particle self, Particle o) -> bool
5015  __ne__(Particle self, Decorator d) -> bool
5016  """
5017  return _IMP_kernel.Particle___ne__(self, *args)
5018 
5019  def __le__(self, *args):
5020  r"""
5021  __le__(Particle self, Particle o) -> bool
5022  __le__(Particle self, Decorator d) -> bool
5023  """
5024  return _IMP_kernel.Particle___le__(self, *args)
5025 
5026  def __lt__(self, *args):
5027  r"""
5028  __lt__(Particle self, Particle o) -> bool
5029  __lt__(Particle self, Decorator d) -> bool
5030  """
5031  return _IMP_kernel.Particle___lt__(self, *args)
5032 
5033  def __ge__(self, *args):
5034  r"""
5035  __ge__(Particle self, Particle o) -> bool
5036  __ge__(Particle self, Decorator d) -> bool
5037  """
5038  return _IMP_kernel.Particle___ge__(self, *args)
5039 
5040  def __gt__(self, *args):
5041  r"""
5042  __gt__(Particle self, Particle o) -> bool
5043  __gt__(Particle self, Decorator d) -> bool
5044  """
5045  return _IMP_kernel.Particle___gt__(self, *args)
5046 
5047  __hash__ = ModelObject.__hash__
5048 
5049 
5050  def __str__(self):
5051  r"""__str__(Particle self) -> std::string"""
5052  return _IMP_kernel.Particle___str__(self)
5053 
5054  def __repr__(self):
5055  r"""__repr__(Particle self) -> std::string"""
5056  return _IMP_kernel.Particle___repr__(self)
5057 
5058  @staticmethod
5059  def get_from(o):
5060  return _object_cast_to_Particle(o)
5061 
5062 
5063  def _get_as_binary(self):
5064  r"""_get_as_binary(Particle self) -> PyObject *"""
5065  return _IMP_kernel.Particle__get_as_binary(self)
5066 
5067  def _set_from_binary(self, p):
5068  r"""_set_from_binary(Particle self, PyObject * p)"""
5069  return _IMP_kernel.Particle__set_from_binary(self, p)
5070 
5071  def __getstate__(self):
5072  p = self._get_as_binary()
5073  if len(self.__dict__) > 1:
5074  d = self.__dict__.copy()
5075  del d['this']
5076  p = (d, p)
5077  return p
5078 
5079  def __setstate__(self, p):
5080  if not hasattr(self, 'this'):
5081  self.__init__()
5082  if isinstance(p, tuple):
5083  d, p = p
5084  self.__dict__.update(d)
5085  return self._set_from_binary(p)
5086 
5087 
5088 # Register Particle in _IMP_kernel:
5089 _IMP_kernel.Particle_swigregister(Particle)
5090 class _ParticleAdaptor(_InputAdaptor):
5091  r"""Proxy of C++ IMP::ParticleAdaptor class."""
5092 
5093  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5094  __repr__ = _swig_repr
5095 
5096  def __init__(self, *args):
5097  r"""
5098  __init__(_ParticleAdaptor self) -> _ParticleAdaptor
5099  __init__(_ParticleAdaptor self, Particle p) -> _ParticleAdaptor
5100  __init__(_ParticleAdaptor self, Decorator d) -> _ParticleAdaptor
5101  """
5102  _IMP_kernel._ParticleAdaptor_swiginit(self, _IMP_kernel.new__ParticleAdaptor(*args))
5103 
5104  def get_model(self):
5105  r"""get_model(_ParticleAdaptor self) -> Model"""
5106  return _IMP_kernel._ParticleAdaptor_get_model(self)
5107 
5108  def get_particle_index(self):
5109  r"""get_particle_index(_ParticleAdaptor self) -> ParticleIndex"""
5110  return _IMP_kernel._ParticleAdaptor_get_particle_index(self)
5111  __swig_destroy__ = _IMP_kernel.delete__ParticleAdaptor
5112 
5113 # Register _ParticleAdaptor in _IMP_kernel:
5114 _IMP_kernel._ParticleAdaptor_swigregister(_ParticleAdaptor)
5115 class _DependencyGraphVertexIndex(object):
5116  r"""Proxy of C++ IMP::DependencyGraphVertexIndex class."""
5117 
5118  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5119  __repr__ = _swig_repr
5120 
5121  def __init__(self):
5122  r"""__init__(_DependencyGraphVertexIndex self) -> _DependencyGraphVertexIndex"""
5123  _IMP_kernel._DependencyGraphVertexIndex_swiginit(self, _IMP_kernel.new__DependencyGraphVertexIndex())
5124  __swig_destroy__ = _IMP_kernel.delete__DependencyGraphVertexIndex
5125 
5126 # Register _DependencyGraphVertexIndex in _IMP_kernel:
5127 _IMP_kernel._DependencyGraphVertexIndex_swigregister(_DependencyGraphVertexIndex)
5128 
5129 def show_as_graphviz(name, out):
5130  r"""show_as_graphviz(IMP::DependencyGraph const & name, TextOutput out)"""
5131  return _IMP_kernel.show_as_graphviz(name, out)
5132 
5133 def get_vertex_index(g):
5134  r"""get_vertex_index(IMP::DependencyGraph const & g) -> _DependencyGraphVertexIndex"""
5135  return _IMP_kernel.get_vertex_index(g)
5136 
5137 def get_dependency_graph(m):
5138  r"""get_dependency_graph(Model m) -> IMP::DependencyGraph"""
5139  return _IMP_kernel.get_dependency_graph(m)
5140 
5142  r"""get_pruned_dependency_graph(Model m) -> IMP::DependencyGraph"""
5143  return _IMP_kernel.get_pruned_dependency_graph(m)
5144 
5145 def get_dependent_particles(p, all, dg, index):
5146  r"""get_dependent_particles(ModelObject p, IMP::ModelObjectsTemp const & all, IMP::DependencyGraph const & dg, _DependencyGraphVertexIndex index) -> IMP::ParticlesTemp"""
5147  return _IMP_kernel.get_dependent_particles(p, all, dg, index)
5148 
5149 def get_required_score_states(*args):
5150  r"""
5151  get_required_score_states(IMP::ModelObjectsTemp const & mos, IMP::ScoreStatesTemp exclude=IMP::ScoreStatesTemp()) -> IMP::ScoreStatesTemp
5152  get_required_score_states(ModelObject p, IMP::ModelObjectsTemp const & all, IMP::DependencyGraph const & dg, _DependencyGraphVertexIndex index) -> IMP::ScoreStatesTemp
5153  get_required_score_states(Model m, ParticleIndex pi) -> IMP::ScoreStatesTemp
5154  """
5155  return _IMP_kernel.get_required_score_states(*args)
5156 class ScoringFunction(ModelObject):
5157  r"""Proxy of C++ IMP::ScoringFunction class."""
5158 
5159  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5160 
5161  def do_add_score_and_derivatives(self, sa, ss):
5162  r"""do_add_score_and_derivatives(ScoringFunction self, ScoreAccumulator sa, IMP::ScoreStatesTemp const & ss)"""
5163  return _IMP_kernel.ScoringFunction_do_add_score_and_derivatives(self, sa, ss)
5164 
5165  def do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss):
5166  r"""do_add_score_and_derivatives_moved(ScoringFunction self, ScoreAccumulator sa, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis, IMP::ScoreStatesTemp const & ss)"""
5167  return _IMP_kernel.ScoringFunction_do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss)
5168 
5169  def get_score_accumulator_if_below(self, deriv, max):
5170  r"""get_score_accumulator_if_below(ScoringFunction self, bool deriv, double max) -> ScoreAccumulator"""
5171  return _IMP_kernel.ScoringFunction_get_score_accumulator_if_below(self, deriv, max)
5172 
5173  def get_score_accumulator_if_good(self, deriv):
5174  r"""get_score_accumulator_if_good(ScoringFunction self, bool deriv) -> ScoreAccumulator"""
5175  return _IMP_kernel.ScoringFunction_get_score_accumulator_if_good(self, deriv)
5176 
5177  def get_score_accumulator(self, deriv):
5178  r"""get_score_accumulator(ScoringFunction self, bool deriv) -> ScoreAccumulator"""
5179  return _IMP_kernel.ScoringFunction_get_score_accumulator(self, deriv)
5180 
5181  def __init__(self, *args):
5182  r"""
5183  __init__(ScoringFunction self, Model m, std::string name) -> ScoringFunction
5184  __init__(ScoringFunction self) -> ScoringFunction
5185  """
5186  if self.__class__ == ScoringFunction:
5187  _self = None
5188  else:
5189  _self = self
5190  _IMP_kernel.ScoringFunction_swiginit(self, _IMP_kernel.new_ScoringFunction(_self, *args))
5191 
5192  if self.__class__ != ScoringFunction:
5193  _director_objects.register(self)
5194 
5195 
5196 
5197 
5198  def do_get_outputs(self):
5199  r"""do_get_outputs(ScoringFunction self) -> IMP::ModelObjectsTemp"""
5200  return _IMP_kernel.ScoringFunction_do_get_outputs(self)
5201 
5202  def evaluate(self, derivatives):
5203  r"""evaluate(ScoringFunction self, bool derivatives) -> double"""
5204  return _IMP_kernel.ScoringFunction_evaluate(self, derivatives)
5205 
5206  def evaluate_if_good(self, derivatives):
5207  r"""evaluate_if_good(ScoringFunction self, bool derivatives) -> double"""
5208  return _IMP_kernel.ScoringFunction_evaluate_if_good(self, derivatives)
5209 
5210  def evaluate_if_below(self, derivatives, max):
5211  r"""evaluate_if_below(ScoringFunction self, bool derivatives, double max) -> double"""
5212  return _IMP_kernel.ScoringFunction_evaluate_if_below(self, derivatives, max)
5213 
5214  def evaluate_moved(self, derivatives, moved_pis, reset_pis):
5215  r"""evaluate_moved(ScoringFunction self, bool derivatives, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis) -> double"""
5216  return _IMP_kernel.ScoringFunction_evaluate_moved(self, derivatives, moved_pis, reset_pis)
5217 
5218  def evaluate_moved_if_below(self, derivatives, moved_pis, reset_pis, max):
5219  r"""evaluate_moved_if_below(ScoringFunction self, bool derivatives, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis, double max) -> double"""
5220  return _IMP_kernel.ScoringFunction_evaluate_moved_if_below(self, derivatives, moved_pis, reset_pis, max)
5221 
5222  def evaluate_moved_if_good(self, derivatives, moved_pis, reset_pis):
5223  r"""evaluate_moved_if_good(ScoringFunction self, bool derivatives, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis) -> double"""
5224  return _IMP_kernel.ScoringFunction_evaluate_moved_if_good(self, derivatives, moved_pis, reset_pis)
5225 
5226  def get_had_good_score(self):
5227  r"""get_had_good_score(ScoringFunction self) -> bool"""
5228  return _IMP_kernel.ScoringFunction_get_had_good_score(self)
5229 
5230  def get_last_score(self):
5231  r"""get_last_score(ScoringFunction self) -> double"""
5232  return _IMP_kernel.ScoringFunction_get_last_score(self)
5233 
5234  def create_restraints(self):
5235  r"""create_restraints(ScoringFunction self) -> IMP::Restraints"""
5236  return _IMP_kernel.ScoringFunction_create_restraints(self)
5237 
5238  def get_single_restraint(self):
5239  r"""get_single_restraint(ScoringFunction self) -> Restraint"""
5240  return _IMP_kernel.ScoringFunction_get_single_restraint(self)
5241 
5242  def __str__(self):
5243  r"""__str__(ScoringFunction self) -> std::string"""
5244  return _IMP_kernel.ScoringFunction___str__(self)
5245 
5246  def __repr__(self):
5247  r"""__repr__(ScoringFunction self) -> std::string"""
5248  return _IMP_kernel.ScoringFunction___repr__(self)
5249 
5250  @staticmethod
5251  def get_from(o):
5252  return _object_cast_to_ScoringFunction(o)
5253 
5254 
5255  def do_show(self, out):
5256  pass
5257 
5258  @staticmethod
5259  def get_from(o):
5260  return _object_cast_to_ScoringFunction(o)
5261 
5262 
5263  def _get_jax(self):
5264  r = self.get_single_restraint()
5265  if r is None:
5266  raise NotImplementedError(f"No JAX implementation for {self}")
5267  else:
5268  return r.get_derived_object()._get_jax()
5269 
5270  def _evaluate_jax(self):
5271  """Similar to evaluate(False), but using JAX.
5272  This is intended to be useful for testing purposes. It will likely
5273  not be particularly fast as it will copy the IMP Model and
5274  jax.jit-compile the scoring function each time."""
5275  import jax
5276  ji = self._get_jax()
5277  jm = ji.get_jax_model()
5278  j = jax.jit(ji.score_func)
5279  return j(jm)
5280 
5281  __swig_destroy__ = _IMP_kernel.delete_ScoringFunction
5282  def __disown__(self):
5283  self.this.disown()
5284  _IMP_kernel.disown_ScoringFunction(self)
5285  return weakref.proxy(self)
5286 
5287  def do_destroy(self):
5288  r"""do_destroy(ScoringFunction self)"""
5289  return _IMP_kernel.ScoringFunction_do_destroy(self)
5290 
5291  def handle_set_has_required_score_states(self, arg0):
5292  r"""handle_set_has_required_score_states(ScoringFunction self, bool arg0)"""
5293  return _IMP_kernel.ScoringFunction_handle_set_has_required_score_states(self, arg0)
5294 
5295  def do_get_inputs(self):
5296  r"""do_get_inputs(ScoringFunction self) -> IMP::ModelObjectsTemp"""
5297  return _IMP_kernel.ScoringFunction_do_get_inputs(self)
5298 
5299  def do_get_interactions(self):
5300  r"""do_get_interactions(ScoringFunction self) -> IMP::ModelObjectsTemps"""
5301  return _IMP_kernel.ScoringFunction_do_get_interactions(self)
5302 
5303 # Register ScoringFunction in _IMP_kernel:
5304 _IMP_kernel.ScoringFunction_swigregister(ScoringFunction)
5305 
5306 def create_decomposition(*args):
5307  r"""
5308  create_decomposition(IMP::RestraintsTemp const & rs) -> IMP::Restraints
5309  create_decomposition(ScoringFunction sf) -> IMP::ScoringFunctions
5310  """
5311  return _IMP_kernel.create_decomposition(*args)
5312 class _ScoringFunctionAdaptor(_InputAdaptor):
5313  r"""Proxy of C++ IMP::ScoringFunctionAdaptor class."""
5314 
5315  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5316  __repr__ = _swig_repr
5317 
5318  def __init__(self, *args):
5319  r"""
5320  __init__(_ScoringFunctionAdaptor self) -> _ScoringFunctionAdaptor
5321  __init__(_ScoringFunctionAdaptor self, ScoringFunction sf) -> _ScoringFunctionAdaptor
5322  __init__(_ScoringFunctionAdaptor self, IMP::RestraintsTemp const & sf) -> _ScoringFunctionAdaptor
5323  __init__(_ScoringFunctionAdaptor self, IMP::Restraints const & sf) -> _ScoringFunctionAdaptor
5324  __init__(_ScoringFunctionAdaptor self, Restraint sf) -> _ScoringFunctionAdaptor
5325  """
5326  _IMP_kernel._ScoringFunctionAdaptor_swiginit(self, _IMP_kernel.new__ScoringFunctionAdaptor(*args))
5327  __swig_destroy__ = _IMP_kernel.delete__ScoringFunctionAdaptor
5328 
5329 # Register _ScoringFunctionAdaptor in _IMP_kernel:
5330 _IMP_kernel._ScoringFunctionAdaptor_swigregister(_ScoringFunctionAdaptor)
5331 
5332 def show_restraint_hierarchy(*args):
5333  r"""show_restraint_hierarchy(_ScoringFunctionAdaptor rs, _ostream out=std::cout)"""
5334  return _IMP_kernel.show_restraint_hierarchy(*args)
5335 class Undecorator(Object):
5336  r"""Proxy of C++ IMP::Undecorator class."""
5337 
5338  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5339 
5340  def __init__(self, m, name):
5341  r"""__init__(Undecorator self, Model m, std::string name) -> Undecorator"""
5342  if self.__class__ == Undecorator:
5343  _self = None
5344  else:
5345  _self = self
5346  _IMP_kernel.Undecorator_swiginit(self, _IMP_kernel.new_Undecorator(_self, m, name))
5347 
5348  if self.__class__ != Undecorator:
5349  _director_objects.register(self)
5350 
5351 
5352 
5353 
5354  def teardown(self, pi):
5355  r"""teardown(Undecorator self, ParticleIndex pi)"""
5356  return _IMP_kernel.Undecorator_teardown(self, pi)
5357 
5358  def __str__(self):
5359  r"""__str__(Undecorator self) -> std::string"""
5360  return _IMP_kernel.Undecorator___str__(self)
5361 
5362  def __repr__(self):
5363  r"""__repr__(Undecorator self) -> std::string"""
5364  return _IMP_kernel.Undecorator___repr__(self)
5365 
5366  @staticmethod
5367  def get_from(o):
5368  return _object_cast_to_Undecorator(o)
5369 
5370 
5371  def do_show(self, out):
5372  pass
5373 
5374  @staticmethod
5375  def get_from(o):
5376  return _object_cast_to_Undecorator(o)
5377 
5378  __swig_destroy__ = _IMP_kernel.delete_Undecorator
5379  def __disown__(self):
5380  self.this.disown()
5381  _IMP_kernel.disown_Undecorator(self)
5382  return weakref.proxy(self)
5383 
5384  def do_destroy(self):
5385  r"""do_destroy(Undecorator self)"""
5386  return _IMP_kernel.Undecorator_do_destroy(self)
5387 
5388 # Register Undecorator in _IMP_kernel:
5389 _IMP_kernel.Undecorator_swigregister(Undecorator)
5390 class Model(Object):
5391  r"""Proxy of C++ IMP::Model class."""
5392 
5393  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5394 
5395  def __init__(self, *args):
5396  r"""__init__(Model self, std::string name="Model %1%") -> Model"""
5397  _IMP_kernel.Model_swiginit(self, _IMP_kernel.new_Model(*args))
5398 
5399  if self not in _models_set:
5400  _models_set.add(self)
5401 
5402 
5403 
5404 
5405  def clear_particle_caches(self, pi):
5406  r"""clear_particle_caches(Model self, ParticleIndex pi)"""
5407  return _IMP_kernel.Model_clear_particle_caches(self, pi)
5408 
5409  def add_particle(self, name):
5410  r"""add_particle(Model self, std::string name) -> ParticleIndex"""
5411  return _IMP_kernel.Model_add_particle(self, name)
5412 
5413  def get_particle_name(self, pi):
5414  r"""get_particle_name(Model self, ParticleIndex pi) -> std::string"""
5415  return _IMP_kernel.Model_get_particle_name(self, pi)
5416 
5417  def add_undecorator(self, pi, d):
5418  r"""add_undecorator(Model self, ParticleIndex pi, Undecorator d)"""
5419  return _IMP_kernel.Model_add_undecorator(self, pi, d)
5420 
5421  def get_dependent_restraints_uncached(self, pi):
5422  r"""get_dependent_restraints_uncached(Model self, ParticleIndex pi) -> IMP::RestraintsTemp"""
5423  return _IMP_kernel.Model_get_dependent_restraints_uncached(self, pi)
5424 
5425  def get_dependent_particles_uncached(self, pi):
5426  r"""get_dependent_particles_uncached(Model self, ParticleIndex pi) -> IMP::ParticlesTemp"""
5427  return _IMP_kernel.Model_get_dependent_particles_uncached(self, pi)
5428 
5429  def get_dependent_score_states_uncached(self, pi):
5430  r"""get_dependent_score_states_uncached(Model self, ParticleIndex pi) -> IMP::ScoreStatesTemp"""
5431  return _IMP_kernel.Model_get_dependent_score_states_uncached(self, pi)
5432  def __get_score_states(self): return _list_util.VarList(getdimfunc=self.get_number_of_score_states, getfunc=self.get_score_state, erasefunc=self.erase_score_state, appendfunc=self.add_score_state, extendfunc=self.add_score_states, clearfunc=self.clear_score_states, indexfunc=self._python_index_score_state)
5433  def __set_score_states(self, obj): _list_util.set_varlist(self.score_states, obj)
5434  def __del_score_states(self): _list_util.del_varlist(self.score_states)
5435  score_states = property(__get_score_states, __set_score_states, __del_score_states, doc="List of ##ucnames")
5436 
5437  def remove_score_state(self, d):
5438  r"""remove_score_state(Model self, ScoreState d)"""
5439  return _IMP_kernel.Model_remove_score_state(self, d)
5440 
5441  def _python_index_score_state(self, d, start, stop):
5442  r"""_python_index_score_state(Model self, ScoreState d, unsigned int start, unsigned int stop) -> unsigned int"""
5443  return _IMP_kernel.Model__python_index_score_state(self, d, start, stop)
5444 
5445  def remove_score_states(self, d):
5446  r"""remove_score_states(Model self, IMP::ScoreStates const & d)"""
5447  return _IMP_kernel.Model_remove_score_states(self, d)
5448 
5449  def set_score_states(self, ps):
5450  r"""set_score_states(Model self, IMP::ScoreStates const & ps)"""
5451  return _IMP_kernel.Model_set_score_states(self, ps)
5452 
5453  def set_score_states_order(self, objs):
5454  r"""set_score_states_order(Model self, IMP::ScoreStates const & objs)"""
5455  return _IMP_kernel.Model_set_score_states_order(self, objs)
5456 
5457  def add_score_state(self, obj):
5458  r"""add_score_state(Model self, ScoreState obj) -> unsigned int"""
5459  return _IMP_kernel.Model_add_score_state(self, obj)
5460 
5461  def add_score_states(self, objs):
5462  r"""add_score_states(Model self, IMP::ScoreStates const & objs)"""
5463  return _IMP_kernel.Model_add_score_states(self, objs)
5464 
5465  def clear_score_states(self):
5466  r"""clear_score_states(Model self)"""
5467  return _IMP_kernel.Model_clear_score_states(self)
5468 
5469  def get_number_of_score_states(self):
5470  r"""get_number_of_score_states(Model self) -> unsigned int"""
5471  return _IMP_kernel.Model_get_number_of_score_states(self)
5472 
5473  def get_has_score_states(self):
5474  r"""get_has_score_states(Model self) -> bool"""
5475  return _IMP_kernel.Model_get_has_score_states(self)
5476 
5477  def get_score_state(self, i):
5478  r"""get_score_state(Model self, unsigned int i) -> ScoreState"""
5479  return _IMP_kernel.Model_get_score_state(self, i)
5480 
5481  def get_score_states(self):
5482  r"""get_score_states(Model self) -> IMP::ScoreStates"""
5483  return _IMP_kernel.Model_get_score_states(self)
5484 
5485  def erase_score_state(self, i):
5486  r"""erase_score_state(Model self, unsigned int i)"""
5487  return _IMP_kernel.Model_erase_score_state(self, i)
5488 
5489  def reserve_score_states(self, sz):
5490  r"""reserve_score_states(Model self, unsigned int sz)"""
5491  return _IMP_kernel.Model_reserve_score_states(self, sz)
5492 
5493  def update(self):
5494  r"""update(Model self)"""
5495  return _IMP_kernel.Model_update(self)
5496 
5497  def get_ordered_score_states(self):
5498  r"""get_ordered_score_states(Model self) -> IMP::ScoreStatesTemp"""
5499  return _IMP_kernel.Model_get_ordered_score_states(self)
5500 
5501  def add_cache_attribute(self, *args):
5502  r"""
5503  add_cache_attribute(Model self, FloatKey attribute_key, ParticleIndex particle, IMP::Float value)
5504  add_cache_attribute(Model self, IntKey attribute_key, ParticleIndex particle, IMP::Int value)
5505  add_cache_attribute(Model self, FloatsKey attribute_key, ParticleIndex particle, IMP::Floats value)
5506  add_cache_attribute(Model self, Vector3DKey attribute_key, ParticleIndex particle, IMP::algebra::Vector3D value)
5507  add_cache_attribute(Model self, IntsKey attribute_key, ParticleIndex particle, IMP::Ints value)
5508  add_cache_attribute(Model self, StringKey attribute_key, ParticleIndex particle, IMP::String value)
5509  add_cache_attribute(Model self, ParticleIndexesKey attribute_key, ParticleIndex particle, IMP::ParticleIndexes value)
5510  add_cache_attribute(Model self, ParticleIndexKey attribute_key, ParticleIndex particle, ParticleIndex value)
5511  add_cache_attribute(Model self, ObjectKey attribute_key, ParticleIndex particle, Object value)
5512  add_cache_attribute(Model self, IMP::WeakObjectKey attribute_key, ParticleIndex particle, Object value)
5513  """
5514  return _IMP_kernel.Model_add_cache_attribute(self, *args)
5515 
5516  def add_attribute(self, *args):
5517  r"""
5518  add_attribute(Model self, FloatKey attribute_key, ParticleIndex particle, IMP::Float value)
5519  add_attribute(Model self, IntKey attribute_key, ParticleIndex particle, IMP::Int value)
5520  add_attribute(Model self, FloatsKey attribute_key, ParticleIndex particle, IMP::Floats value)
5521  add_attribute(Model self, Vector3DKey attribute_key, ParticleIndex particle, IMP::algebra::Vector3D value)
5522  add_attribute(Model self, IntsKey attribute_key, ParticleIndex particle, IMP::Ints value)
5523  add_attribute(Model self, StringKey attribute_key, ParticleIndex particle, IMP::String value)
5524  add_attribute(Model self, ParticleIndexesKey attribute_key, ParticleIndex particle, IMP::ParticleIndexes value)
5525  add_attribute(Model self, ParticleIndexKey attribute_key, ParticleIndex particle, ParticleIndex value)
5526  add_attribute(Model self, ObjectKey attribute_key, ParticleIndex particle, Object value)
5527  add_attribute(Model self, IMP::WeakObjectKey attribute_key, ParticleIndex particle, Object value)
5528  add_attribute(Model self, SparseStringKey attribute_key, ParticleIndex particle, IMP::String value)
5529  add_attribute(Model self, SparseIntKey attribute_key, ParticleIndex particle, IMP::Int value)
5530  add_attribute(Model self, SparseFloatKey attribute_key, ParticleIndex particle, IMP::Float value)
5531  add_attribute(Model self, SparseParticleIndexKey attribute_key, ParticleIndex particle, ParticleIndex value)
5532  """
5533  return _IMP_kernel.Model_add_attribute(self, *args)
5534 
5535  def remove_attribute(self, *args):
5536  r"""
5537  remove_attribute(Model self, FloatKey attribute_key, ParticleIndex particle)
5538  remove_attribute(Model self, IntKey attribute_key, ParticleIndex particle)
5539  remove_attribute(Model self, FloatsKey attribute_key, ParticleIndex particle)
5540  remove_attribute(Model self, Vector3DKey attribute_key, ParticleIndex particle)
5541  remove_attribute(Model self, IntsKey attribute_key, ParticleIndex particle)
5542  remove_attribute(Model self, StringKey attribute_key, ParticleIndex particle)
5543  remove_attribute(Model self, ParticleIndexesKey attribute_key, ParticleIndex particle)
5544  remove_attribute(Model self, ParticleIndexKey attribute_key, ParticleIndex particle)
5545  remove_attribute(Model self, ObjectKey attribute_key, ParticleIndex particle)
5546  remove_attribute(Model self, IMP::WeakObjectKey attribute_key, ParticleIndex particle)
5547  remove_attribute(Model self, SparseStringKey attribute_key, ParticleIndex particle)
5548  remove_attribute(Model self, SparseIntKey attribute_key, ParticleIndex particle)
5549  remove_attribute(Model self, SparseFloatKey attribute_key, ParticleIndex particle)
5550  remove_attribute(Model self, SparseParticleIndexKey attribute_key, ParticleIndex particle)
5551  """
5552  return _IMP_kernel.Model_remove_attribute(self, *args)
5553 
5554  def get_has_attribute(self, *args):
5555  r"""
5556  get_has_attribute(Model self, FloatKey attribute_key, ParticleIndex particle) -> bool
5557  get_has_attribute(Model self, IntKey attribute_key, ParticleIndex particle) -> bool
5558  get_has_attribute(Model self, FloatsKey attribute_key, ParticleIndex particle) -> bool
5559  get_has_attribute(Model self, Vector3DKey attribute_key, ParticleIndex particle) -> bool
5560  get_has_attribute(Model self, IntsKey attribute_key, ParticleIndex particle) -> bool
5561  get_has_attribute(Model self, StringKey attribute_key, ParticleIndex particle) -> bool
5562  get_has_attribute(Model self, ParticleIndexesKey attribute_key, ParticleIndex particle) -> bool
5563  get_has_attribute(Model self, ParticleIndexKey attribute_key, ParticleIndex particle) -> bool
5564  get_has_attribute(Model self, ObjectKey attribute_key, ParticleIndex particle) -> bool
5565  get_has_attribute(Model self, IMP::WeakObjectKey attribute_key, ParticleIndex particle) -> bool
5566  get_has_attribute(Model self, SparseStringKey attribute_key, ParticleIndex particle) -> bool
5567  get_has_attribute(Model self, SparseIntKey attribute_key, ParticleIndex particle) -> bool
5568  get_has_attribute(Model self, SparseFloatKey attribute_key, ParticleIndex particle) -> bool
5569  get_has_attribute(Model self, SparseParticleIndexKey attribute_key, ParticleIndex particle) -> bool
5570  """
5571  return _IMP_kernel.Model_get_has_attribute(self, *args)
5572 
5573  def set_attribute(self, *args):
5574  r"""
5575  set_attribute(Model self, FloatKey attribute_key, ParticleIndex particle, IMP::Float value)
5576  set_attribute(Model self, IntKey attribute_key, ParticleIndex particle, IMP::Int value)
5577  set_attribute(Model self, FloatsKey attribute_key, ParticleIndex particle, IMP::Floats value)
5578  set_attribute(Model self, Vector3DKey attribute_key, ParticleIndex particle, IMP::algebra::Vector3D value)
5579  set_attribute(Model self, IntsKey attribute_key, ParticleIndex particle, IMP::Ints value)
5580  set_attribute(Model self, StringKey attribute_key, ParticleIndex particle, IMP::String value)
5581  set_attribute(Model self, ParticleIndexesKey attribute_key, ParticleIndex particle, IMP::ParticleIndexes value)
5582  set_attribute(Model self, ParticleIndexKey attribute_key, ParticleIndex particle, ParticleIndex value)
5583  set_attribute(Model self, ObjectKey attribute_key, ParticleIndex particle, Object value)
5584  set_attribute(Model self, IMP::WeakObjectKey attribute_key, ParticleIndex particle, Object value)
5585  set_attribute(Model self, SparseStringKey attribute_key, ParticleIndex particle, IMP::String value)
5586  set_attribute(Model self, SparseIntKey attribute_key, ParticleIndex particle, IMP::Int value)
5587  set_attribute(Model self, SparseFloatKey attribute_key, ParticleIndex particle, IMP::Float value)
5588  set_attribute(Model self, SparseParticleIndexKey attribute_key, ParticleIndex particle, ParticleIndex value)
5589  """
5590  return _IMP_kernel.Model_set_attribute(self, *args)
5591 
5592  def get_attribute(self, *args):
5593  r"""
5594  get_attribute(Model self, FloatKey attribute_key, ParticleIndex particle) -> IMP::Float
5595  get_attribute(Model self, IntKey attribute_key, ParticleIndex particle) -> IMP::Int
5596  get_attribute(Model self, FloatsKey attribute_key, ParticleIndex particle) -> IMP::Floats
5597  get_attribute(Model self, Vector3DKey attribute_key, ParticleIndex particle) -> IMP::algebra::Vector3D
5598  get_attribute(Model self, IntsKey attribute_key, ParticleIndex particle) -> IMP::Ints
5599  get_attribute(Model self, StringKey attribute_key, ParticleIndex particle) -> IMP::String
5600  get_attribute(Model self, ParticleIndexesKey attribute_key, ParticleIndex particle) -> IMP::ParticleIndexes
5601  get_attribute(Model self, ParticleIndexKey attribute_key, ParticleIndex particle) -> ParticleIndex
5602  get_attribute(Model self, ObjectKey attribute_key, ParticleIndex particle) -> Object
5603  get_attribute(Model self, IMP::WeakObjectKey attribute_key, ParticleIndex particle) -> Object
5604  get_attribute(Model self, SparseStringKey attribute_key, ParticleIndex particle) -> IMP::String
5605  get_attribute(Model self, SparseIntKey attribute_key, ParticleIndex particle) -> IMP::Int
5606  get_attribute(Model self, SparseFloatKey attribute_key, ParticleIndex particle) -> IMP::Float
5607  get_attribute(Model self, SparseParticleIndexKey attribute_key, ParticleIndex particle) -> ParticleIndex
5608  """
5609  return _IMP_kernel.Model_get_attribute(self, *args)
5610 
5611  def set_is_optimized(self, arg2, arg3, arg4):
5612  r"""set_is_optimized(Model self, FloatKey arg2, ParticleIndex arg3, bool arg4)"""
5613  return _IMP_kernel.Model_set_is_optimized(self, arg2, arg3, arg4)
5614 
5615  def add_to_derivative(self, k, particle, v, da):
5616  r"""add_to_derivative(Model self, FloatKey k, ParticleIndex particle, double v, DerivativeAccumulator da)"""
5617  return _IMP_kernel.Model_add_to_derivative(self, k, particle, v, da)
5618 
5619  def get_particle(self, p):
5620  r"""get_particle(Model self, ParticleIndex p) -> Particle"""
5621  return _IMP_kernel.Model_get_particle(self, p)
5622 
5623  def get_has_particle(self, p):
5624  r"""get_has_particle(Model self, ParticleIndex p) -> bool"""
5625  return _IMP_kernel.Model_get_has_particle(self, p)
5626 
5627  def get_particle_indexes(self):
5628  r"""get_particle_indexes(Model self) -> IMP::ParticleIndexes"""
5629  return _IMP_kernel.Model_get_particle_indexes(self)
5630 
5631  def get_model_objects(self):
5632  r"""get_model_objects(Model self) -> IMP::ModelObjectsTemp"""
5633  return _IMP_kernel.Model_get_model_objects(self)
5634 
5635  def remove_particle(self, pi):
5636  r"""remove_particle(Model self, ParticleIndex pi)"""
5637  return _IMP_kernel.Model_remove_particle(self, pi)
5638 
5639  def add_data(self, mk, o):
5640  r"""add_data(Model self, ModelKey mk, Object o)"""
5641  return _IMP_kernel.Model_add_data(self, mk, o)
5642 
5643  def get_data(self, mk):
5644  r"""get_data(Model self, ModelKey mk) -> Object"""
5645  return _IMP_kernel.Model_get_data(self, mk)
5646 
5647  def remove_data(self, mk):
5648  r"""remove_data(Model self, ModelKey mk)"""
5649  return _IMP_kernel.Model_remove_data(self, mk)
5650 
5651  def get_has_data(self, mk):
5652  r"""get_has_data(Model self, ModelKey mk) -> bool"""
5653  return _IMP_kernel.Model_get_has_data(self, mk)
5654 
5655  def get_age(self):
5656  r"""get_age(Model self) -> unsigned int"""
5657  return _IMP_kernel.Model_get_age(self)
5658 
5659  def get_trigger_last_updated(self, tk):
5660  r"""get_trigger_last_updated(Model self, TriggerKey tk) -> unsigned int"""
5661  return _IMP_kernel.Model_get_trigger_last_updated(self, tk)
5662 
5663  def set_trigger_updated(self, tk):
5664  r"""set_trigger_updated(Model self, TriggerKey tk)"""
5665  return _IMP_kernel.Model_set_trigger_updated(self, tk)
5666 
5667  def get_dependencies_updated(self):
5668  r"""get_dependencies_updated(Model self) -> unsigned int"""
5669  return _IMP_kernel.Model_get_dependencies_updated(self)
5670 
5671  def get_removed_particles_attributes_age(self):
5672  r"""get_removed_particles_attributes_age(Model self) -> unsigned int"""
5673  return _IMP_kernel.Model_get_removed_particles_attributes_age(self)
5674 
5675  def save_dependencies(self):
5676  r"""save_dependencies(Model self)"""
5677  return _IMP_kernel.Model_save_dependencies(self)
5678 
5679  def restore_dependencies(self):
5680  r"""restore_dependencies(Model self)"""
5681  return _IMP_kernel.Model_restore_dependencies(self)
5682 
5683  def get_particles_size(self):
5684  r"""get_particles_size(Model self) -> unsigned int"""
5685  return _IMP_kernel.Model_get_particles_size(self)
5686 
5687  def get_unique_id(self):
5688  r"""get_unique_id(Model self) -> uint32_t"""
5689  return _IMP_kernel.Model_get_unique_id(self)
5690 
5691  @staticmethod
5692  def get_by_unique_id(id):
5693  r"""get_by_unique_id(uint32_t id) -> Model"""
5694  return _IMP_kernel.Model_get_by_unique_id(id)
5695 
5696  def get_version_info(self):
5697  r"""get_version_info(Model self) -> VersionInfo"""
5698  return _IMP_kernel.Model_get_version_info(self)
5699  __swig_destroy__ = _IMP_kernel.delete_Model
5700  def __del__(self):
5701  r"""__del__(Model self)"""
5702 
5703  _director_objects.cleanup()
5704 
5705 
5706  pass
5707 
5708 
5709  def do_destroy(self):
5710  r"""do_destroy(Model self)"""
5711  return _IMP_kernel.Model_do_destroy(self)
5712 
5713  def __str__(self):
5714  r"""__str__(Model self) -> std::string"""
5715  return _IMP_kernel.Model___str__(self)
5716 
5717  def __repr__(self):
5718  r"""__repr__(Model self) -> std::string"""
5719  return _IMP_kernel.Model___repr__(self)
5720 
5721  @staticmethod
5722  def get_from(o):
5723  return _object_cast_to_Model(o)
5724 
5725 
5726  def _get_as_binary(self):
5727  r"""_get_as_binary(Model self) -> PyObject *"""
5728  return _IMP_kernel.Model__get_as_binary(self)
5729 
5730  def _set_from_binary(self, p):
5731  r"""_set_from_binary(Model self, PyObject * p)"""
5732  return _IMP_kernel.Model__set_from_binary(self, p)
5733 
5734  def __getstate__(self):
5735  p = self._get_as_binary()
5736  if len(self.__dict__) > 1:
5737  d = self.__dict__.copy()
5738  del d['this']
5739  p = (d, p)
5740  return p
5741 
5742  def __setstate__(self, p):
5743  if not hasattr(self, 'this'):
5744  self.__init__()
5745  if isinstance(p, tuple):
5746  d, p = p
5747  self.__dict__.update(d)
5748  return self._set_from_binary(p)
5749 
5750 
5751  def get_ints_numpy(self, k, read_only=False):
5752  """Get the model's attribute array for IntKey k as a NumPy array.
5753  The array is indexed by ParticleIndex; particles that don't have
5754  this attribute will either be off the end of the array or will have
5755  the value INT_MAX.
5756  This is a NumPy view that shares memory with the Model. Thus,
5757  any changes to values in this list will be reflected in the Model.
5758  Also, if the Model attribute array moves in memory (e.g. if particles
5759  or attributes are added) this array will be invalidated, so it is
5760  unsafe to keep it around long term.
5761  If read_only is set True, values in the array cannot be changed.
5762  """
5763  return _get_ints_numpy(self, k, self, read_only)
5764 
5765  def get_numpy(self, k, read_only=False):
5766  """Get the model's attribute array for any type of Key
5767  k as a NumPy array. See Model::get_ints_numpy() for more details."""
5768  _numpy_meth_map = {IntKey: _get_ints_numpy,
5769  FloatKey: _get_floats_numpy,
5770  Vector3DKey: _get_vector3ds_numpy}
5771  return _numpy_meth_map[type(k)](self, k, self, read_only)
5772 
5773  def get_floats_numpy(self, k, read_only=False):
5774  """Get the model's attribute array for FloatKey k as a NumPy array.
5775  See Model::get_ints_numpy() for more details."""
5776  return _get_floats_numpy(self, k, self, read_only)
5777 
5778  def get_derivatives_numpy(self, k, read_only=False):
5779  """Get the model's attribute derivatives array for FloatKey k
5780  as a NumPy array. See Model::get_ints_numpy() for more details."""
5781  return _get_derivatives_numpy(self, k, self, read_only)
5782 
5783  def get_vector3ds_numpy(self, k, read_only=False):
5784  """Get the model's attribute array for Vector3DKey k as a NumPy array.
5785  See Model::get_ints_numpy() for more details."""
5786  return _get_vector3ds_numpy(self, k, self, read_only)
5787 
5788  def get_spheres_numpy(self, read_only=False):
5789  """Get the model's XYZR attribute arrays as NumPy arrays.
5790  The attribute arrays for Cartesian coordinates and radii are
5791  stored separately from those for other FloatKeys. This function
5792  returns a tuple of two NumPy arrays, the first of coordinates and
5793  the second of radii. See Model::get_ints_numpy() for more details."""
5794  return _get_spheres_numpy(self, self, read_only)
5795 
5796  def get_sphere_derivatives_numpy(self, read_only=False):
5797  """Get the model's XYZR attribute derivatives arrays as NumPy arrays.
5798  See Model::get_ints_numpy() for more details."""
5799  return _get_sphere_derivatives_numpy(self, self, read_only)
5800 
5801  def get_internal_coordinates_numpy(self, read_only=False):
5802  """Get the model's internal coordinate array as a NumPy array.
5803  The attribute arrays for rigid body internal coordinates are
5804  stored separately from those for other FloatKeys.
5805  See Model::get_ints_numpy() for more details."""
5806  return _get_internal_coordinates_numpy(self, self, read_only)
5807 
5808  def get_internal_coordinate_derivatives_numpy(self, read_only=False):
5809  """Get the model's internal coordinate derivative array as a
5810  NumPy array.
5811  See Model::get_ints_numpy() for more details."""
5812  return _get_internal_coordinate_derivatives_numpy(
5813  self, self, read_only)
5814 
5815 
5816 # Register Model in _IMP_kernel:
5817 _IMP_kernel.Model_swigregister(Model)
5818 class Decorator(_Value):
5819  r"""Proxy of C++ IMP::Decorator class."""
5820 
5821  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5822  __repr__ = _swig_repr
5823 
5824  def __init__(self, p):
5825  r"""__init__(Decorator self, _ParticleAdaptor p) -> Decorator"""
5826  _IMP_kernel.Decorator_swiginit(self, _IMP_kernel.new_Decorator(p))
5827 
5828  def __ne__(self, o):
5829  r"""__ne__(Decorator self, Object o) -> bool"""
5830  return _IMP_kernel.Decorator___ne__(self, o)
5831 
5832  def __lt__(self, o):
5833  r"""__lt__(Decorator self, Object o) -> bool"""
5834  return _IMP_kernel.Decorator___lt__(self, o)
5835 
5836  def __gt__(self, o):
5837  r"""__gt__(Decorator self, Object o) -> bool"""
5838  return _IMP_kernel.Decorator___gt__(self, o)
5839 
5840  def __ge__(self, o):
5841  r"""__ge__(Decorator self, Object o) -> bool"""
5842  return _IMP_kernel.Decorator___ge__(self, o)
5843 
5844  def __le__(self, o):
5845  r"""__le__(Decorator self, Object o) -> bool"""
5846  return _IMP_kernel.Decorator___le__(self, o)
5847 
5848  def get_particle(self):
5849  r"""get_particle(Decorator self) -> Particle"""
5850  return _IMP_kernel.Decorator_get_particle(self)
5851 
5852  def get_particle_index(self):
5853  r"""get_particle_index(Decorator self) -> ParticleIndex"""
5854  return _IMP_kernel.Decorator_get_particle_index(self)
5855 
5856  def get_model(self):
5857  m = _IMP_kernel.Decorator_get_model(self)
5858  if m in _models_set:
5859  m = _models_set_get(m)
5860  return m
5861 
5862 
5863 
5864  def get_is_valid(self):
5865  r"""get_is_valid(Decorator self) -> bool"""
5866  return _IMP_kernel.Decorator_get_is_valid(self)
5867 
5868  def __hash__(self):
5869  r"""__hash__(Decorator self) -> std::size_t"""
5870  return _IMP_kernel.Decorator___hash__(self)
5871 
5872  def __eq__(self, *args):
5873  r"""
5874  __eq__(Decorator self, Object o) -> bool
5875  __eq__(Decorator self, Decorator o) -> bool
5876  __eq__(Decorator self, Particle o) -> bool
5877  """
5878  return _IMP_kernel.Decorator___eq__(self, *args)
5879 
5880  def __bool__(self):
5881  r"""__bool__(Decorator self) -> bool"""
5882  return _IMP_kernel.Decorator___bool__(self)
5883  __swig_destroy__ = _IMP_kernel.delete_Decorator
5884 
5885 # Register Decorator in _IMP_kernel:
5886 _IMP_kernel.Decorator_swigregister(Decorator)
5887 
5888 def check_particle(m, pi):
5889  r"""check_particle(Model m, ParticleIndex pi)"""
5890  return _IMP_kernel.check_particle(m, pi)
5891 class UnaryFunction(Object):
5892  r"""Proxy of C++ IMP::UnaryFunction class."""
5893 
5894  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5895 
5896  def __init__(self, *args):
5897  r"""__init__(UnaryFunction self, std::string name="UnaryFunction%1%") -> UnaryFunction"""
5898  if self.__class__ == UnaryFunction:
5899  _self = None
5900  else:
5901  _self = self
5902  _IMP_kernel.UnaryFunction_swiginit(self, _IMP_kernel.new_UnaryFunction(_self, *args))
5903 
5904  if self.__class__ != UnaryFunction:
5905  _director_objects.register(self)
5906 
5907 
5908 
5909 
5910  def evaluate(self, feature):
5911  r"""evaluate(UnaryFunction self, double feature) -> double"""
5912  return _IMP_kernel.UnaryFunction_evaluate(self, feature)
5913 
5914  def evaluate_with_derivative(self, feature):
5915  r"""evaluate_with_derivative(UnaryFunction self, double feature) -> IMP::DerivativePair"""
5916  return _IMP_kernel.UnaryFunction_evaluate_with_derivative(self, feature)
5917  __swig_destroy__ = _IMP_kernel.delete_UnaryFunction
5918 
5919  def __str__(self):
5920  r"""__str__(UnaryFunction self) -> std::string"""
5921  return _IMP_kernel.UnaryFunction___str__(self)
5922 
5923  def __repr__(self):
5924  r"""__repr__(UnaryFunction self) -> std::string"""
5925  return _IMP_kernel.UnaryFunction___repr__(self)
5926 
5927  @staticmethod
5928  def get_from(o):
5929  return _object_cast_to_UnaryFunction(o)
5930 
5931 
5932  def do_show(self, out):
5933  pass
5934 
5935  @staticmethod
5936  def get_from(o):
5937  return _object_cast_to_UnaryFunction(o)
5938 
5939 
5940  def _get_jax(self):
5941  """Return a JAX implementation of this UnaryFunction.
5942  Implement this method in a UnaryFunction subclass to provide
5943  an equivalent function using [JAX](https://docs.jax.dev/)
5944  that scores the provided feature value.
5945  """
5946  raise NotImplementedError(f"No JAX implementation for {self}")
5947 
5948  def __disown__(self):
5949  self.this.disown()
5950  _IMP_kernel.disown_UnaryFunction(self)
5951  return weakref.proxy(self)
5952 
5953  def do_destroy(self):
5954  r"""do_destroy(UnaryFunction self)"""
5955  return _IMP_kernel.UnaryFunction_do_destroy(self)
5956 
5957 # Register UnaryFunction in _IMP_kernel:
5958 _IMP_kernel.UnaryFunction_swigregister(UnaryFunction)
5960  r"""Proxy of C++ IMP::OptimizerState class."""
5961 
5962  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
5963 
5964  def __init__(self, *args):
5965  r"""
5966  __init__(OptimizerState self, Model m, std::string name) -> OptimizerState
5967  __init__(OptimizerState self) -> OptimizerState
5968  """
5969  if self.__class__ == OptimizerState:
5970  _self = None
5971  else:
5972  _self = self
5973  _IMP_kernel.OptimizerState_swiginit(self, _IMP_kernel.new_OptimizerState(_self, *args))
5974 
5975  if self.__class__ != OptimizerState:
5976  _director_objects.register(self)
5977 
5978 
5979 
5980 
5981  def update(self):
5982  r"""update(OptimizerState self)"""
5983  return _IMP_kernel.OptimizerState_update(self)
5984 
5985  def set_is_optimizing(self, arg0):
5986  r"""set_is_optimizing(OptimizerState self, bool arg0)"""
5987  return _IMP_kernel.OptimizerState_set_is_optimizing(self, arg0)
5988 
5989  def get_optimizer(self):
5990  r"""get_optimizer(OptimizerState self) -> Optimizer"""
5991  return _IMP_kernel.OptimizerState_get_optimizer(self)
5992 
5993  def set_period(self, p):
5994  r"""set_period(OptimizerState self, unsigned int p)"""
5995  return _IMP_kernel.OptimizerState_set_period(self, p)
5996 
5997  def get_period(self):
5998  r"""get_period(OptimizerState self) -> unsigned int"""
5999  return _IMP_kernel.OptimizerState_get_period(self)
6000 
6001  def reset(self):
6002  r"""reset(OptimizerState self)"""
6003  return _IMP_kernel.OptimizerState_reset(self)
6004 
6005  def update_always(self):
6006  r"""update_always(OptimizerState self)"""
6007  return _IMP_kernel.OptimizerState_update_always(self)
6008 
6009  def get_number_of_updates(self):
6010  r"""get_number_of_updates(OptimizerState self) -> unsigned int"""
6011  return _IMP_kernel.OptimizerState_get_number_of_updates(self)
6012 
6013  def set_number_of_updates(self, n):
6014  r"""set_number_of_updates(OptimizerState self, unsigned int n)"""
6015  return _IMP_kernel.OptimizerState_set_number_of_updates(self, n)
6016  __swig_destroy__ = _IMP_kernel.delete_OptimizerState
6017 
6018  def do_update(self, arg0):
6019  r"""do_update(OptimizerState self, unsigned int arg0)"""
6020  return _IMP_kernel.OptimizerState_do_update(self, arg0)
6021 
6022  def do_set_is_optimizing(self, arg0):
6023  r"""do_set_is_optimizing(OptimizerState self, bool arg0)"""
6024  return _IMP_kernel.OptimizerState_do_set_is_optimizing(self, arg0)
6025 
6026  def do_get_inputs(self):
6027  r"""do_get_inputs(OptimizerState self) -> IMP::ModelObjectsTemp"""
6028  return _IMP_kernel.OptimizerState_do_get_inputs(self)
6029 
6030  def do_get_outputs(self):
6031  r"""do_get_outputs(OptimizerState self) -> IMP::ModelObjectsTemp"""
6032  return _IMP_kernel.OptimizerState_do_get_outputs(self)
6033 
6034  def __str__(self):
6035  r"""__str__(OptimizerState self) -> std::string"""
6036  return _IMP_kernel.OptimizerState___str__(self)
6037 
6038  def __repr__(self):
6039  r"""__repr__(OptimizerState self) -> std::string"""
6040  return _IMP_kernel.OptimizerState___repr__(self)
6041 
6042  @staticmethod
6043  def get_from(o):
6044  return _object_cast_to_OptimizerState(o)
6045 
6046 
6047  def do_show(self, out):
6048  pass
6049 
6050  @staticmethod
6051  def get_from(o):
6052  return _object_cast_to_OptimizerState(o)
6053 
6054 
6055  def _get_jax(self, state_index):
6056  """Add JAX support for this OptimizerState.
6057 
6058  Each OptimizerState must explicitly support how it is going to
6059  be called when the Optimizer is run via JAX.
6060 
6061  OptimizerStates can run as traditional IMP CPU code
6062  on the IMP Model object, in which case None should be returned here.
6063  The Optimizer will sync any necessary information from JAX back
6064  with the IMP Model before calling the OptimizerState. However,
6065  the OptimizerState is not permitted to modify the Model; any
6066  changes will not be propagated back to the Optimizer.
6067  (For example, a thermostat which tries to change particle
6068  velocities will not function correctly.)
6069 
6070  Alternatively, a pure JAX implementation can be provided.
6071  See _wrap_jax for more information.
6072  """
6073  raise NotImplementedError(f"No JAX implementation for {self}")
6074 
6075  def _wrap_jax(self, init_func, apply_func):
6076  """Create the return value for _get_jax.
6077  Use this method in _get_jax() to wrap the JAX function
6078  with other OptimizerState-specific information.
6079 
6080  @param init_func a JAX function which, given a JAX Optimizer,
6081  does any necessary setup and returns a (possibly modified)
6082  JAX Optimizer. If any OptimizerState-specific
6083  persistent state is needed, it can be stored in
6084  `opt.optimizer_states[state_index]` and later retrieved or
6085  modified in apply_func.
6086  @param apply_func a JAX function which, given a JAX Optimizer,
6087  does the JAX equivalent of do_update() and returns a new
6088  JAX Optimizer.
6089  """
6090  from IMP._jax_util import JAXOptimizerStateInfo
6091  return JAXOptimizerStateInfo(self, init_func, apply_func)
6092 
6093  def __disown__(self):
6094  self.this.disown()
6095  _IMP_kernel.disown_OptimizerState(self)
6096  return weakref.proxy(self)
6097 
6098  def do_destroy(self):
6099  r"""do_destroy(OptimizerState self)"""
6100  return _IMP_kernel.OptimizerState_do_destroy(self)
6101 
6102  def handle_set_has_required_score_states(self, arg0):
6103  r"""handle_set_has_required_score_states(OptimizerState self, bool arg0)"""
6104  return _IMP_kernel.OptimizerState_handle_set_has_required_score_states(self, arg0)
6105 
6106  def do_get_interactions(self):
6107  r"""do_get_interactions(OptimizerState self) -> IMP::ModelObjectsTemps"""
6108  return _IMP_kernel.OptimizerState_do_get_interactions(self)
6109 
6110 # Register OptimizerState in _IMP_kernel:
6111 _IMP_kernel.OptimizerState_swigregister(OptimizerState)
6112 class Refiner(_ParticleInputs, Object):
6113  r"""Proxy of C++ IMP::Refiner class."""
6114 
6115  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6116 
6117  def __init__(self, *args):
6118  r"""__init__(Refiner self, std::string name="Refiner %1%", bool is_by_ref=False) -> Refiner"""
6119  if self.__class__ == Refiner:
6120  _self = None
6121  else:
6122  _self = self
6123  _IMP_kernel.Refiner_swiginit(self, _IMP_kernel.new_Refiner(_self, *args))
6124 
6125  if self.__class__ != Refiner:
6126  _director_objects.register(self)
6127 
6128 
6129 
6130 
6131  def get_can_refine(self, arg0):
6132  r"""get_can_refine(Refiner self, Particle arg0) -> bool"""
6133  return _IMP_kernel.Refiner_get_can_refine(self, arg0)
6134 
6135  def get_refined_indexes(self, m, pi):
6136  r"""get_refined_indexes(Refiner self, Model m, ParticleIndex pi) -> IMP::ParticleIndexes"""
6137  return _IMP_kernel.Refiner_get_refined_indexes(self, m, pi)
6138 
6139  def get_refined_indexes_by_ref(self, m, pi):
6140  r"""get_refined_indexes_by_ref(Refiner self, Model m, ParticleIndex pi) -> IMP::ParticleIndexes const &"""
6141  return _IMP_kernel.Refiner_get_refined_indexes_by_ref(self, m, pi)
6142 
6143  def get_is_by_ref_supported(self):
6144  r"""get_is_by_ref_supported(Refiner self) -> bool"""
6145  return _IMP_kernel.Refiner_get_is_by_ref_supported(self)
6146 
6147  def get_refined(self, *args):
6148  r"""
6149  get_refined(Refiner self, Particle a) -> IMP::ParticlesTemp const
6150  get_refined(Refiner self, Particle a, unsigned int i) -> Particle
6151  """
6152  return _IMP_kernel.Refiner_get_refined(self, *args)
6153 
6154  def get_number_of_refined(self, a):
6155  r"""get_number_of_refined(Refiner self, Particle a) -> unsigned int"""
6156  return _IMP_kernel.Refiner_get_number_of_refined(self, a)
6157 
6158  def __str__(self):
6159  r"""__str__(Refiner self) -> std::string"""
6160  return _IMP_kernel.Refiner___str__(self)
6161 
6162  def __repr__(self):
6163  r"""__repr__(Refiner self) -> std::string"""
6164  return _IMP_kernel.Refiner___repr__(self)
6165 
6166  @staticmethod
6167  def get_from(o):
6168  return _object_cast_to_Refiner(o)
6169 
6170 
6171  def do_show(self, out):
6172  pass
6173 
6174  @staticmethod
6175  def get_from(o):
6176  return _object_cast_to_Refiner(o)
6177 
6178  __swig_destroy__ = _IMP_kernel.delete_Refiner
6179  def __disown__(self):
6180  self.this.disown()
6181  _IMP_kernel.disown_Refiner(self)
6182  return weakref.proxy(self)
6183 
6184  def do_get_inputs(self, m, pis):
6185  r"""do_get_inputs(Refiner self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6186  return _IMP_kernel.Refiner_do_get_inputs(self, m, pis)
6187 
6188  def do_destroy(self):
6189  r"""do_destroy(Refiner self)"""
6190  return _IMP_kernel.Refiner_do_destroy(self)
6191 
6192 # Register Refiner in _IMP_kernel:
6193 _IMP_kernel.Refiner_swigregister(Refiner)
6194 class Optimizer(ModelObject):
6195  r"""Proxy of C++ IMP::Optimizer class."""
6196 
6197  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6198 
6199  def set_is_optimizing_states(self, tf):
6200  r"""set_is_optimizing_states(Optimizer self, bool tf)"""
6201  return _IMP_kernel.Optimizer_set_is_optimizing_states(self, tf)
6202 
6203  def get_optimizer_state_inputs(self):
6204  r"""get_optimizer_state_inputs(Optimizer self) -> IMP::ModelObjectsTemp"""
6205  return _IMP_kernel.Optimizer_get_optimizer_state_inputs(self)
6206 
6207  def do_get_inputs(self):
6208  r"""do_get_inputs(Optimizer self) -> IMP::ModelObjectsTemp"""
6209  return _IMP_kernel.Optimizer_do_get_inputs(self)
6210 
6211  def do_get_outputs(self):
6212  r"""do_get_outputs(Optimizer self) -> IMP::ModelObjectsTemp"""
6213  return _IMP_kernel.Optimizer_do_get_outputs(self)
6214 
6215  def __init__(self, *args):
6216  r"""
6217  __init__(Optimizer self, Model m, std::string name="Optimizer %1%") -> Optimizer
6218  __init__(Optimizer self) -> Optimizer
6219  """
6220  if self.__class__ == Optimizer:
6221  _self = None
6222  else:
6223  _self = self
6224  _IMP_kernel.Optimizer_swiginit(self, _IMP_kernel.new_Optimizer(_self, *args))
6225 
6226  if self.__class__ != Optimizer:
6227  _director_objects.register(self)
6228 
6229 
6230 
6231 
6232  def optimize(self, max_steps):
6233  r"""optimize(Optimizer self, unsigned int max_steps) -> double"""
6234  return _IMP_kernel.Optimizer_optimize(self, max_steps)
6235 
6236  def set_stop_on_good_score(self, tf):
6237  r"""set_stop_on_good_score(Optimizer self, bool tf)"""
6238  return _IMP_kernel.Optimizer_set_stop_on_good_score(self, tf)
6239 
6240  def get_stop_on_good_score(self):
6241  r"""get_stop_on_good_score(Optimizer self) -> bool"""
6242  return _IMP_kernel.Optimizer_get_stop_on_good_score(self)
6243 
6244  def get_last_score(self):
6245  r"""get_last_score(Optimizer self) -> double"""
6246  return _IMP_kernel.Optimizer_get_last_score(self)
6247 
6248  def get_scoring_function(self):
6249  r"""get_scoring_function(Optimizer self) -> ScoringFunction"""
6250  return _IMP_kernel.Optimizer_get_scoring_function(self)
6251  def __get_optimizer_states(self): return _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)
6252  def __set_optimizer_states(self, obj): _list_util.set_varlist(self.optimizer_states, obj)
6253  def __del_optimizer_states(self): _list_util.del_varlist(self.optimizer_states)
6254  optimizer_states = property(__get_optimizer_states, __set_optimizer_states, __del_optimizer_states, doc="List of ##ucnames")
6255 
6256  def remove_optimizer_state(self, d):
6257  r"""remove_optimizer_state(Optimizer self, OptimizerState d)"""
6258  return _IMP_kernel.Optimizer_remove_optimizer_state(self, d)
6259 
6260  def _python_index_optimizer_state(self, d, start, stop):
6261  r"""_python_index_optimizer_state(Optimizer self, OptimizerState d, unsigned int start, unsigned int stop) -> unsigned int"""
6262  return _IMP_kernel.Optimizer__python_index_optimizer_state(self, d, start, stop)
6263 
6264  def remove_optimizer_states(self, d):
6265  r"""remove_optimizer_states(Optimizer self, IMP::OptimizerStates const & d)"""
6266  return _IMP_kernel.Optimizer_remove_optimizer_states(self, d)
6267 
6268  def set_optimizer_states(self, ps):
6269  r"""set_optimizer_states(Optimizer self, IMP::OptimizerStates const & ps)"""
6270  return _IMP_kernel.Optimizer_set_optimizer_states(self, ps)
6271 
6272  def set_optimizer_states_order(self, objs):
6273  r"""set_optimizer_states_order(Optimizer self, IMP::OptimizerStates const & objs)"""
6274  return _IMP_kernel.Optimizer_set_optimizer_states_order(self, objs)
6275 
6276  def add_optimizer_state(self, obj):
6277  r"""add_optimizer_state(Optimizer self, OptimizerState obj) -> unsigned int"""
6278  return _IMP_kernel.Optimizer_add_optimizer_state(self, obj)
6279 
6280  def add_optimizer_states(self, objs):
6281  r"""add_optimizer_states(Optimizer self, IMP::OptimizerStates const & objs)"""
6282  return _IMP_kernel.Optimizer_add_optimizer_states(self, objs)
6283 
6284  def clear_optimizer_states(self):
6285  r"""clear_optimizer_states(Optimizer self)"""
6286  return _IMP_kernel.Optimizer_clear_optimizer_states(self)
6287 
6288  def get_number_of_optimizer_states(self):
6289  r"""get_number_of_optimizer_states(Optimizer self) -> unsigned int"""
6290  return _IMP_kernel.Optimizer_get_number_of_optimizer_states(self)
6291 
6292  def get_has_optimizer_states(self):
6293  r"""get_has_optimizer_states(Optimizer self) -> bool"""
6294  return _IMP_kernel.Optimizer_get_has_optimizer_states(self)
6295 
6296  def get_optimizer_state(self, i):
6297  r"""get_optimizer_state(Optimizer self, unsigned int i) -> OptimizerState"""
6298  return _IMP_kernel.Optimizer_get_optimizer_state(self, i)
6299 
6300  def get_optimizer_states(self):
6301  r"""get_optimizer_states(Optimizer self) -> IMP::OptimizerStates"""
6302  return _IMP_kernel.Optimizer_get_optimizer_states(self)
6303 
6304  def erase_optimizer_state(self, i):
6305  r"""erase_optimizer_state(Optimizer self, unsigned int i)"""
6306  return _IMP_kernel.Optimizer_erase_optimizer_state(self, i)
6307 
6308  def reserve_optimizer_states(self, sz):
6309  r"""reserve_optimizer_states(Optimizer self, unsigned int sz)"""
6310  return _IMP_kernel.Optimizer_reserve_optimizer_states(self, sz)
6311 
6312  def set_scoring_function(self, sf):
6313  r"""set_scoring_function(Optimizer self, _ScoringFunctionAdaptor sf)"""
6314  return _IMP_kernel.Optimizer_set_scoring_function(self, sf)
6315  __swig_destroy__ = _IMP_kernel.delete_Optimizer
6316  def __del__(self):
6317  r"""__del__(Optimizer self)"""
6318 
6319  _director_objects.cleanup()
6320 
6321 
6322  pass
6323 
6324 
6325  def do_optimize(self, ns):
6326  r"""do_optimize(Optimizer self, unsigned int ns) -> double"""
6327  return _IMP_kernel.Optimizer_do_optimize(self, ns)
6328 
6329  def update_states(self):
6330  r"""update_states(Optimizer self)"""
6331  return _IMP_kernel.Optimizer_update_states(self)
6332 
6333  def __str__(self):
6334  r"""__str__(Optimizer self) -> std::string"""
6335  return _IMP_kernel.Optimizer___str__(self)
6336 
6337  def __repr__(self):
6338  r"""__repr__(Optimizer self) -> std::string"""
6339  return _IMP_kernel.Optimizer___repr__(self)
6340 
6341  @staticmethod
6342  def get_from(o):
6343  return _object_cast_to_Optimizer(o)
6344 
6345 
6346  def do_show(self, out):
6347  pass
6348 
6349  @staticmethod
6350  def get_from(o):
6351  return _object_cast_to_Optimizer(o)
6352 
6353  def __disown__(self):
6354  self.this.disown()
6355  _IMP_kernel.disown_Optimizer(self)
6356  return weakref.proxy(self)
6357 
6358  def do_destroy(self):
6359  r"""do_destroy(Optimizer self)"""
6360  return _IMP_kernel.Optimizer_do_destroy(self)
6361 
6362  def handle_set_has_required_score_states(self, arg0):
6363  r"""handle_set_has_required_score_states(Optimizer self, bool arg0)"""
6364  return _IMP_kernel.Optimizer_handle_set_has_required_score_states(self, arg0)
6365 
6366  def do_get_interactions(self):
6367  r"""do_get_interactions(Optimizer self) -> IMP::ModelObjectsTemps"""
6368  return _IMP_kernel.Optimizer_do_get_interactions(self)
6369 
6370 # Register Optimizer in _IMP_kernel:
6371 _IMP_kernel.Optimizer_swigregister(Optimizer)
6373  r"""Proxy of C++ IMP::AttributeOptimizer class."""
6374 
6375  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6376 
6377  def __init__(self, *args):
6378  r"""
6379  __init__(AttributeOptimizer self, Model m, std::string name="Optimizer %1%") -> AttributeOptimizer
6380  __init__(AttributeOptimizer self) -> AttributeOptimizer
6381  """
6382  if self.__class__ == AttributeOptimizer:
6383  _self = None
6384  else:
6385  _self = self
6386  _IMP_kernel.AttributeOptimizer_swiginit(self, _IMP_kernel.new_AttributeOptimizer(_self, *args))
6387 
6388  if self.__class__ != AttributeOptimizer:
6389  _director_objects.register(self)
6390 
6391 
6392 
6393 
6394  def get_optimized_attributes(self):
6395  r"""get_optimized_attributes(AttributeOptimizer self) -> IMP::FloatIndexes"""
6396  return _IMP_kernel.AttributeOptimizer_get_optimized_attributes(self)
6397 
6398  def set_value(self, fi, v):
6399  r"""set_value(AttributeOptimizer self, FloatIndex fi, double v)"""
6400  return _IMP_kernel.AttributeOptimizer_set_value(self, fi, v)
6401 
6402  def get_value(self, fi):
6403  r"""get_value(AttributeOptimizer self, FloatIndex fi) -> IMP::Float"""
6404  return _IMP_kernel.AttributeOptimizer_get_value(self, fi)
6405 
6406  def get_derivative(self, fi):
6407  r"""get_derivative(AttributeOptimizer self, FloatIndex fi) -> IMP::Float"""
6408  return _IMP_kernel.AttributeOptimizer_get_derivative(self, fi)
6409 
6410  def get_width(self, k):
6411  r"""get_width(AttributeOptimizer self, FloatKey k) -> double"""
6412  return _IMP_kernel.AttributeOptimizer_get_width(self, k)
6413 
6414  def set_scaled_value(self, fi, v):
6415  r"""set_scaled_value(AttributeOptimizer self, FloatIndex fi, IMP::Float v)"""
6416  return _IMP_kernel.AttributeOptimizer_set_scaled_value(self, fi, v)
6417 
6418  def get_scaled_value(self, fi):
6419  r"""get_scaled_value(AttributeOptimizer self, FloatIndex fi) -> double"""
6420  return _IMP_kernel.AttributeOptimizer_get_scaled_value(self, fi)
6421 
6422  def get_scaled_derivative(self, fi):
6423  r"""get_scaled_derivative(AttributeOptimizer self, FloatIndex fi) -> double"""
6424  return _IMP_kernel.AttributeOptimizer_get_scaled_derivative(self, fi)
6425 
6426  def clear_range_cache(self):
6427  r"""clear_range_cache(AttributeOptimizer self)"""
6428  return _IMP_kernel.AttributeOptimizer_clear_range_cache(self)
6429 
6430  def __str__(self):
6431  r"""__str__(AttributeOptimizer self) -> std::string"""
6432  return _IMP_kernel.AttributeOptimizer___str__(self)
6433 
6434  def __repr__(self):
6435  r"""__repr__(AttributeOptimizer self) -> std::string"""
6436  return _IMP_kernel.AttributeOptimizer___repr__(self)
6437 
6438  @staticmethod
6439  def get_from(o):
6440  return _object_cast_to_AttributeOptimizer(o)
6441 
6442 
6443  def do_show(self, out):
6444  pass
6445 
6446  @staticmethod
6447  def get_from(o):
6448  return _object_cast_to_AttributeOptimizer(o)
6449 
6450  __swig_destroy__ = _IMP_kernel.delete_AttributeOptimizer
6451  def __disown__(self):
6452  self.this.disown()
6453  _IMP_kernel.disown_AttributeOptimizer(self)
6454  return weakref.proxy(self)
6455 
6456  def do_destroy(self):
6457  r"""do_destroy(AttributeOptimizer self)"""
6458  return _IMP_kernel.AttributeOptimizer_do_destroy(self)
6459 
6460  def handle_set_has_required_score_states(self, arg0):
6461  r"""handle_set_has_required_score_states(AttributeOptimizer self, bool arg0)"""
6462  return _IMP_kernel.AttributeOptimizer_handle_set_has_required_score_states(self, arg0)
6463 
6464  def do_get_inputs(self):
6465  r"""do_get_inputs(AttributeOptimizer self) -> IMP::ModelObjectsTemp"""
6466  return _IMP_kernel.AttributeOptimizer_do_get_inputs(self)
6467 
6468  def do_get_outputs(self):
6469  r"""do_get_outputs(AttributeOptimizer self) -> IMP::ModelObjectsTemp"""
6470  return _IMP_kernel.AttributeOptimizer_do_get_outputs(self)
6471 
6472  def do_get_interactions(self):
6473  r"""do_get_interactions(AttributeOptimizer self) -> IMP::ModelObjectsTemps"""
6474  return _IMP_kernel.AttributeOptimizer_do_get_interactions(self)
6475 
6476  def do_optimize(self, ns):
6477  r"""do_optimize(AttributeOptimizer self, unsigned int ns) -> double"""
6478  return _IMP_kernel.AttributeOptimizer_do_optimize(self, ns)
6479 
6480 # Register AttributeOptimizer in _IMP_kernel:
6481 _IMP_kernel.AttributeOptimizer_swigregister(AttributeOptimizer)
6482 class ConfigurationSet(Object):
6483  r"""Proxy of C++ IMP::ConfigurationSet class."""
6484 
6485  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6486 
6487  def __init__(self, *args):
6488  r"""__init__(ConfigurationSet self, Model m, std::string name="ConfigurationSet %1%") -> ConfigurationSet"""
6489  _IMP_kernel.ConfigurationSet_swiginit(self, _IMP_kernel.new_ConfigurationSet(*args))
6490 
6491  def save_configuration(self):
6492  r"""save_configuration(ConfigurationSet self)"""
6493  return _IMP_kernel.ConfigurationSet_save_configuration(self)
6494 
6495  def get_number_of_configurations(self):
6496  r"""get_number_of_configurations(ConfigurationSet self) -> unsigned int"""
6497  return _IMP_kernel.ConfigurationSet_get_number_of_configurations(self)
6498 
6499  def load_configuration(self, i):
6500  r"""load_configuration(ConfigurationSet self, int i)"""
6501  return _IMP_kernel.ConfigurationSet_load_configuration(self, i)
6502 
6503  def remove_configuration(self, i):
6504  r"""remove_configuration(ConfigurationSet self, unsigned int i)"""
6505  return _IMP_kernel.ConfigurationSet_remove_configuration(self, i)
6506 
6507  def get_model(self):
6508  r"""get_model(ConfigurationSet self) -> Model"""
6509  return _IMP_kernel.ConfigurationSet_get_model(self)
6510 
6511  def get_version_info(self):
6512  r"""get_version_info(ConfigurationSet self) -> VersionInfo"""
6513  return _IMP_kernel.ConfigurationSet_get_version_info(self)
6514  __swig_destroy__ = _IMP_kernel.delete_ConfigurationSet
6515 
6516  def __str__(self):
6517  r"""__str__(ConfigurationSet self) -> std::string"""
6518  return _IMP_kernel.ConfigurationSet___str__(self)
6519 
6520  def __repr__(self):
6521  r"""__repr__(ConfigurationSet self) -> std::string"""
6522  return _IMP_kernel.ConfigurationSet___repr__(self)
6523 
6524  @staticmethod
6525  def get_from(o):
6526  return _object_cast_to_ConfigurationSet(o)
6527 
6528 
6529 # Register ConfigurationSet in _IMP_kernel:
6530 _IMP_kernel.ConfigurationSet_swigregister(ConfigurationSet)
6532  r"""Proxy of C++ IMP::SaveToConfigurationSetOptimizerState class."""
6533 
6534  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6535 
6536  def __init__(self, cs):
6537  r"""__init__(SaveToConfigurationSetOptimizerState self, ConfigurationSet cs) -> SaveToConfigurationSetOptimizerState"""
6538  _IMP_kernel.SaveToConfigurationSetOptimizerState_swiginit(self, _IMP_kernel.new_SaveToConfigurationSetOptimizerState(cs))
6539 
6540  def get_version_info(self):
6541  r"""get_version_info(SaveToConfigurationSetOptimizerState self) -> VersionInfo"""
6542  return _IMP_kernel.SaveToConfigurationSetOptimizerState_get_version_info(self)
6543  __swig_destroy__ = _IMP_kernel.delete_SaveToConfigurationSetOptimizerState
6544 
6545  def __str__(self):
6546  r"""__str__(SaveToConfigurationSetOptimizerState self) -> std::string"""
6547  return _IMP_kernel.SaveToConfigurationSetOptimizerState___str__(self)
6548 
6549  def __repr__(self):
6550  r"""__repr__(SaveToConfigurationSetOptimizerState self) -> std::string"""
6551  return _IMP_kernel.SaveToConfigurationSetOptimizerState___repr__(self)
6552 
6553  @staticmethod
6554  def get_from(o):
6555  return _object_cast_to_SaveToConfigurationSetOptimizerState(o)
6556 
6557 
6558 # Register SaveToConfigurationSetOptimizerState in _IMP_kernel:
6559 _IMP_kernel.SaveToConfigurationSetOptimizerState_swigregister(SaveToConfigurationSetOptimizerState)
6560 class Configuration(Object):
6561  r"""Proxy of C++ IMP::Configuration class."""
6562 
6563  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6564 
6565  def __init__(self, *args):
6566  r"""
6567  __init__(Configuration self, Model m, std::string name="Configuration %1%") -> Configuration
6568  __init__(Configuration self, Model m, Configuration base, std::string name="Configuration %1%") -> Configuration
6569  """
6570  _IMP_kernel.Configuration_swiginit(self, _IMP_kernel.new_Configuration(*args))
6571 
6572  def load_configuration(self):
6573  r"""load_configuration(Configuration self)"""
6574  return _IMP_kernel.Configuration_load_configuration(self)
6575 
6576  def swap_configuration(self):
6577  r"""swap_configuration(Configuration self)"""
6578  return _IMP_kernel.Configuration_swap_configuration(self)
6579 
6580  def get_version_info(self):
6581  r"""get_version_info(Configuration self) -> VersionInfo"""
6582  return _IMP_kernel.Configuration_get_version_info(self)
6583  __swig_destroy__ = _IMP_kernel.delete_Configuration
6584 
6585  def __str__(self):
6586  r"""__str__(Configuration self) -> std::string"""
6587  return _IMP_kernel.Configuration___str__(self)
6588 
6589  def __repr__(self):
6590  r"""__repr__(Configuration self) -> std::string"""
6591  return _IMP_kernel.Configuration___repr__(self)
6592 
6593  @staticmethod
6594  def get_from(o):
6595  return _object_cast_to_Configuration(o)
6596 
6597 
6598 # Register Configuration in _IMP_kernel:
6599 _IMP_kernel.Configuration_swigregister(Configuration)
6600 class Sampler(Object):
6601  r"""Proxy of C++ IMP::Sampler class."""
6602 
6603  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6604 
6605  def __init__(self, *args):
6606  r"""__init__(Sampler self, Model m, std::string name="Sampler %1%") -> Sampler"""
6607  if self.__class__ == Sampler:
6608  _self = None
6609  else:
6610  _self = self
6611  _IMP_kernel.Sampler_swiginit(self, _IMP_kernel.new_Sampler(_self, *args))
6612 
6613  if self.__class__ != Sampler:
6614  _director_objects.register(self)
6615 
6616 
6617 
6618 
6619  def create_sample(self):
6620  r"""create_sample(Sampler self) -> ConfigurationSet"""
6621  return _IMP_kernel.Sampler_create_sample(self)
6622 
6623  def get_scoring_function(self):
6624  r"""get_scoring_function(Sampler self) -> ScoringFunction"""
6625  return _IMP_kernel.Sampler_get_scoring_function(self)
6626 
6627  def set_scoring_function(self, sf):
6628  r"""set_scoring_function(Sampler self, _ScoringFunctionAdaptor sf)"""
6629  return _IMP_kernel.Sampler_set_scoring_function(self, sf)
6630 
6631  def get_model(self):
6632  r"""get_model(Sampler self) -> Model"""
6633  return _IMP_kernel.Sampler_get_model(self)
6634 
6635  def do_sample(self):
6636  r"""do_sample(Sampler self) -> ConfigurationSet"""
6637  return _IMP_kernel.Sampler_do_sample(self)
6638  __swig_destroy__ = _IMP_kernel.delete_Sampler
6639 
6640  def __str__(self):
6641  r"""__str__(Sampler self) -> std::string"""
6642  return _IMP_kernel.Sampler___str__(self)
6643 
6644  def __repr__(self):
6645  r"""__repr__(Sampler self) -> std::string"""
6646  return _IMP_kernel.Sampler___repr__(self)
6647 
6648  @staticmethod
6649  def get_from(o):
6650  return _object_cast_to_Sampler(o)
6651 
6652 
6653  def do_show(self, out):
6654  pass
6655 
6656  @staticmethod
6657  def get_from(o):
6658  return _object_cast_to_Sampler(o)
6659 
6660  def __disown__(self):
6661  self.this.disown()
6662  _IMP_kernel.disown_Sampler(self)
6663  return weakref.proxy(self)
6664 
6665  def do_destroy(self):
6666  r"""do_destroy(Sampler self)"""
6667  return _IMP_kernel.Sampler_do_destroy(self)
6668 
6669 # Register Sampler in _IMP_kernel:
6670 _IMP_kernel.Sampler_swigregister(Sampler)
6671 class PairModifier(_ParticleInputs, _ParticleOutputs, Object):
6672  r"""Proxy of C++ IMP::PairModifier class."""
6673 
6674  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6675 
6676  def __init__(self, *args):
6677  r"""__init__(PairModifier self, std::string name="PairModifier %1%") -> PairModifier"""
6678  if self.__class__ == PairModifier:
6679  _self = None
6680  else:
6681  _self = self
6682  _IMP_kernel.PairModifier_swiginit(self, _IMP_kernel.new_PairModifier(_self, *args))
6683 
6684  if self.__class__ != PairModifier:
6685  _director_objects.register(self)
6686 
6687 
6688 
6689 
6690  def apply_index(self, m, v):
6691  r"""apply_index(PairModifier self, Model m, IMP::ParticleIndexPair const & v)"""
6692  return _IMP_kernel.PairModifier_apply_index(self, m, v)
6693 
6694  def apply_indexes(self, m, o, lower_bound, upper_bound):
6695  r"""apply_indexes(PairModifier self, Model m, IMP::ParticleIndexPairs const & o, unsigned int lower_bound, unsigned int upper_bound)"""
6696  return _IMP_kernel.PairModifier_apply_indexes(self, m, o, lower_bound, upper_bound)
6697 
6698  def apply_indexes_moved(self, m, o, lower_bound, upper_bound, moved_pis, reset_pis):
6699  r"""apply_indexes_moved(PairModifier self, Model m, IMP::ParticleIndexPairs const & o, unsigned int lower_bound, unsigned int upper_bound, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
6700  return _IMP_kernel.PairModifier_apply_indexes_moved(self, m, o, lower_bound, upper_bound, moved_pis, reset_pis)
6701 
6702  def __str__(self):
6703  r"""__str__(PairModifier self) -> std::string"""
6704  return _IMP_kernel.PairModifier___str__(self)
6705 
6706  def __repr__(self):
6707  r"""__repr__(PairModifier self) -> std::string"""
6708  return _IMP_kernel.PairModifier___repr__(self)
6709 
6710  @staticmethod
6711  def get_from(o):
6712  return _object_cast_to_PairModifier(o)
6713 
6714 
6715  def do_show(self, out):
6716  pass
6717 
6718  @staticmethod
6719  def get_from(o):
6720  return _object_cast_to_PairModifier(o)
6721 
6722  __swig_destroy__ = _IMP_kernel.delete_PairModifier
6723  def __disown__(self):
6724  self.this.disown()
6725  _IMP_kernel.disown_PairModifier(self)
6726  return weakref.proxy(self)
6727 
6728  def do_get_inputs(self, m, pis):
6729  r"""do_get_inputs(PairModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6730  return _IMP_kernel.PairModifier_do_get_inputs(self, m, pis)
6731 
6732  def do_get_outputs(self, m, pis):
6733  r"""do_get_outputs(PairModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6734  return _IMP_kernel.PairModifier_do_get_outputs(self, m, pis)
6735 
6736  def do_destroy(self):
6737  r"""do_destroy(PairModifier self)"""
6738  return _IMP_kernel.PairModifier_do_destroy(self)
6739 
6740 # Register PairModifier in _IMP_kernel:
6741 _IMP_kernel.PairModifier_swigregister(PairModifier)
6742 class PairScore(_ParticleInputs, Object):
6743  r"""Proxy of C++ IMP::PairScore class."""
6744 
6745  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6746 
6747  def __init__(self, *args):
6748  r"""__init__(PairScore self, std::string name="PairScore %1%") -> PairScore"""
6749  if self.__class__ == PairScore:
6750  _self = None
6751  else:
6752  _self = self
6753  _IMP_kernel.PairScore_swiginit(self, _IMP_kernel.new_PairScore(_self, *args))
6754 
6755  if self.__class__ != PairScore:
6756  _director_objects.register(self)
6757 
6758 
6759 
6760 
6761  def evaluate_index(self, m, vt, da):
6762  r"""evaluate_index(PairScore self, Model m, IMP::ParticleIndexPair const & vt, DerivativeAccumulator da) -> double"""
6763  return _IMP_kernel.PairScore_evaluate_index(self, m, vt, da)
6764 
6765  def check_indexes(self, m, pis):
6766  r"""check_indexes(PairScore self, Model m, IMP::ParticleIndexes const & pis) -> bool"""
6767  return _IMP_kernel.PairScore_check_indexes(self, m, pis)
6768 
6769  def evaluate_indexes(self, m, o, da, lower_bound, upper_bound, all_indexes_checked=False):
6770  r"""evaluate_indexes(PairScore self, Model m, IMP::ParticleIndexPairs const & o, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
6771  return _IMP_kernel.PairScore_evaluate_indexes(self, m, o, da, lower_bound, upper_bound, all_indexes_checked)
6772 
6773  def evaluate_indexes_scores(self, m, o, da, lower_bound, upper_bound, score, all_indexes_checked=False):
6774  r"""evaluate_indexes_scores(PairScore self, Model m, IMP::ParticleIndexPairs const & o, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
6775  return _IMP_kernel.PairScore_evaluate_indexes_scores(self, m, o, da, lower_bound, upper_bound, score, all_indexes_checked)
6776 
6777  def evaluate_indexes_delta(self, m, o, da, indexes, score, all_indexes_checked=False):
6778  r"""evaluate_indexes_delta(PairScore self, Model m, IMP::ParticleIndexPairs const & o, 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"""
6779  return _IMP_kernel.PairScore_evaluate_indexes_delta(self, m, o, da, indexes, score, all_indexes_checked)
6780 
6781  def evaluate_if_good_index(self, m, vt, da, max):
6782  r"""evaluate_if_good_index(PairScore self, Model m, IMP::ParticleIndexPair const & vt, DerivativeAccumulator da, double max) -> double"""
6783  return _IMP_kernel.PairScore_evaluate_if_good_index(self, m, vt, da, max)
6784 
6785  def evaluate_if_good_indexes(self, m, o, da, max, lower_bound, upper_bound, all_indexes_checked=False):
6786  r"""evaluate_if_good_indexes(PairScore self, Model m, IMP::ParticleIndexPairs const & o, DerivativeAccumulator da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
6787  return _IMP_kernel.PairScore_evaluate_if_good_indexes(self, m, o, da, max, lower_bound, upper_bound, all_indexes_checked)
6788 
6789  def create_current_decomposition(self, m, vt):
6790  r"""create_current_decomposition(PairScore self, Model m, IMP::ParticleIndexPair const & vt) -> IMP::Restraints"""
6791  return _IMP_kernel.PairScore_create_current_decomposition(self, m, vt)
6792 
6793  def do_create_current_decomposition(self, m, vt):
6794  r"""do_create_current_decomposition(PairScore self, Model m, IMP::ParticleIndexPair const & vt) -> IMP::Restraints"""
6795  return _IMP_kernel.PairScore_do_create_current_decomposition(self, m, vt)
6796  __swig_destroy__ = _IMP_kernel.delete_PairScore
6797 
6798  def __str__(self):
6799  r"""__str__(PairScore self) -> std::string"""
6800  return _IMP_kernel.PairScore___str__(self)
6801 
6802  def __repr__(self):
6803  r"""__repr__(PairScore self) -> std::string"""
6804  return _IMP_kernel.PairScore___repr__(self)
6805 
6806  @staticmethod
6807  def get_from(o):
6808  return _object_cast_to_PairScore(o)
6809 
6810 
6811  def do_show(self, out):
6812  pass
6813 
6814  @staticmethod
6815  def get_from(o):
6816  return _object_cast_to_PairScore(o)
6817 
6818 
6819  def _wrap_jax(self, m, score_func, keys=None):
6820  """Create the return value for _get_jax.
6821  Use this method in _get_jax() to wrap the JAX scoring function
6822  with other score-specific information.
6823 
6824  @param m The IMP.Model that the score will act on.
6825  @param score_func A function implemented using JAX that takes
6826  one argument (the current JAX Model) and returns the total
6827  score.
6828  @param keys Model attributes used by the PairScore.
6829  See IMP::Restraint::_wrap_jax.
6830  """
6831  from IMP._jax_util import JAXScoreInfo
6832  return JAXScoreInfo(m, score_func=score_func, keys=keys)
6833 
6834  def _get_jax(self, m, indexes):
6835  """Return a JAX implementation of this PairScore.
6836  Implement this method in a PairScore subclass to provide
6837  an equivalent function using [JAX](https://docs.jax.dev/)
6838  that scores the current JAX Model with a given set of
6839  ParticlePairIndexes. See also _wrap_jax.
6840 
6841  @param m The IMP.Model that the score will act on.
6842  @param indexes The ParticlePairIndexes that the score will act on.
6843  """
6844  raise NotImplementedError(f"No JAX implementation for {self}")
6845 
6846  def __disown__(self):
6847  self.this.disown()
6848  _IMP_kernel.disown_PairScore(self)
6849  return weakref.proxy(self)
6850 
6851  def do_get_inputs(self, m, pis):
6852  r"""do_get_inputs(PairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6853  return _IMP_kernel.PairScore_do_get_inputs(self, m, pis)
6854 
6855  def do_destroy(self):
6856  r"""do_destroy(PairScore self)"""
6857  return _IMP_kernel.PairScore_do_destroy(self)
6858 
6859 # Register PairScore in _IMP_kernel:
6860 _IMP_kernel.PairScore_swigregister(PairScore)
6861 class PairPredicate(_ParticleInputs, Object):
6862  r"""Proxy of C++ IMP::PairPredicate class."""
6863 
6864  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6865 
6866  def __init__(self, *args):
6867  r"""__init__(PairPredicate self, std::string name="PairPredicate %1%") -> PairPredicate"""
6868  if self.__class__ == PairPredicate:
6869  _self = None
6870  else:
6871  _self = self
6872  _IMP_kernel.PairPredicate_swiginit(self, _IMP_kernel.new_PairPredicate(_self, *args))
6873 
6874  if self.__class__ != PairPredicate:
6875  _director_objects.register(self)
6876 
6877 
6878 
6879 
6880  def setup_for_get_value_index_in_batch(self, arg0):
6881  r"""setup_for_get_value_index_in_batch(PairPredicate self, Model arg0)"""
6882  return _IMP_kernel.PairPredicate_setup_for_get_value_index_in_batch(self, arg0)
6883 
6884  def get_value_index_in_batch(self, m, vt):
6885  r"""get_value_index_in_batch(PairPredicate self, Model m, IMP::ParticleIndexPair const & vt) -> int"""
6886  return _IMP_kernel.PairPredicate_get_value_index_in_batch(self, m, vt)
6887 
6888  def __call__(self, m, vt):
6889  r"""__call__(PairPredicate self, Model m, IMP::ParticleIndexPair const & vt) -> int"""
6890  return _IMP_kernel.PairPredicate___call__(self, m, vt)
6891 
6892  def get_value_index(self, *args):
6893  r"""
6894  get_value_index(PairPredicate self, Model m, IMP::ParticleIndexPair const & vt) -> int
6895  get_value_index(PairPredicate self, Model m, IMP::ParticleIndexPairs const & o) -> IMP::Ints
6896  """
6897  return _IMP_kernel.PairPredicate_get_value_index(self, *args)
6898  __swig_destroy__ = _IMP_kernel.delete_PairPredicate
6899 
6900  def __str__(self):
6901  r"""__str__(PairPredicate self) -> std::string"""
6902  return _IMP_kernel.PairPredicate___str__(self)
6903 
6904  def __repr__(self):
6905  r"""__repr__(PairPredicate self) -> std::string"""
6906  return _IMP_kernel.PairPredicate___repr__(self)
6907 
6908  @staticmethod
6909  def get_from(o):
6910  return _object_cast_to_PairPredicate(o)
6911 
6912 
6913  def do_show(self, out):
6914  pass
6915 
6916  @staticmethod
6917  def get_from(o):
6918  return _object_cast_to_PairPredicate(o)
6919 
6920  def __disown__(self):
6921  self.this.disown()
6922  _IMP_kernel.disown_PairPredicate(self)
6923  return weakref.proxy(self)
6924 
6925  def do_get_inputs(self, m, pis):
6926  r"""do_get_inputs(PairPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
6927  return _IMP_kernel.PairPredicate_do_get_inputs(self, m, pis)
6928 
6929  def do_destroy(self):
6930  r"""do_destroy(PairPredicate self)"""
6931  return _IMP_kernel.PairPredicate_do_destroy(self)
6932 
6933 # Register PairPredicate in _IMP_kernel:
6934 _IMP_kernel.PairPredicate_swigregister(PairPredicate)
6935 class PairContainer(Container):
6936  r"""Proxy of C++ IMP::PairContainer class."""
6937 
6938  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
6939 
6940  def apply_generic(self, m):
6941  r"""apply_generic(PairContainer self, PairModifier m)"""
6942  return _IMP_kernel.PairContainer_apply_generic(self, m)
6943 
6944  def apply_generic_moved(self, m, moved_pis, reset_pis):
6945  r"""apply_generic_moved(PairContainer self, PairModifier m, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
6946  return _IMP_kernel.PairContainer_apply_generic_moved(self, m, moved_pis, reset_pis)
6947 
6948  def apply(self, sm):
6949  r"""apply(PairContainer self, PairModifier sm)"""
6950  return _IMP_kernel.PairContainer_apply(self, sm)
6951 
6952  def apply_moved(self, sm, moved_pis, reset_pis):
6953  r"""apply_moved(PairContainer self, PairModifier sm, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
6954  return _IMP_kernel.PairContainer_apply_moved(self, sm, moved_pis, reset_pis)
6955 
6956  def get_range_indexes(self):
6957  r"""get_range_indexes(PairContainer self) -> IMP::ParticleIndexPairs"""
6958  return _IMP_kernel.PairContainer_get_range_indexes(self)
6959 
6960  def get_contents(self):
6961  r"""get_contents(PairContainer self) -> IMP::ParticleIndexPairs const &"""
6962  return _IMP_kernel.PairContainer_get_contents(self)
6963 
6964  def get_indexes(self):
6965  r"""get_indexes(PairContainer self) -> IMP::ParticleIndexPairs"""
6966  return _IMP_kernel.PairContainer_get_indexes(self)
6967 
6968  def get(self, *args):
6969  r"""
6970  get(PairContainer self) -> IMP::ParticlePairsTemp
6971  get(PairContainer self, unsigned int i) -> IMP::ParticlePair
6972  """
6973  return _IMP_kernel.PairContainer_get(self, *args)
6974 
6975  def get_number(self):
6976  r"""get_number(PairContainer self) -> unsigned int"""
6977  return _IMP_kernel.PairContainer_get_number(self)
6978 
6979  def __init__(self, *args):
6980  r"""
6981  __init__(PairContainer self, Model m, std::string name="PairContainer %1%") -> PairContainer
6982  __init__(PairContainer self) -> PairContainer
6983  """
6984  if self.__class__ == PairContainer:
6985  _self = None
6986  else:
6987  _self = self
6988  _IMP_kernel.PairContainer_swiginit(self, _IMP_kernel.new_PairContainer(_self, *args))
6989 
6990  if self.__class__ != PairContainer:
6991  _director_objects.register(self)
6992 
6993 
6994 
6995 
6996  def do_apply(self, sm):
6997  r"""do_apply(PairContainer self, PairModifier sm)"""
6998  return _IMP_kernel.PairContainer_do_apply(self, sm)
6999 
7000  def do_apply_moved(self, sm, moved_pis, reset_pis):
7001  r"""do_apply_moved(PairContainer self, PairModifier sm, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
7002  return _IMP_kernel.PairContainer_do_apply_moved(self, sm, moved_pis, reset_pis)
7003 
7004  def do_get_provides_access(self):
7005  r"""do_get_provides_access(PairContainer self) -> bool"""
7006  return _IMP_kernel.PairContainer_do_get_provides_access(self)
7007  __swig_destroy__ = _IMP_kernel.delete_PairContainer
7008 
7009  def __str__(self):
7010  r"""__str__(PairContainer self) -> std::string"""
7011  return _IMP_kernel.PairContainer___str__(self)
7012 
7013  def __repr__(self):
7014  r"""__repr__(PairContainer self) -> std::string"""
7015  return _IMP_kernel.PairContainer___repr__(self)
7016 
7017  @staticmethod
7018  def get_from(o):
7019  return _object_cast_to_PairContainer(o)
7020 
7021 
7022  def do_show(self, out):
7023  pass
7024 
7025  @staticmethod
7026  def get_from(o):
7027  return _object_cast_to_PairContainer(o)
7028 
7029  def __disown__(self):
7030  self.this.disown()
7031  _IMP_kernel.disown_PairContainer(self)
7032  return weakref.proxy(self)
7033 
7034  def do_destroy(self):
7035  r"""do_destroy(PairContainer self)"""
7036  return _IMP_kernel.PairContainer_do_destroy(self)
7037 
7038  def handle_set_has_required_score_states(self, arg0):
7039  r"""handle_set_has_required_score_states(PairContainer self, bool arg0)"""
7040  return _IMP_kernel.PairContainer_handle_set_has_required_score_states(self, arg0)
7041 
7042  def do_get_inputs(self):
7043  r"""do_get_inputs(PairContainer self) -> IMP::ModelObjectsTemp"""
7044  return _IMP_kernel.PairContainer_do_get_inputs(self)
7045 
7046  def do_get_interactions(self):
7047  r"""do_get_interactions(PairContainer self) -> IMP::ModelObjectsTemps"""
7048  return _IMP_kernel.PairContainer_do_get_interactions(self)
7049 
7050  def do_get_contents_hash(self):
7051  r"""do_get_contents_hash(PairContainer self) -> std::size_t"""
7052  return _IMP_kernel.PairContainer_do_get_contents_hash(self)
7053 
7054 # Register PairContainer in _IMP_kernel:
7055 _IMP_kernel.PairContainer_swigregister(PairContainer)
7056 class _PairContainerAdaptor(_InputAdaptor):
7057  r"""Proxy of C++ IMP::PairContainerAdaptor class."""
7058 
7059  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7060  __repr__ = _swig_repr
7061 
7062  def __init__(self, *args):
7063  r"""
7064  __init__(_PairContainerAdaptor self) -> _PairContainerAdaptor
7065  __init__(_PairContainerAdaptor self, PairContainer c) -> _PairContainerAdaptor
7066  __init__(_PairContainerAdaptor self, IMP::ParticlePairsTemp const & t) -> _PairContainerAdaptor
7067  """
7068  _IMP_kernel._PairContainerAdaptor_swiginit(self, _IMP_kernel.new__PairContainerAdaptor(*args))
7069 
7070  def set_name_if_default(self, name):
7071  r"""set_name_if_default(_PairContainerAdaptor self, std::string name)"""
7072  return _IMP_kernel._PairContainerAdaptor_set_name_if_default(self, name)
7073  __swig_destroy__ = _IMP_kernel.delete__PairContainerAdaptor
7074 
7075 # Register _PairContainerAdaptor in _IMP_kernel:
7076 _IMP_kernel._PairContainerAdaptor_swigregister(_PairContainerAdaptor)
7077 class QuadModifier(_ParticleInputs, _ParticleOutputs, Object):
7078  r"""Proxy of C++ IMP::QuadModifier class."""
7079 
7080  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7081 
7082  def __init__(self, *args):
7083  r"""__init__(QuadModifier self, std::string name="QuadModifier %1%") -> QuadModifier"""
7084  if self.__class__ == QuadModifier:
7085  _self = None
7086  else:
7087  _self = self
7088  _IMP_kernel.QuadModifier_swiginit(self, _IMP_kernel.new_QuadModifier(_self, *args))
7089 
7090  if self.__class__ != QuadModifier:
7091  _director_objects.register(self)
7092 
7093 
7094 
7095 
7096  def apply_index(self, m, v):
7097  r"""apply_index(QuadModifier self, Model m, IMP::ParticleIndexQuad const & v)"""
7098  return _IMP_kernel.QuadModifier_apply_index(self, m, v)
7099 
7100  def apply_indexes(self, m, o, lower_bound, upper_bound):
7101  r"""apply_indexes(QuadModifier self, Model m, IMP::ParticleIndexQuads const & o, unsigned int lower_bound, unsigned int upper_bound)"""
7102  return _IMP_kernel.QuadModifier_apply_indexes(self, m, o, lower_bound, upper_bound)
7103 
7104  def apply_indexes_moved(self, m, o, lower_bound, upper_bound, moved_pis, reset_pis):
7105  r"""apply_indexes_moved(QuadModifier self, Model m, IMP::ParticleIndexQuads const & o, unsigned int lower_bound, unsigned int upper_bound, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
7106  return _IMP_kernel.QuadModifier_apply_indexes_moved(self, m, o, lower_bound, upper_bound, moved_pis, reset_pis)
7107 
7108  def __str__(self):
7109  r"""__str__(QuadModifier self) -> std::string"""
7110  return _IMP_kernel.QuadModifier___str__(self)
7111 
7112  def __repr__(self):
7113  r"""__repr__(QuadModifier self) -> std::string"""
7114  return _IMP_kernel.QuadModifier___repr__(self)
7115 
7116  @staticmethod
7117  def get_from(o):
7118  return _object_cast_to_QuadModifier(o)
7119 
7120 
7121  def do_show(self, out):
7122  pass
7123 
7124  @staticmethod
7125  def get_from(o):
7126  return _object_cast_to_QuadModifier(o)
7127 
7128  __swig_destroy__ = _IMP_kernel.delete_QuadModifier
7129  def __disown__(self):
7130  self.this.disown()
7131  _IMP_kernel.disown_QuadModifier(self)
7132  return weakref.proxy(self)
7133 
7134  def do_get_inputs(self, m, pis):
7135  r"""do_get_inputs(QuadModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7136  return _IMP_kernel.QuadModifier_do_get_inputs(self, m, pis)
7137 
7138  def do_get_outputs(self, m, pis):
7139  r"""do_get_outputs(QuadModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7140  return _IMP_kernel.QuadModifier_do_get_outputs(self, m, pis)
7141 
7142  def do_destroy(self):
7143  r"""do_destroy(QuadModifier self)"""
7144  return _IMP_kernel.QuadModifier_do_destroy(self)
7145 
7146 # Register QuadModifier in _IMP_kernel:
7147 _IMP_kernel.QuadModifier_swigregister(QuadModifier)
7148 class QuadScore(_ParticleInputs, Object):
7149  r"""Proxy of C++ IMP::QuadScore class."""
7150 
7151  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7152 
7153  def __init__(self, *args):
7154  r"""__init__(QuadScore self, std::string name="QuadScore %1%") -> QuadScore"""
7155  if self.__class__ == QuadScore:
7156  _self = None
7157  else:
7158  _self = self
7159  _IMP_kernel.QuadScore_swiginit(self, _IMP_kernel.new_QuadScore(_self, *args))
7160 
7161  if self.__class__ != QuadScore:
7162  _director_objects.register(self)
7163 
7164 
7165 
7166 
7167  def evaluate_index(self, m, vt, da):
7168  r"""evaluate_index(QuadScore self, Model m, IMP::ParticleIndexQuad const & vt, DerivativeAccumulator da) -> double"""
7169  return _IMP_kernel.QuadScore_evaluate_index(self, m, vt, da)
7170 
7171  def check_indexes(self, m, pis):
7172  r"""check_indexes(QuadScore self, Model m, IMP::ParticleIndexes const & pis) -> bool"""
7173  return _IMP_kernel.QuadScore_check_indexes(self, m, pis)
7174 
7175  def evaluate_indexes(self, m, o, da, lower_bound, upper_bound, all_indexes_checked=False):
7176  r"""evaluate_indexes(QuadScore self, Model m, IMP::ParticleIndexQuads const & o, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
7177  return _IMP_kernel.QuadScore_evaluate_indexes(self, m, o, da, lower_bound, upper_bound, all_indexes_checked)
7178 
7179  def evaluate_indexes_scores(self, m, o, da, lower_bound, upper_bound, score, all_indexes_checked=False):
7180  r"""evaluate_indexes_scores(QuadScore self, Model m, IMP::ParticleIndexQuads const & o, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
7181  return _IMP_kernel.QuadScore_evaluate_indexes_scores(self, m, o, da, lower_bound, upper_bound, score, all_indexes_checked)
7182 
7183  def evaluate_indexes_delta(self, m, o, da, indexes, score, all_indexes_checked=False):
7184  r"""evaluate_indexes_delta(QuadScore self, Model m, IMP::ParticleIndexQuads const & o, 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"""
7185  return _IMP_kernel.QuadScore_evaluate_indexes_delta(self, m, o, da, indexes, score, all_indexes_checked)
7186 
7187  def evaluate_if_good_index(self, m, vt, da, max):
7188  r"""evaluate_if_good_index(QuadScore self, Model m, IMP::ParticleIndexQuad const & vt, DerivativeAccumulator da, double max) -> double"""
7189  return _IMP_kernel.QuadScore_evaluate_if_good_index(self, m, vt, da, max)
7190 
7191  def evaluate_if_good_indexes(self, m, o, da, max, lower_bound, upper_bound, all_indexes_checked=False):
7192  r"""evaluate_if_good_indexes(QuadScore self, Model m, IMP::ParticleIndexQuads const & o, DerivativeAccumulator da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
7193  return _IMP_kernel.QuadScore_evaluate_if_good_indexes(self, m, o, da, max, lower_bound, upper_bound, all_indexes_checked)
7194 
7195  def create_current_decomposition(self, m, vt):
7196  r"""create_current_decomposition(QuadScore self, Model m, IMP::ParticleIndexQuad const & vt) -> IMP::Restraints"""
7197  return _IMP_kernel.QuadScore_create_current_decomposition(self, m, vt)
7198 
7199  def do_create_current_decomposition(self, m, vt):
7200  r"""do_create_current_decomposition(QuadScore self, Model m, IMP::ParticleIndexQuad const & vt) -> IMP::Restraints"""
7201  return _IMP_kernel.QuadScore_do_create_current_decomposition(self, m, vt)
7202  __swig_destroy__ = _IMP_kernel.delete_QuadScore
7203 
7204  def __str__(self):
7205  r"""__str__(QuadScore self) -> std::string"""
7206  return _IMP_kernel.QuadScore___str__(self)
7207 
7208  def __repr__(self):
7209  r"""__repr__(QuadScore self) -> std::string"""
7210  return _IMP_kernel.QuadScore___repr__(self)
7211 
7212  @staticmethod
7213  def get_from(o):
7214  return _object_cast_to_QuadScore(o)
7215 
7216 
7217  def do_show(self, out):
7218  pass
7219 
7220  @staticmethod
7221  def get_from(o):
7222  return _object_cast_to_QuadScore(o)
7223 
7224  def __disown__(self):
7225  self.this.disown()
7226  _IMP_kernel.disown_QuadScore(self)
7227  return weakref.proxy(self)
7228 
7229  def do_get_inputs(self, m, pis):
7230  r"""do_get_inputs(QuadScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7231  return _IMP_kernel.QuadScore_do_get_inputs(self, m, pis)
7232 
7233  def do_destroy(self):
7234  r"""do_destroy(QuadScore self)"""
7235  return _IMP_kernel.QuadScore_do_destroy(self)
7236 
7237 # Register QuadScore in _IMP_kernel:
7238 _IMP_kernel.QuadScore_swigregister(QuadScore)
7239 class QuadPredicate(_ParticleInputs, Object):
7240  r"""Proxy of C++ IMP::QuadPredicate class."""
7241 
7242  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7243 
7244  def __init__(self, *args):
7245  r"""__init__(QuadPredicate self, std::string name="QuadPredicate %1%") -> QuadPredicate"""
7246  if self.__class__ == QuadPredicate:
7247  _self = None
7248  else:
7249  _self = self
7250  _IMP_kernel.QuadPredicate_swiginit(self, _IMP_kernel.new_QuadPredicate(_self, *args))
7251 
7252  if self.__class__ != QuadPredicate:
7253  _director_objects.register(self)
7254 
7255 
7256 
7257 
7258  def setup_for_get_value_index_in_batch(self, arg0):
7259  r"""setup_for_get_value_index_in_batch(QuadPredicate self, Model arg0)"""
7260  return _IMP_kernel.QuadPredicate_setup_for_get_value_index_in_batch(self, arg0)
7261 
7262  def get_value_index_in_batch(self, m, vt):
7263  r"""get_value_index_in_batch(QuadPredicate self, Model m, IMP::ParticleIndexQuad const & vt) -> int"""
7264  return _IMP_kernel.QuadPredicate_get_value_index_in_batch(self, m, vt)
7265 
7266  def __call__(self, m, vt):
7267  r"""__call__(QuadPredicate self, Model m, IMP::ParticleIndexQuad const & vt) -> int"""
7268  return _IMP_kernel.QuadPredicate___call__(self, m, vt)
7269 
7270  def get_value_index(self, *args):
7271  r"""
7272  get_value_index(QuadPredicate self, Model m, IMP::ParticleIndexQuad const & vt) -> int
7273  get_value_index(QuadPredicate self, Model m, IMP::ParticleIndexQuads const & o) -> IMP::Ints
7274  """
7275  return _IMP_kernel.QuadPredicate_get_value_index(self, *args)
7276  __swig_destroy__ = _IMP_kernel.delete_QuadPredicate
7277 
7278  def __str__(self):
7279  r"""__str__(QuadPredicate self) -> std::string"""
7280  return _IMP_kernel.QuadPredicate___str__(self)
7281 
7282  def __repr__(self):
7283  r"""__repr__(QuadPredicate self) -> std::string"""
7284  return _IMP_kernel.QuadPredicate___repr__(self)
7285 
7286  @staticmethod
7287  def get_from(o):
7288  return _object_cast_to_QuadPredicate(o)
7289 
7290 
7291  def do_show(self, out):
7292  pass
7293 
7294  @staticmethod
7295  def get_from(o):
7296  return _object_cast_to_QuadPredicate(o)
7297 
7298  def __disown__(self):
7299  self.this.disown()
7300  _IMP_kernel.disown_QuadPredicate(self)
7301  return weakref.proxy(self)
7302 
7303  def do_get_inputs(self, m, pis):
7304  r"""do_get_inputs(QuadPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7305  return _IMP_kernel.QuadPredicate_do_get_inputs(self, m, pis)
7306 
7307  def do_destroy(self):
7308  r"""do_destroy(QuadPredicate self)"""
7309  return _IMP_kernel.QuadPredicate_do_destroy(self)
7310 
7311 # Register QuadPredicate in _IMP_kernel:
7312 _IMP_kernel.QuadPredicate_swigregister(QuadPredicate)
7313 class QuadContainer(Container):
7314  r"""Proxy of C++ IMP::QuadContainer class."""
7315 
7316  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7317 
7318  def apply_generic(self, m):
7319  r"""apply_generic(QuadContainer self, QuadModifier m)"""
7320  return _IMP_kernel.QuadContainer_apply_generic(self, m)
7321 
7322  def apply_generic_moved(self, m, moved_pis, reset_pis):
7323  r"""apply_generic_moved(QuadContainer self, QuadModifier m, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
7324  return _IMP_kernel.QuadContainer_apply_generic_moved(self, m, moved_pis, reset_pis)
7325 
7326  def apply(self, sm):
7327  r"""apply(QuadContainer self, QuadModifier sm)"""
7328  return _IMP_kernel.QuadContainer_apply(self, sm)
7329 
7330  def apply_moved(self, sm, moved_pis, reset_pis):
7331  r"""apply_moved(QuadContainer self, QuadModifier sm, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
7332  return _IMP_kernel.QuadContainer_apply_moved(self, sm, moved_pis, reset_pis)
7333 
7334  def get_range_indexes(self):
7335  r"""get_range_indexes(QuadContainer self) -> IMP::ParticleIndexQuads"""
7336  return _IMP_kernel.QuadContainer_get_range_indexes(self)
7337 
7338  def get_contents(self):
7339  r"""get_contents(QuadContainer self) -> IMP::ParticleIndexQuads const &"""
7340  return _IMP_kernel.QuadContainer_get_contents(self)
7341 
7342  def get_indexes(self):
7343  r"""get_indexes(QuadContainer self) -> IMP::ParticleIndexQuads"""
7344  return _IMP_kernel.QuadContainer_get_indexes(self)
7345 
7346  def get(self, *args):
7347  r"""
7348  get(QuadContainer self) -> IMP::ParticleQuadsTemp
7349  get(QuadContainer self, unsigned int i) -> IMP::ParticleQuad
7350  """
7351  return _IMP_kernel.QuadContainer_get(self, *args)
7352 
7353  def get_number(self):
7354  r"""get_number(QuadContainer self) -> unsigned int"""
7355  return _IMP_kernel.QuadContainer_get_number(self)
7356 
7357  def __init__(self, *args):
7358  r"""
7359  __init__(QuadContainer self, Model m, std::string name="QuadContainer %1%") -> QuadContainer
7360  __init__(QuadContainer self) -> QuadContainer
7361  """
7362  if self.__class__ == QuadContainer:
7363  _self = None
7364  else:
7365  _self = self
7366  _IMP_kernel.QuadContainer_swiginit(self, _IMP_kernel.new_QuadContainer(_self, *args))
7367 
7368  if self.__class__ != QuadContainer:
7369  _director_objects.register(self)
7370 
7371 
7372 
7373 
7374  def do_apply(self, sm):
7375  r"""do_apply(QuadContainer self, QuadModifier sm)"""
7376  return _IMP_kernel.QuadContainer_do_apply(self, sm)
7377 
7378  def do_apply_moved(self, sm, moved_pis, reset_pis):
7379  r"""do_apply_moved(QuadContainer self, QuadModifier sm, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
7380  return _IMP_kernel.QuadContainer_do_apply_moved(self, sm, moved_pis, reset_pis)
7381 
7382  def do_get_provides_access(self):
7383  r"""do_get_provides_access(QuadContainer self) -> bool"""
7384  return _IMP_kernel.QuadContainer_do_get_provides_access(self)
7385  __swig_destroy__ = _IMP_kernel.delete_QuadContainer
7386 
7387  def __str__(self):
7388  r"""__str__(QuadContainer self) -> std::string"""
7389  return _IMP_kernel.QuadContainer___str__(self)
7390 
7391  def __repr__(self):
7392  r"""__repr__(QuadContainer self) -> std::string"""
7393  return _IMP_kernel.QuadContainer___repr__(self)
7394 
7395  @staticmethod
7396  def get_from(o):
7397  return _object_cast_to_QuadContainer(o)
7398 
7399 
7400  def do_show(self, out):
7401  pass
7402 
7403  @staticmethod
7404  def get_from(o):
7405  return _object_cast_to_QuadContainer(o)
7406 
7407  def __disown__(self):
7408  self.this.disown()
7409  _IMP_kernel.disown_QuadContainer(self)
7410  return weakref.proxy(self)
7411 
7412  def do_destroy(self):
7413  r"""do_destroy(QuadContainer self)"""
7414  return _IMP_kernel.QuadContainer_do_destroy(self)
7415 
7416  def handle_set_has_required_score_states(self, arg0):
7417  r"""handle_set_has_required_score_states(QuadContainer self, bool arg0)"""
7418  return _IMP_kernel.QuadContainer_handle_set_has_required_score_states(self, arg0)
7419 
7420  def do_get_inputs(self):
7421  r"""do_get_inputs(QuadContainer self) -> IMP::ModelObjectsTemp"""
7422  return _IMP_kernel.QuadContainer_do_get_inputs(self)
7423 
7424  def do_get_interactions(self):
7425  r"""do_get_interactions(QuadContainer self) -> IMP::ModelObjectsTemps"""
7426  return _IMP_kernel.QuadContainer_do_get_interactions(self)
7427 
7428  def do_get_contents_hash(self):
7429  r"""do_get_contents_hash(QuadContainer self) -> std::size_t"""
7430  return _IMP_kernel.QuadContainer_do_get_contents_hash(self)
7431 
7432 # Register QuadContainer in _IMP_kernel:
7433 _IMP_kernel.QuadContainer_swigregister(QuadContainer)
7434 class _QuadContainerAdaptor(_InputAdaptor):
7435  r"""Proxy of C++ IMP::QuadContainerAdaptor class."""
7436 
7437  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7438  __repr__ = _swig_repr
7439 
7440  def __init__(self, *args):
7441  r"""
7442  __init__(_QuadContainerAdaptor self) -> _QuadContainerAdaptor
7443  __init__(_QuadContainerAdaptor self, QuadContainer c) -> _QuadContainerAdaptor
7444  __init__(_QuadContainerAdaptor self, IMP::ParticleQuadsTemp const & t) -> _QuadContainerAdaptor
7445  """
7446  _IMP_kernel._QuadContainerAdaptor_swiginit(self, _IMP_kernel.new__QuadContainerAdaptor(*args))
7447 
7448  def set_name_if_default(self, name):
7449  r"""set_name_if_default(_QuadContainerAdaptor self, std::string name)"""
7450  return _IMP_kernel._QuadContainerAdaptor_set_name_if_default(self, name)
7451  __swig_destroy__ = _IMP_kernel.delete__QuadContainerAdaptor
7452 
7453 # Register _QuadContainerAdaptor in _IMP_kernel:
7454 _IMP_kernel._QuadContainerAdaptor_swigregister(_QuadContainerAdaptor)
7455 class SingletonModifier(_ParticleInputs, _ParticleOutputs, Object):
7456  r"""Proxy of C++ IMP::SingletonModifier class."""
7457 
7458  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7459 
7460  def __init__(self, *args):
7461  r"""__init__(SingletonModifier self, std::string name="SingletonModifier %1%") -> SingletonModifier"""
7462  if self.__class__ == SingletonModifier:
7463  _self = None
7464  else:
7465  _self = self
7466  _IMP_kernel.SingletonModifier_swiginit(self, _IMP_kernel.new_SingletonModifier(_self, *args))
7467 
7468  if self.__class__ != SingletonModifier:
7469  _director_objects.register(self)
7470 
7471 
7472 
7473 
7474  def apply_index(self, m, v):
7475  r"""apply_index(SingletonModifier self, Model m, ParticleIndex v)"""
7476  return _IMP_kernel.SingletonModifier_apply_index(self, m, v)
7477 
7478  def apply_indexes(self, m, o, lower_bound, upper_bound):
7479  r"""apply_indexes(SingletonModifier self, Model m, IMP::ParticleIndexes const & o, unsigned int lower_bound, unsigned int upper_bound)"""
7480  return _IMP_kernel.SingletonModifier_apply_indexes(self, m, o, lower_bound, upper_bound)
7481 
7482  def apply_indexes_moved(self, m, o, lower_bound, upper_bound, moved_pis, reset_pis):
7483  r"""apply_indexes_moved(SingletonModifier self, Model m, IMP::ParticleIndexes const & o, unsigned int lower_bound, unsigned int upper_bound, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
7484  return _IMP_kernel.SingletonModifier_apply_indexes_moved(self, m, o, lower_bound, upper_bound, moved_pis, reset_pis)
7485 
7486  def __str__(self):
7487  r"""__str__(SingletonModifier self) -> std::string"""
7488  return _IMP_kernel.SingletonModifier___str__(self)
7489 
7490  def __repr__(self):
7491  r"""__repr__(SingletonModifier self) -> std::string"""
7492  return _IMP_kernel.SingletonModifier___repr__(self)
7493 
7494  @staticmethod
7495  def get_from(o):
7496  return _object_cast_to_SingletonModifier(o)
7497 
7498 
7499  def do_show(self, out):
7500  pass
7501 
7502  @staticmethod
7503  def get_from(o):
7504  return _object_cast_to_SingletonModifier(o)
7505 
7506 
7507  def _wrap_jax(self, apply_func, keys=None):
7508  """Create the return value for _get_jax.
7509  Use this method in _get_jax() to wrap the JAX function
7510  with other modifier-specific information.
7511 
7512  @param apply_func A function implemented using JAX that takes
7513  one argument (the current JAX Model) and returns a new
7514  modified JAX Model.
7515  @param keys Model attributes used by the SingletonModifier.
7516  See IMP::Restraint::_wrap_jax.
7517  """
7518  from IMP._jax_util import JAXModifierInfo
7519  return JAXModifierInfo(apply_func=apply_func, keys=keys)
7520 
7521  def _get_jax(self, m, indexes):
7522  """Return a JAX implementation of this SingletonModifier.
7523  Implement this method in a SingletonModifier subclass to provide
7524  an equivalent function using [JAX](https://docs.jax.dev/)
7525  that modifies the current JAX Model. See also _wrap_jax.
7526 
7527  @param m The IMP.Model that the modifier will act on.
7528  @param indexes The ParticleIndexes that the modifier will act on.
7529  """
7530  raise NotImplementedError(f"No JAX implementation for {self}")
7531 
7532  __swig_destroy__ = _IMP_kernel.delete_SingletonModifier
7533  def __disown__(self):
7534  self.this.disown()
7535  _IMP_kernel.disown_SingletonModifier(self)
7536  return weakref.proxy(self)
7537 
7538  def do_get_inputs(self, m, pis):
7539  r"""do_get_inputs(SingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7540  return _IMP_kernel.SingletonModifier_do_get_inputs(self, m, pis)
7541 
7542  def do_get_outputs(self, m, pis):
7543  r"""do_get_outputs(SingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7544  return _IMP_kernel.SingletonModifier_do_get_outputs(self, m, pis)
7545 
7546  def do_destroy(self):
7547  r"""do_destroy(SingletonModifier self)"""
7548  return _IMP_kernel.SingletonModifier_do_destroy(self)
7549 
7550 # Register SingletonModifier in _IMP_kernel:
7551 _IMP_kernel.SingletonModifier_swigregister(SingletonModifier)
7552 class SingletonScore(_ParticleInputs, Object):
7553  r"""Proxy of C++ IMP::SingletonScore class."""
7554 
7555  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7556 
7557  def __init__(self, *args):
7558  r"""__init__(SingletonScore self, std::string name="SingletonScore %1%") -> SingletonScore"""
7559  if self.__class__ == SingletonScore:
7560  _self = None
7561  else:
7562  _self = self
7563  _IMP_kernel.SingletonScore_swiginit(self, _IMP_kernel.new_SingletonScore(_self, *args))
7564 
7565  if self.__class__ != SingletonScore:
7566  _director_objects.register(self)
7567 
7568 
7569 
7570 
7571  def evaluate_index(self, m, vt, da):
7572  r"""evaluate_index(SingletonScore self, Model m, ParticleIndex vt, DerivativeAccumulator da) -> double"""
7573  return _IMP_kernel.SingletonScore_evaluate_index(self, m, vt, da)
7574 
7575  def check_indexes(self, m, pis):
7576  r"""check_indexes(SingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> bool"""
7577  return _IMP_kernel.SingletonScore_check_indexes(self, m, pis)
7578 
7579  def evaluate_indexes(self, m, o, da, lower_bound, upper_bound, all_indexes_checked=False):
7580  r"""evaluate_indexes(SingletonScore self, Model m, IMP::ParticleIndexes const & o, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
7581  return _IMP_kernel.SingletonScore_evaluate_indexes(self, m, o, da, lower_bound, upper_bound, all_indexes_checked)
7582 
7583  def evaluate_indexes_scores(self, m, o, da, lower_bound, upper_bound, score, all_indexes_checked=False):
7584  r"""evaluate_indexes_scores(SingletonScore self, Model m, IMP::ParticleIndexes const & o, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
7585  return _IMP_kernel.SingletonScore_evaluate_indexes_scores(self, m, o, da, lower_bound, upper_bound, score, all_indexes_checked)
7586 
7587  def evaluate_indexes_delta(self, m, o, da, indexes, score, all_indexes_checked=False):
7588  r"""evaluate_indexes_delta(SingletonScore self, Model m, IMP::ParticleIndexes const & o, 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"""
7589  return _IMP_kernel.SingletonScore_evaluate_indexes_delta(self, m, o, da, indexes, score, all_indexes_checked)
7590 
7591  def evaluate_if_good_index(self, m, vt, da, max):
7592  r"""evaluate_if_good_index(SingletonScore self, Model m, ParticleIndex vt, DerivativeAccumulator da, double max) -> double"""
7593  return _IMP_kernel.SingletonScore_evaluate_if_good_index(self, m, vt, da, max)
7594 
7595  def evaluate_if_good_indexes(self, m, o, da, max, lower_bound, upper_bound, all_indexes_checked=False):
7596  r"""evaluate_if_good_indexes(SingletonScore self, Model m, IMP::ParticleIndexes const & o, DerivativeAccumulator da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
7597  return _IMP_kernel.SingletonScore_evaluate_if_good_indexes(self, m, o, da, max, lower_bound, upper_bound, all_indexes_checked)
7598 
7599  def create_current_decomposition(self, m, vt):
7600  r"""create_current_decomposition(SingletonScore self, Model m, ParticleIndex vt) -> IMP::Restraints"""
7601  return _IMP_kernel.SingletonScore_create_current_decomposition(self, m, vt)
7602 
7603  def do_create_current_decomposition(self, m, vt):
7604  r"""do_create_current_decomposition(SingletonScore self, Model m, ParticleIndex vt) -> IMP::Restraints"""
7605  return _IMP_kernel.SingletonScore_do_create_current_decomposition(self, m, vt)
7606  __swig_destroy__ = _IMP_kernel.delete_SingletonScore
7607 
7608  def __str__(self):
7609  r"""__str__(SingletonScore self) -> std::string"""
7610  return _IMP_kernel.SingletonScore___str__(self)
7611 
7612  def __repr__(self):
7613  r"""__repr__(SingletonScore self) -> std::string"""
7614  return _IMP_kernel.SingletonScore___repr__(self)
7615 
7616  @staticmethod
7617  def get_from(o):
7618  return _object_cast_to_SingletonScore(o)
7619 
7620 
7621  def do_show(self, out):
7622  pass
7623 
7624  @staticmethod
7625  def get_from(o):
7626  return _object_cast_to_SingletonScore(o)
7627 
7628 
7629  def _wrap_jax(self, m, score_func, keys=None):
7630  """See IMP::PairScore::_wrap_jax"""
7631  from IMP._jax_util import JAXScoreInfo
7632  return JAXScoreInfo(m, score_func=score_func, keys=keys)
7633 
7634  def _get_jax(self, m, indexes):
7635  """See IMP::PairScore::_get_jax"""
7636  raise NotImplementedError(f"No JAX implementation for {self}")
7637 
7638  def __disown__(self):
7639  self.this.disown()
7640  _IMP_kernel.disown_SingletonScore(self)
7641  return weakref.proxy(self)
7642 
7643  def do_get_inputs(self, m, pis):
7644  r"""do_get_inputs(SingletonScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7645  return _IMP_kernel.SingletonScore_do_get_inputs(self, m, pis)
7646 
7647  def do_destroy(self):
7648  r"""do_destroy(SingletonScore self)"""
7649  return _IMP_kernel.SingletonScore_do_destroy(self)
7650 
7651 # Register SingletonScore in _IMP_kernel:
7652 _IMP_kernel.SingletonScore_swigregister(SingletonScore)
7653 class SingletonPredicate(_ParticleInputs, Object):
7654  r"""Proxy of C++ IMP::SingletonPredicate class."""
7655 
7656  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7657 
7658  def __init__(self, *args):
7659  r"""__init__(SingletonPredicate self, std::string name="SingletonPredicate %1%") -> SingletonPredicate"""
7660  if self.__class__ == SingletonPredicate:
7661  _self = None
7662  else:
7663  _self = self
7664  _IMP_kernel.SingletonPredicate_swiginit(self, _IMP_kernel.new_SingletonPredicate(_self, *args))
7665 
7666  if self.__class__ != SingletonPredicate:
7667  _director_objects.register(self)
7668 
7669 
7670 
7671 
7672  def setup_for_get_value_index_in_batch(self, arg0):
7673  r"""setup_for_get_value_index_in_batch(SingletonPredicate self, Model arg0)"""
7674  return _IMP_kernel.SingletonPredicate_setup_for_get_value_index_in_batch(self, arg0)
7675 
7676  def get_value_index_in_batch(self, m, vt):
7677  r"""get_value_index_in_batch(SingletonPredicate self, Model m, ParticleIndex vt) -> int"""
7678  return _IMP_kernel.SingletonPredicate_get_value_index_in_batch(self, m, vt)
7679 
7680  def __call__(self, m, vt):
7681  r"""__call__(SingletonPredicate self, Model m, ParticleIndex vt) -> int"""
7682  return _IMP_kernel.SingletonPredicate___call__(self, m, vt)
7683 
7684  def get_value_index(self, *args):
7685  r"""
7686  get_value_index(SingletonPredicate self, Model m, ParticleIndex vt) -> int
7687  get_value_index(SingletonPredicate self, Model m, IMP::ParticleIndexes const & o) -> IMP::Ints
7688  """
7689  return _IMP_kernel.SingletonPredicate_get_value_index(self, *args)
7690  __swig_destroy__ = _IMP_kernel.delete_SingletonPredicate
7691 
7692  def __str__(self):
7693  r"""__str__(SingletonPredicate self) -> std::string"""
7694  return _IMP_kernel.SingletonPredicate___str__(self)
7695 
7696  def __repr__(self):
7697  r"""__repr__(SingletonPredicate self) -> std::string"""
7698  return _IMP_kernel.SingletonPredicate___repr__(self)
7699 
7700  @staticmethod
7701  def get_from(o):
7702  return _object_cast_to_SingletonPredicate(o)
7703 
7704 
7705  def do_show(self, out):
7706  pass
7707 
7708  @staticmethod
7709  def get_from(o):
7710  return _object_cast_to_SingletonPredicate(o)
7711 
7712  def __disown__(self):
7713  self.this.disown()
7714  _IMP_kernel.disown_SingletonPredicate(self)
7715  return weakref.proxy(self)
7716 
7717  def do_get_inputs(self, m, pis):
7718  r"""do_get_inputs(SingletonPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7719  return _IMP_kernel.SingletonPredicate_do_get_inputs(self, m, pis)
7720 
7721  def do_destroy(self):
7722  r"""do_destroy(SingletonPredicate self)"""
7723  return _IMP_kernel.SingletonPredicate_do_destroy(self)
7724 
7725 # Register SingletonPredicate in _IMP_kernel:
7726 _IMP_kernel.SingletonPredicate_swigregister(SingletonPredicate)
7728  r"""Proxy of C++ IMP::SingletonContainer class."""
7729 
7730  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7731 
7732  def apply_generic(self, m):
7733  r"""apply_generic(SingletonContainer self, SingletonModifier m)"""
7734  return _IMP_kernel.SingletonContainer_apply_generic(self, m)
7735 
7736  def apply_generic_moved(self, m, moved_pis, reset_pis):
7737  r"""apply_generic_moved(SingletonContainer self, SingletonModifier m, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
7738  return _IMP_kernel.SingletonContainer_apply_generic_moved(self, m, moved_pis, reset_pis)
7739 
7740  def apply(self, sm):
7741  r"""apply(SingletonContainer self, SingletonModifier sm)"""
7742  return _IMP_kernel.SingletonContainer_apply(self, sm)
7743 
7744  def apply_moved(self, sm, moved_pis, reset_pis):
7745  r"""apply_moved(SingletonContainer self, SingletonModifier sm, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
7746  return _IMP_kernel.SingletonContainer_apply_moved(self, sm, moved_pis, reset_pis)
7747 
7748  def get_range_indexes(self):
7749  r"""get_range_indexes(SingletonContainer self) -> IMP::ParticleIndexes"""
7750  return _IMP_kernel.SingletonContainer_get_range_indexes(self)
7751 
7752  def get_contents(self):
7753  r"""get_contents(SingletonContainer self) -> IMP::ParticleIndexes const &"""
7754  return _IMP_kernel.SingletonContainer_get_contents(self)
7755 
7756  def get_indexes(self):
7757  r"""get_indexes(SingletonContainer self) -> IMP::ParticleIndexes"""
7758  return _IMP_kernel.SingletonContainer_get_indexes(self)
7759 
7760  def get(self, *args):
7761  r"""
7762  get(SingletonContainer self) -> IMP::ParticlesTemp
7763  get(SingletonContainer self, unsigned int i) -> Particle
7764  """
7765  return _IMP_kernel.SingletonContainer_get(self, *args)
7766 
7767  def get_number(self):
7768  r"""get_number(SingletonContainer self) -> unsigned int"""
7769  return _IMP_kernel.SingletonContainer_get_number(self)
7770 
7771  def __init__(self, *args):
7772  r"""
7773  __init__(SingletonContainer self, Model m, std::string name="SingletonContainer %1%") -> SingletonContainer
7774  __init__(SingletonContainer self) -> SingletonContainer
7775  """
7776  if self.__class__ == SingletonContainer:
7777  _self = None
7778  else:
7779  _self = self
7780  _IMP_kernel.SingletonContainer_swiginit(self, _IMP_kernel.new_SingletonContainer(_self, *args))
7781 
7782  if self.__class__ != SingletonContainer:
7783  _director_objects.register(self)
7784 
7785 
7786 
7787 
7788  def do_apply(self, sm):
7789  r"""do_apply(SingletonContainer self, SingletonModifier sm)"""
7790  return _IMP_kernel.SingletonContainer_do_apply(self, sm)
7791 
7792  def do_apply_moved(self, sm, moved_pis, reset_pis):
7793  r"""do_apply_moved(SingletonContainer self, SingletonModifier sm, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
7794  return _IMP_kernel.SingletonContainer_do_apply_moved(self, sm, moved_pis, reset_pis)
7795 
7796  def do_get_provides_access(self):
7797  r"""do_get_provides_access(SingletonContainer self) -> bool"""
7798  return _IMP_kernel.SingletonContainer_do_get_provides_access(self)
7799  __swig_destroy__ = _IMP_kernel.delete_SingletonContainer
7800 
7801  def __str__(self):
7802  r"""__str__(SingletonContainer self) -> std::string"""
7803  return _IMP_kernel.SingletonContainer___str__(self)
7804 
7805  def __repr__(self):
7806  r"""__repr__(SingletonContainer self) -> std::string"""
7807  return _IMP_kernel.SingletonContainer___repr__(self)
7808 
7809  @staticmethod
7810  def get_from(o):
7811  return _object_cast_to_SingletonContainer(o)
7812 
7813 
7814  def do_show(self, out):
7815  pass
7816 
7817  @staticmethod
7818  def get_from(o):
7819  return _object_cast_to_SingletonContainer(o)
7820 
7821  def __disown__(self):
7822  self.this.disown()
7823  _IMP_kernel.disown_SingletonContainer(self)
7824  return weakref.proxy(self)
7825 
7826  def do_destroy(self):
7827  r"""do_destroy(SingletonContainer self)"""
7828  return _IMP_kernel.SingletonContainer_do_destroy(self)
7829 
7830  def handle_set_has_required_score_states(self, arg0):
7831  r"""handle_set_has_required_score_states(SingletonContainer self, bool arg0)"""
7832  return _IMP_kernel.SingletonContainer_handle_set_has_required_score_states(self, arg0)
7833 
7834  def do_get_inputs(self):
7835  r"""do_get_inputs(SingletonContainer self) -> IMP::ModelObjectsTemp"""
7836  return _IMP_kernel.SingletonContainer_do_get_inputs(self)
7837 
7838  def do_get_interactions(self):
7839  r"""do_get_interactions(SingletonContainer self) -> IMP::ModelObjectsTemps"""
7840  return _IMP_kernel.SingletonContainer_do_get_interactions(self)
7841 
7842  def do_get_contents_hash(self):
7843  r"""do_get_contents_hash(SingletonContainer self) -> std::size_t"""
7844  return _IMP_kernel.SingletonContainer_do_get_contents_hash(self)
7845 
7846 # Register SingletonContainer in _IMP_kernel:
7847 _IMP_kernel.SingletonContainer_swigregister(SingletonContainer)
7848 class _SingletonContainerAdaptor(_InputAdaptor):
7849  r"""Proxy of C++ IMP::SingletonContainerAdaptor class."""
7850 
7851  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7852  __repr__ = _swig_repr
7853 
7854  def __init__(self, *args):
7855  r"""
7856  __init__(_SingletonContainerAdaptor self) -> _SingletonContainerAdaptor
7857  __init__(_SingletonContainerAdaptor self, SingletonContainer c) -> _SingletonContainerAdaptor
7858  __init__(_SingletonContainerAdaptor self, IMP::ParticlesTemp const & t) -> _SingletonContainerAdaptor
7859  """
7860  _IMP_kernel._SingletonContainerAdaptor_swiginit(self, _IMP_kernel.new__SingletonContainerAdaptor(*args))
7861 
7862  def set_name_if_default(self, name):
7863  r"""set_name_if_default(_SingletonContainerAdaptor self, std::string name)"""
7864  return _IMP_kernel._SingletonContainerAdaptor_set_name_if_default(self, name)
7865  __swig_destroy__ = _IMP_kernel.delete__SingletonContainerAdaptor
7866 
7867 # Register _SingletonContainerAdaptor in _IMP_kernel:
7868 _IMP_kernel._SingletonContainerAdaptor_swigregister(_SingletonContainerAdaptor)
7869 class TripletModifier(_ParticleInputs, _ParticleOutputs, Object):
7870  r"""Proxy of C++ IMP::TripletModifier class."""
7871 
7872  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7873 
7874  def __init__(self, *args):
7875  r"""__init__(TripletModifier self, std::string name="TripletModifier %1%") -> TripletModifier"""
7876  if self.__class__ == TripletModifier:
7877  _self = None
7878  else:
7879  _self = self
7880  _IMP_kernel.TripletModifier_swiginit(self, _IMP_kernel.new_TripletModifier(_self, *args))
7881 
7882  if self.__class__ != TripletModifier:
7883  _director_objects.register(self)
7884 
7885 
7886 
7887 
7888  def apply_index(self, m, v):
7889  r"""apply_index(TripletModifier self, Model m, IMP::ParticleIndexTriplet const & v)"""
7890  return _IMP_kernel.TripletModifier_apply_index(self, m, v)
7891 
7892  def apply_indexes(self, m, o, lower_bound, upper_bound):
7893  r"""apply_indexes(TripletModifier self, Model m, IMP::ParticleIndexTriplets const & o, unsigned int lower_bound, unsigned int upper_bound)"""
7894  return _IMP_kernel.TripletModifier_apply_indexes(self, m, o, lower_bound, upper_bound)
7895 
7896  def apply_indexes_moved(self, m, o, lower_bound, upper_bound, moved_pis, reset_pis):
7897  r"""apply_indexes_moved(TripletModifier self, Model m, IMP::ParticleIndexTriplets const & o, unsigned int lower_bound, unsigned int upper_bound, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
7898  return _IMP_kernel.TripletModifier_apply_indexes_moved(self, m, o, lower_bound, upper_bound, moved_pis, reset_pis)
7899 
7900  def __str__(self):
7901  r"""__str__(TripletModifier self) -> std::string"""
7902  return _IMP_kernel.TripletModifier___str__(self)
7903 
7904  def __repr__(self):
7905  r"""__repr__(TripletModifier self) -> std::string"""
7906  return _IMP_kernel.TripletModifier___repr__(self)
7907 
7908  @staticmethod
7909  def get_from(o):
7910  return _object_cast_to_TripletModifier(o)
7911 
7912 
7913  def do_show(self, out):
7914  pass
7915 
7916  @staticmethod
7917  def get_from(o):
7918  return _object_cast_to_TripletModifier(o)
7919 
7920  __swig_destroy__ = _IMP_kernel.delete_TripletModifier
7921  def __disown__(self):
7922  self.this.disown()
7923  _IMP_kernel.disown_TripletModifier(self)
7924  return weakref.proxy(self)
7925 
7926  def do_get_inputs(self, m, pis):
7927  r"""do_get_inputs(TripletModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7928  return _IMP_kernel.TripletModifier_do_get_inputs(self, m, pis)
7929 
7930  def do_get_outputs(self, m, pis):
7931  r"""do_get_outputs(TripletModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
7932  return _IMP_kernel.TripletModifier_do_get_outputs(self, m, pis)
7933 
7934  def do_destroy(self):
7935  r"""do_destroy(TripletModifier self)"""
7936  return _IMP_kernel.TripletModifier_do_destroy(self)
7937 
7938 # Register TripletModifier in _IMP_kernel:
7939 _IMP_kernel.TripletModifier_swigregister(TripletModifier)
7940 class TripletScore(_ParticleInputs, Object):
7941  r"""Proxy of C++ IMP::TripletScore class."""
7942 
7943  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
7944 
7945  def __init__(self, *args):
7946  r"""__init__(TripletScore self, std::string name="TripletScore %1%") -> TripletScore"""
7947  if self.__class__ == TripletScore:
7948  _self = None
7949  else:
7950  _self = self
7951  _IMP_kernel.TripletScore_swiginit(self, _IMP_kernel.new_TripletScore(_self, *args))
7952 
7953  if self.__class__ != TripletScore:
7954  _director_objects.register(self)
7955 
7956 
7957 
7958 
7959  def evaluate_index(self, m, vt, da):
7960  r"""evaluate_index(TripletScore self, Model m, IMP::ParticleIndexTriplet const & vt, DerivativeAccumulator da) -> double"""
7961  return _IMP_kernel.TripletScore_evaluate_index(self, m, vt, da)
7962 
7963  def check_indexes(self, m, pis):
7964  r"""check_indexes(TripletScore self, Model m, IMP::ParticleIndexes const & pis) -> bool"""
7965  return _IMP_kernel.TripletScore_check_indexes(self, m, pis)
7966 
7967  def evaluate_indexes(self, m, o, da, lower_bound, upper_bound, all_indexes_checked=False):
7968  r"""evaluate_indexes(TripletScore self, Model m, IMP::ParticleIndexTriplets const & o, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
7969  return _IMP_kernel.TripletScore_evaluate_indexes(self, m, o, da, lower_bound, upper_bound, all_indexes_checked)
7970 
7971  def evaluate_indexes_scores(self, m, o, da, lower_bound, upper_bound, score, all_indexes_checked=False):
7972  r"""evaluate_indexes_scores(TripletScore self, Model m, IMP::ParticleIndexTriplets const & o, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, std::vector< double,std::allocator< double > > & score, bool all_indexes_checked=False) -> double"""
7973  return _IMP_kernel.TripletScore_evaluate_indexes_scores(self, m, o, da, lower_bound, upper_bound, score, all_indexes_checked)
7974 
7975  def evaluate_indexes_delta(self, m, o, da, indexes, score, all_indexes_checked=False):
7976  r"""evaluate_indexes_delta(TripletScore self, Model m, IMP::ParticleIndexTriplets const & o, 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"""
7977  return _IMP_kernel.TripletScore_evaluate_indexes_delta(self, m, o, da, indexes, score, all_indexes_checked)
7978 
7979  def evaluate_if_good_index(self, m, vt, da, max):
7980  r"""evaluate_if_good_index(TripletScore self, Model m, IMP::ParticleIndexTriplet const & vt, DerivativeAccumulator da, double max) -> double"""
7981  return _IMP_kernel.TripletScore_evaluate_if_good_index(self, m, vt, da, max)
7982 
7983  def evaluate_if_good_indexes(self, m, o, da, max, lower_bound, upper_bound, all_indexes_checked=False):
7984  r"""evaluate_if_good_indexes(TripletScore self, Model m, IMP::ParticleIndexTriplets const & o, DerivativeAccumulator da, double max, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
7985  return _IMP_kernel.TripletScore_evaluate_if_good_indexes(self, m, o, da, max, lower_bound, upper_bound, all_indexes_checked)
7986 
7987  def create_current_decomposition(self, m, vt):
7988  r"""create_current_decomposition(TripletScore self, Model m, IMP::ParticleIndexTriplet const & vt) -> IMP::Restraints"""
7989  return _IMP_kernel.TripletScore_create_current_decomposition(self, m, vt)
7990 
7991  def do_create_current_decomposition(self, m, vt):
7992  r"""do_create_current_decomposition(TripletScore self, Model m, IMP::ParticleIndexTriplet const & vt) -> IMP::Restraints"""
7993  return _IMP_kernel.TripletScore_do_create_current_decomposition(self, m, vt)
7994  __swig_destroy__ = _IMP_kernel.delete_TripletScore
7995 
7996  def __str__(self):
7997  r"""__str__(TripletScore self) -> std::string"""
7998  return _IMP_kernel.TripletScore___str__(self)
7999 
8000  def __repr__(self):
8001  r"""__repr__(TripletScore self) -> std::string"""
8002  return _IMP_kernel.TripletScore___repr__(self)
8003 
8004  @staticmethod
8005  def get_from(o):
8006  return _object_cast_to_TripletScore(o)
8007 
8008 
8009  def do_show(self, out):
8010  pass
8011 
8012  @staticmethod
8013  def get_from(o):
8014  return _object_cast_to_TripletScore(o)
8015 
8016  def __disown__(self):
8017  self.this.disown()
8018  _IMP_kernel.disown_TripletScore(self)
8019  return weakref.proxy(self)
8020 
8021  def do_get_inputs(self, m, pis):
8022  r"""do_get_inputs(TripletScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
8023  return _IMP_kernel.TripletScore_do_get_inputs(self, m, pis)
8024 
8025  def do_destroy(self):
8026  r"""do_destroy(TripletScore self)"""
8027  return _IMP_kernel.TripletScore_do_destroy(self)
8028 
8029 # Register TripletScore in _IMP_kernel:
8030 _IMP_kernel.TripletScore_swigregister(TripletScore)
8031 class TripletPredicate(_ParticleInputs, Object):
8032  r"""Proxy of C++ IMP::TripletPredicate class."""
8033 
8034  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8035 
8036  def __init__(self, *args):
8037  r"""__init__(TripletPredicate self, std::string name="TripletPredicate %1%") -> TripletPredicate"""
8038  if self.__class__ == TripletPredicate:
8039  _self = None
8040  else:
8041  _self = self
8042  _IMP_kernel.TripletPredicate_swiginit(self, _IMP_kernel.new_TripletPredicate(_self, *args))
8043 
8044  if self.__class__ != TripletPredicate:
8045  _director_objects.register(self)
8046 
8047 
8048 
8049 
8050  def setup_for_get_value_index_in_batch(self, arg0):
8051  r"""setup_for_get_value_index_in_batch(TripletPredicate self, Model arg0)"""
8052  return _IMP_kernel.TripletPredicate_setup_for_get_value_index_in_batch(self, arg0)
8053 
8054  def get_value_index_in_batch(self, m, vt):
8055  r"""get_value_index_in_batch(TripletPredicate self, Model m, IMP::ParticleIndexTriplet const & vt) -> int"""
8056  return _IMP_kernel.TripletPredicate_get_value_index_in_batch(self, m, vt)
8057 
8058  def __call__(self, m, vt):
8059  r"""__call__(TripletPredicate self, Model m, IMP::ParticleIndexTriplet const & vt) -> int"""
8060  return _IMP_kernel.TripletPredicate___call__(self, m, vt)
8061 
8062  def get_value_index(self, *args):
8063  r"""
8064  get_value_index(TripletPredicate self, Model m, IMP::ParticleIndexTriplet const & vt) -> int
8065  get_value_index(TripletPredicate self, Model m, IMP::ParticleIndexTriplets const & o) -> IMP::Ints
8066  """
8067  return _IMP_kernel.TripletPredicate_get_value_index(self, *args)
8068  __swig_destroy__ = _IMP_kernel.delete_TripletPredicate
8069 
8070  def __str__(self):
8071  r"""__str__(TripletPredicate self) -> std::string"""
8072  return _IMP_kernel.TripletPredicate___str__(self)
8073 
8074  def __repr__(self):
8075  r"""__repr__(TripletPredicate self) -> std::string"""
8076  return _IMP_kernel.TripletPredicate___repr__(self)
8077 
8078  @staticmethod
8079  def get_from(o):
8080  return _object_cast_to_TripletPredicate(o)
8081 
8082 
8083  def do_show(self, out):
8084  pass
8085 
8086  @staticmethod
8087  def get_from(o):
8088  return _object_cast_to_TripletPredicate(o)
8089 
8090  def __disown__(self):
8091  self.this.disown()
8092  _IMP_kernel.disown_TripletPredicate(self)
8093  return weakref.proxy(self)
8094 
8095  def do_get_inputs(self, m, pis):
8096  r"""do_get_inputs(TripletPredicate self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
8097  return _IMP_kernel.TripletPredicate_do_get_inputs(self, m, pis)
8098 
8099  def do_destroy(self):
8100  r"""do_destroy(TripletPredicate self)"""
8101  return _IMP_kernel.TripletPredicate_do_destroy(self)
8102 
8103 # Register TripletPredicate in _IMP_kernel:
8104 _IMP_kernel.TripletPredicate_swigregister(TripletPredicate)
8106  r"""Proxy of C++ IMP::TripletContainer class."""
8107 
8108  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8109 
8110  def apply_generic(self, m):
8111  r"""apply_generic(TripletContainer self, TripletModifier m)"""
8112  return _IMP_kernel.TripletContainer_apply_generic(self, m)
8113 
8114  def apply_generic_moved(self, m, moved_pis, reset_pis):
8115  r"""apply_generic_moved(TripletContainer self, TripletModifier m, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
8116  return _IMP_kernel.TripletContainer_apply_generic_moved(self, m, moved_pis, reset_pis)
8117 
8118  def apply(self, sm):
8119  r"""apply(TripletContainer self, TripletModifier sm)"""
8120  return _IMP_kernel.TripletContainer_apply(self, sm)
8121 
8122  def apply_moved(self, sm, moved_pis, reset_pis):
8123  r"""apply_moved(TripletContainer self, TripletModifier sm, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
8124  return _IMP_kernel.TripletContainer_apply_moved(self, sm, moved_pis, reset_pis)
8125 
8126  def get_range_indexes(self):
8127  r"""get_range_indexes(TripletContainer self) -> IMP::ParticleIndexTriplets"""
8128  return _IMP_kernel.TripletContainer_get_range_indexes(self)
8129 
8130  def get_contents(self):
8131  r"""get_contents(TripletContainer self) -> IMP::ParticleIndexTriplets const &"""
8132  return _IMP_kernel.TripletContainer_get_contents(self)
8133 
8134  def get_indexes(self):
8135  r"""get_indexes(TripletContainer self) -> IMP::ParticleIndexTriplets"""
8136  return _IMP_kernel.TripletContainer_get_indexes(self)
8137 
8138  def get(self, *args):
8139  r"""
8140  get(TripletContainer self) -> IMP::ParticleTripletsTemp
8141  get(TripletContainer self, unsigned int i) -> IMP::ParticleTriplet
8142  """
8143  return _IMP_kernel.TripletContainer_get(self, *args)
8144 
8145  def get_number(self):
8146  r"""get_number(TripletContainer self) -> unsigned int"""
8147  return _IMP_kernel.TripletContainer_get_number(self)
8148 
8149  def __init__(self, *args):
8150  r"""
8151  __init__(TripletContainer self, Model m, std::string name="TripletContainer %1%") -> TripletContainer
8152  __init__(TripletContainer self) -> TripletContainer
8153  """
8154  if self.__class__ == TripletContainer:
8155  _self = None
8156  else:
8157  _self = self
8158  _IMP_kernel.TripletContainer_swiginit(self, _IMP_kernel.new_TripletContainer(_self, *args))
8159 
8160  if self.__class__ != TripletContainer:
8161  _director_objects.register(self)
8162 
8163 
8164 
8165 
8166  def do_apply(self, sm):
8167  r"""do_apply(TripletContainer self, TripletModifier sm)"""
8168  return _IMP_kernel.TripletContainer_do_apply(self, sm)
8169 
8170  def do_apply_moved(self, sm, moved_pis, reset_pis):
8171  r"""do_apply_moved(TripletContainer self, TripletModifier sm, IMP::ParticleIndexes const & moved_pis, IMP::ParticleIndexes const & reset_pis)"""
8172  return _IMP_kernel.TripletContainer_do_apply_moved(self, sm, moved_pis, reset_pis)
8173 
8174  def do_get_provides_access(self):
8175  r"""do_get_provides_access(TripletContainer self) -> bool"""
8176  return _IMP_kernel.TripletContainer_do_get_provides_access(self)
8177  __swig_destroy__ = _IMP_kernel.delete_TripletContainer
8178 
8179  def __str__(self):
8180  r"""__str__(TripletContainer self) -> std::string"""
8181  return _IMP_kernel.TripletContainer___str__(self)
8182 
8183  def __repr__(self):
8184  r"""__repr__(TripletContainer self) -> std::string"""
8185  return _IMP_kernel.TripletContainer___repr__(self)
8186 
8187  @staticmethod
8188  def get_from(o):
8189  return _object_cast_to_TripletContainer(o)
8190 
8191 
8192  def do_show(self, out):
8193  pass
8194 
8195  @staticmethod
8196  def get_from(o):
8197  return _object_cast_to_TripletContainer(o)
8198 
8199  def __disown__(self):
8200  self.this.disown()
8201  _IMP_kernel.disown_TripletContainer(self)
8202  return weakref.proxy(self)
8203 
8204  def do_destroy(self):
8205  r"""do_destroy(TripletContainer self)"""
8206  return _IMP_kernel.TripletContainer_do_destroy(self)
8207 
8208  def handle_set_has_required_score_states(self, arg0):
8209  r"""handle_set_has_required_score_states(TripletContainer self, bool arg0)"""
8210  return _IMP_kernel.TripletContainer_handle_set_has_required_score_states(self, arg0)
8211 
8212  def do_get_inputs(self):
8213  r"""do_get_inputs(TripletContainer self) -> IMP::ModelObjectsTemp"""
8214  return _IMP_kernel.TripletContainer_do_get_inputs(self)
8215 
8216  def do_get_interactions(self):
8217  r"""do_get_interactions(TripletContainer self) -> IMP::ModelObjectsTemps"""
8218  return _IMP_kernel.TripletContainer_do_get_interactions(self)
8219 
8220  def do_get_contents_hash(self):
8221  r"""do_get_contents_hash(TripletContainer self) -> std::size_t"""
8222  return _IMP_kernel.TripletContainer_do_get_contents_hash(self)
8223 
8224 # Register TripletContainer in _IMP_kernel:
8225 _IMP_kernel.TripletContainer_swigregister(TripletContainer)
8226 class _TripletContainerAdaptor(_InputAdaptor):
8227  r"""Proxy of C++ IMP::TripletContainerAdaptor class."""
8228 
8229  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8230  __repr__ = _swig_repr
8231 
8232  def __init__(self, *args):
8233  r"""
8234  __init__(_TripletContainerAdaptor self) -> _TripletContainerAdaptor
8235  __init__(_TripletContainerAdaptor self, TripletContainer c) -> _TripletContainerAdaptor
8236  __init__(_TripletContainerAdaptor self, IMP::ParticleTripletsTemp const & t) -> _TripletContainerAdaptor
8237  """
8238  _IMP_kernel._TripletContainerAdaptor_swiginit(self, _IMP_kernel.new__TripletContainerAdaptor(*args))
8239 
8240  def set_name_if_default(self, name):
8241  r"""set_name_if_default(_TripletContainerAdaptor self, std::string name)"""
8242  return _IMP_kernel._TripletContainerAdaptor_set_name_if_default(self, name)
8243  __swig_destroy__ = _IMP_kernel.delete__TripletContainerAdaptor
8244 
8245 # Register _TripletContainerAdaptor in _IMP_kernel:
8246 _IMP_kernel._TripletContainerAdaptor_swigregister(_TripletContainerAdaptor)
8247 
8248 def write_particles_to_buffer(particles, keys):
8249  r"""write_particles_to_buffer(IMP::ParticlesTemp const & particles, IMP::FloatKeys const & keys) -> IMP::Vector< char,std::allocator< char > >"""
8250  return _IMP_kernel.write_particles_to_buffer(particles, keys)
8251 
8252 def read_particles_from_buffer(buffer, particles, keys):
8253  r"""read_particles_from_buffer(IMP::Vector< char,std::allocator< char > > const & buffer, IMP::ParticlesTemp const & particles, IMP::FloatKeys const & keys)"""
8254  return _IMP_kernel.read_particles_from_buffer(buffer, particles, keys)
8255 
8256 def get_particles(m, ps):
8257  r"""get_particles(Model m, IMP::ParticleIndexes const & ps) -> IMP::ParticlesTemp"""
8258  return _IMP_kernel.get_particles(m, ps)
8259 
8260 def get_indexes(*args):
8261  r"""
8262  get_indexes(IMP::ParticlesTemp const & ps) -> IMP::ParticleIndexes
8263  get_indexes(IMP::ParticlePairsTemp const & ps) -> IMP::ParticleIndexPairs
8264  """
8265  return _IMP_kernel.get_indexes(*args)
8266 class _ParticleIndexAdaptor(object):
8267  r"""Proxy of C++ IMP::ParticleIndexAdaptor class."""
8268 
8269  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8270  __repr__ = _swig_repr
8271 
8272  def __init__(self, *args):
8273  r"""
8274  __init__(_ParticleIndexAdaptor self, Particle p) -> _ParticleIndexAdaptor
8275  __init__(_ParticleIndexAdaptor self, ParticleIndex pi) -> _ParticleIndexAdaptor
8276  __init__(_ParticleIndexAdaptor self, Decorator d) -> _ParticleIndexAdaptor
8277  """
8278  _IMP_kernel._ParticleIndexAdaptor_swiginit(self, _IMP_kernel.new__ParticleIndexAdaptor(*args))
8279  __swig_destroy__ = _IMP_kernel.delete__ParticleIndexAdaptor
8280 
8281 # Register _ParticleIndexAdaptor in _IMP_kernel:
8282 _IMP_kernel._ParticleIndexAdaptor_swigregister(_ParticleIndexAdaptor)
8283 class _ParticleIndexesAdaptor(_InputAdaptor):
8284  r"""Proxy of C++ IMP::ParticleIndexesAdaptor class."""
8285 
8286  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8287  __repr__ = _swig_repr
8288 
8289  def __init__(self, *args):
8290  r"""
8291  __init__(_ParticleIndexesAdaptor self, IMP::ParticlesTemp const & ps) -> _ParticleIndexesAdaptor
8292  __init__(_ParticleIndexesAdaptor self, IMP::ParticleIndexes const & pi) -> _ParticleIndexesAdaptor
8293  __init__(_ParticleIndexesAdaptor self) -> _ParticleIndexesAdaptor
8294  """
8295  _IMP_kernel._ParticleIndexesAdaptor_swiginit(self, _IMP_kernel.new__ParticleIndexesAdaptor(*args))
8296  __swig_destroy__ = _IMP_kernel.delete__ParticleIndexesAdaptor
8297 
8298 # Register _ParticleIndexesAdaptor in _IMP_kernel:
8299 _IMP_kernel._ParticleIndexesAdaptor_swigregister(_ParticleIndexesAdaptor)
8300 class _ParticleIndexPairsAdaptor(object):
8301  r"""Proxy of C++ IMP::ParticleIndexPairsAdaptor class."""
8302 
8303  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8304  __repr__ = _swig_repr
8305 
8306  def __init__(self, *args):
8307  r"""
8308  __init__(_ParticleIndexPairsAdaptor self, IMP::ParticlePairsTemp const & ps) -> _ParticleIndexPairsAdaptor
8309  __init__(_ParticleIndexPairsAdaptor self, IMP::ParticleIndexPairs const & pi) -> _ParticleIndexPairsAdaptor
8310  __init__(_ParticleIndexPairsAdaptor self) -> _ParticleIndexPairsAdaptor
8311  """
8312  _IMP_kernel._ParticleIndexPairsAdaptor_swiginit(self, _IMP_kernel.new__ParticleIndexPairsAdaptor(*args))
8313  __swig_destroy__ = _IMP_kernel.delete__ParticleIndexPairsAdaptor
8314 
8315 # Register _ParticleIndexPairsAdaptor in _IMP_kernel:
8316 _IMP_kernel._ParticleIndexPairsAdaptor_swigregister(_ParticleIndexPairsAdaptor)
8317 class _ConstRestraint(Restraint):
8318  r"""Proxy of C++ IMP::internal::_ConstRestraint class."""
8319 
8320  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8321 
8322  def __init__(self, *args):
8323  r"""
8324  __init__(_ConstRestraint self, Model m, IMP::ParticleIndexes const & pis, double v) -> _ConstRestraint
8325  __init__(_ConstRestraint self) -> _ConstRestraint
8326  """
8327  _IMP_kernel._ConstRestraint_swiginit(self, _IMP_kernel.new__ConstRestraint(*args))
8328 
8329  def get_value(self):
8330  r"""get_value(_ConstRestraint self) -> double"""
8331  return _IMP_kernel._ConstRestraint_get_value(self)
8332 
8333  def do_create_decomposition(self):
8334  r"""do_create_decomposition(_ConstRestraint self) -> IMP::Restraints"""
8335  return _IMP_kernel._ConstRestraint_do_create_decomposition(self)
8336 
8337  def do_get_inputs(self):
8338  r"""do_get_inputs(_ConstRestraint self) -> IMP::ModelObjectsTemp"""
8339  return _IMP_kernel._ConstRestraint_do_get_inputs(self)
8340 
8341  def get_version_info(self):
8342  r"""get_version_info(_ConstRestraint self) -> VersionInfo"""
8343  return _IMP_kernel._ConstRestraint_get_version_info(self)
8344  __swig_destroy__ = _IMP_kernel.delete__ConstRestraint
8345 
8346  def __str__(self):
8347  r"""__str__(_ConstRestraint self) -> std::string"""
8348  return _IMP_kernel._ConstRestraint___str__(self)
8349 
8350  def __repr__(self):
8351  r"""__repr__(_ConstRestraint self) -> std::string"""
8352  return _IMP_kernel._ConstRestraint___repr__(self)
8353 
8354  @staticmethod
8355  def get_from(o):
8356  return _object_cast_to__ConstRestraint(o)
8357 
8358 
8359  def _get_as_binary(self):
8360  r"""_get_as_binary(_ConstRestraint self) -> PyObject *"""
8361  return _IMP_kernel._ConstRestraint__get_as_binary(self)
8362 
8363  def _set_from_binary(self, p):
8364  r"""_set_from_binary(_ConstRestraint self, PyObject * p)"""
8365  return _IMP_kernel._ConstRestraint__set_from_binary(self, p)
8366 
8367  def __getstate__(self):
8368  p = self._get_as_binary()
8369  if len(self.__dict__) > 1:
8370  d = self.__dict__.copy()
8371  del d['this']
8372  p = (d, p)
8373  return p
8374 
8375  def __setstate__(self, p):
8376  if not hasattr(self, 'this'):
8377  self.__init__()
8378  if isinstance(p, tuple):
8379  d, p = p
8380  self.__dict__.update(d)
8381  return self._set_from_binary(p)
8382 
8383 
8384  def _get_jax(self):
8385  value = self.get_value()
8386  # We always return `value` regardless of the JAX Model
8387  return self._wrap_jax(lambda jm: value)
8388 
8389 
8390 # Register _ConstRestraint in _IMP_kernel:
8391 _IMP_kernel._ConstRestraint_swigregister(_ConstRestraint)
8392 class _ConstSingletonScore(SingletonScore):
8393  r"""Proxy of C++ IMP::internal::_ConstSingletonScore class."""
8394 
8395  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8396 
8397  def __init__(self, *args):
8398  r"""
8399  __init__(_ConstSingletonScore self, double v) -> _ConstSingletonScore
8400  __init__(_ConstSingletonScore self) -> _ConstSingletonScore
8401  """
8402  _IMP_kernel._ConstSingletonScore_swiginit(self, _IMP_kernel.new__ConstSingletonScore(*args))
8403 
8404  def get_value(self):
8405  r"""get_value(_ConstSingletonScore self) -> double"""
8406  return _IMP_kernel._ConstSingletonScore_get_value(self)
8407 
8408  def do_get_inputs(self, arg2, arg3):
8409  r"""do_get_inputs(_ConstSingletonScore self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
8410  return _IMP_kernel._ConstSingletonScore_do_get_inputs(self, arg2, arg3)
8411 
8412  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
8413  r"""evaluate_indexes(_ConstSingletonScore self, Model m, IMP::ParticleIndexes const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
8414  return _IMP_kernel._ConstSingletonScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
8415 
8416  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
8417  r"""evaluate_indexes_scores(_ConstSingletonScore 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"""
8418  return _IMP_kernel._ConstSingletonScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
8419 
8420  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
8421  r"""evaluate_indexes_delta(_ConstSingletonScore 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"""
8422  return _IMP_kernel._ConstSingletonScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
8423 
8424  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
8425  r"""evaluate_if_good_indexes(_ConstSingletonScore 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"""
8426  return _IMP_kernel._ConstSingletonScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
8427 
8428  def get_version_info(self):
8429  r"""get_version_info(_ConstSingletonScore self) -> VersionInfo"""
8430  return _IMP_kernel._ConstSingletonScore_get_version_info(self)
8431  __swig_destroy__ = _IMP_kernel.delete__ConstSingletonScore
8432 
8433  def __str__(self):
8434  r"""__str__(_ConstSingletonScore self) -> std::string"""
8435  return _IMP_kernel._ConstSingletonScore___str__(self)
8436 
8437  def __repr__(self):
8438  r"""__repr__(_ConstSingletonScore self) -> std::string"""
8439  return _IMP_kernel._ConstSingletonScore___repr__(self)
8440 
8441  @staticmethod
8442  def get_from(o):
8443  return _object_cast_to__ConstSingletonScore(o)
8444 
8445 
8446  def _get_as_binary(self):
8447  r"""_get_as_binary(_ConstSingletonScore self) -> PyObject *"""
8448  return _IMP_kernel._ConstSingletonScore__get_as_binary(self)
8449 
8450  def _set_from_binary(self, p):
8451  r"""_set_from_binary(_ConstSingletonScore self, PyObject * p)"""
8452  return _IMP_kernel._ConstSingletonScore__set_from_binary(self, p)
8453 
8454  def __getstate__(self):
8455  p = self._get_as_binary()
8456  if len(self.__dict__) > 1:
8457  d = self.__dict__.copy()
8458  del d['this']
8459  p = (d, p)
8460  return p
8461 
8462  def __setstate__(self, p):
8463  if not hasattr(self, 'this'):
8464  self.__init__()
8465  if isinstance(p, tuple):
8466  d, p = p
8467  self.__dict__.update(d)
8468  return self._set_from_binary(p)
8469 
8470 
8471  def _get_jax(self, m, indexes):
8472  value = self.get_value()
8473  # We always return `value` regardless of the JAX Model or indexes
8474  return self._wrap_jax(m, lambda jm: value)
8475 
8476 
8477 # Register _ConstSingletonScore in _IMP_kernel:
8478 _IMP_kernel._ConstSingletonScore_swigregister(_ConstSingletonScore)
8479 class _ConstPairScore(PairScore):
8480  r"""Proxy of C++ IMP::internal::_ConstPairScore class."""
8481 
8482  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8483 
8484  def __init__(self, *args):
8485  r"""
8486  __init__(_ConstPairScore self, double v) -> _ConstPairScore
8487  __init__(_ConstPairScore self) -> _ConstPairScore
8488  """
8489  _IMP_kernel._ConstPairScore_swiginit(self, _IMP_kernel.new__ConstPairScore(*args))
8490 
8491  def get_value(self):
8492  r"""get_value(_ConstPairScore self) -> double"""
8493  return _IMP_kernel._ConstPairScore_get_value(self)
8494 
8495  def do_get_inputs(self, arg2, arg3):
8496  r"""do_get_inputs(_ConstPairScore self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
8497  return _IMP_kernel._ConstPairScore_do_get_inputs(self, arg2, arg3)
8498 
8499  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
8500  r"""evaluate_indexes(_ConstPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
8501  return _IMP_kernel._ConstPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
8502 
8503  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
8504  r"""evaluate_indexes_scores(_ConstPairScore 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"""
8505  return _IMP_kernel._ConstPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
8506 
8507  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
8508  r"""evaluate_indexes_delta(_ConstPairScore 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"""
8509  return _IMP_kernel._ConstPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
8510 
8511  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
8512  r"""evaluate_if_good_indexes(_ConstPairScore 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"""
8513  return _IMP_kernel._ConstPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
8514 
8515  def get_version_info(self):
8516  r"""get_version_info(_ConstPairScore self) -> VersionInfo"""
8517  return _IMP_kernel._ConstPairScore_get_version_info(self)
8518  __swig_destroy__ = _IMP_kernel.delete__ConstPairScore
8519 
8520  def __str__(self):
8521  r"""__str__(_ConstPairScore self) -> std::string"""
8522  return _IMP_kernel._ConstPairScore___str__(self)
8523 
8524  def __repr__(self):
8525  r"""__repr__(_ConstPairScore self) -> std::string"""
8526  return _IMP_kernel._ConstPairScore___repr__(self)
8527 
8528  @staticmethod
8529  def get_from(o):
8530  return _object_cast_to__ConstPairScore(o)
8531 
8532 
8533  def _get_as_binary(self):
8534  r"""_get_as_binary(_ConstPairScore self) -> PyObject *"""
8535  return _IMP_kernel._ConstPairScore__get_as_binary(self)
8536 
8537  def _set_from_binary(self, p):
8538  r"""_set_from_binary(_ConstPairScore self, PyObject * p)"""
8539  return _IMP_kernel._ConstPairScore__set_from_binary(self, p)
8540 
8541  def __getstate__(self):
8542  p = self._get_as_binary()
8543  if len(self.__dict__) > 1:
8544  d = self.__dict__.copy()
8545  del d['this']
8546  p = (d, p)
8547  return p
8548 
8549  def __setstate__(self, p):
8550  if not hasattr(self, 'this'):
8551  self.__init__()
8552  if isinstance(p, tuple):
8553  d, p = p
8554  self.__dict__.update(d)
8555  return self._set_from_binary(p)
8556 
8557 
8558  def _get_jax(self, m, indexes):
8559  value = self.get_value()
8560  # We always return `value` regardless of the JAX Model or indexes
8561  return self._wrap_jax(m, lambda jm: value)
8562 
8563 
8564 # Register _ConstPairScore in _IMP_kernel:
8565 _IMP_kernel._ConstPairScore_swigregister(_ConstPairScore)
8566 class _TrivialDecorator(Decorator):
8567  r"""Proxy of C++ IMP::internal::_TrivialDecorator class."""
8568 
8569  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8570 
8571  def __init__(self, *args):
8572  r"""
8573  __init__(_TrivialDecorator self) -> _TrivialDecorator
8574  __init__(_TrivialDecorator self, Model m, ParticleIndex id) -> _TrivialDecorator
8575  __init__(_TrivialDecorator self, _ParticleAdaptor d) -> _TrivialDecorator
8576  """
8577  _IMP_kernel._TrivialDecorator_swiginit(self, _IMP_kernel.new__TrivialDecorator(*args))
8578 
8579  def show(self, *args):
8580  r"""show(_TrivialDecorator self, _ostream out=std::cout)"""
8581  return _IMP_kernel._TrivialDecorator_show(self, *args)
8582 
8583  @staticmethod
8584  def setup_particle(*args):
8585  r"""
8586  setup_particle(Model m, ParticleIndex pi) -> _TrivialDecorator
8587  setup_particle(_ParticleAdaptor pa) -> _TrivialDecorator
8588  """
8589  return _IMP_kernel._TrivialDecorator_setup_particle(*args)
8590 
8591  @staticmethod
8592  def get_is_setup(*args):
8593  r"""
8594  get_is_setup(_ParticleAdaptor p) -> bool
8595  get_is_setup(Model m, ParticleIndex pi) -> bool
8596  """
8597  return _IMP_kernel._TrivialDecorator_get_is_setup(*args)
8598 
8599  def add_attribute(self, *args):
8600  r"""
8601  add_attribute(_TrivialDecorator self, FloatKey k, IMP::Float v, bool opt)
8602  add_attribute(_TrivialDecorator self, FloatKey a0, IMP::Float a1)
8603  add_attribute(_TrivialDecorator self, IntKey a0, IMP::Int a1)
8604  add_attribute(_TrivialDecorator self, FloatsKey a0, IMP::Floats a1)
8605  add_attribute(_TrivialDecorator self, IntsKey a0, IMP::Ints a1)
8606  add_attribute(_TrivialDecorator self, StringKey a0, IMP::String a1)
8607  add_attribute(_TrivialDecorator self, ParticleIndexKey a0, Particle a1)
8608  add_attribute(_TrivialDecorator self, ObjectKey a0, Object a1)
8609  add_attribute(_TrivialDecorator self, SparseFloatKey a0, IMP::Float a1)
8610  add_attribute(_TrivialDecorator self, SparseIntKey a0, IMP::Int a1)
8611  add_attribute(_TrivialDecorator self, SparseStringKey a0, IMP::String a1)
8612  add_attribute(_TrivialDecorator self, SparseParticleIndexKey a0, ParticleIndex a1)
8613  """
8614  return _IMP_kernel._TrivialDecorator_add_attribute(self, *args)
8615 
8616  def get_value(self, *args):
8617  r"""
8618  get_value(_TrivialDecorator self, FloatKey a0) -> IMP::Float
8619  get_value(_TrivialDecorator self, IntKey a0) -> IMP::Int
8620  get_value(_TrivialDecorator self, FloatsKey a0) -> IMP::Floats
8621  get_value(_TrivialDecorator self, IntsKey a0) -> IMP::Ints
8622  get_value(_TrivialDecorator self, StringKey a0) -> IMP::String
8623  get_value(_TrivialDecorator self, ParticleIndexKey a0) -> Particle
8624  get_value(_TrivialDecorator self, ObjectKey a0) -> Object
8625  get_value(_TrivialDecorator self, SparseFloatKey a0) -> IMP::Float
8626  get_value(_TrivialDecorator self, SparseIntKey a0) -> IMP::Int
8627  get_value(_TrivialDecorator self, SparseStringKey a0) -> IMP::String
8628  get_value(_TrivialDecorator self, SparseParticleIndexKey a0) -> ParticleIndex
8629  """
8630  return _IMP_kernel._TrivialDecorator_get_value(self, *args)
8631 
8632  def set_value(self, *args):
8633  r"""
8634  set_value(_TrivialDecorator self, FloatKey a0, IMP::Float a1)
8635  set_value(_TrivialDecorator self, IntKey a0, IMP::Int a1)
8636  set_value(_TrivialDecorator self, FloatsKey a0, IMP::Floats a1)
8637  set_value(_TrivialDecorator self, IntsKey a0, IMP::Ints a1)
8638  set_value(_TrivialDecorator self, StringKey a0, IMP::String a1)
8639  set_value(_TrivialDecorator self, ParticleIndexKey a0, Particle a1)
8640  set_value(_TrivialDecorator self, ObjectKey a0, Object a1)
8641  set_value(_TrivialDecorator self, SparseFloatKey a0, IMP::Float a1)
8642  set_value(_TrivialDecorator self, SparseIntKey a0, IMP::Int a1)
8643  set_value(_TrivialDecorator self, SparseStringKey a0, IMP::String a1)
8644  set_value(_TrivialDecorator self, SparseParticleIndexKey a0, ParticleIndex a1)
8645  """
8646  return _IMP_kernel._TrivialDecorator_set_value(self, *args)
8647 
8648  def remove_attribute(self, *args):
8649  r"""
8650  remove_attribute(_TrivialDecorator self, FloatKey a0)
8651  remove_attribute(_TrivialDecorator self, IntKey a0)
8652  remove_attribute(_TrivialDecorator self, FloatsKey a0)
8653  remove_attribute(_TrivialDecorator self, IntsKey a0)
8654  remove_attribute(_TrivialDecorator self, StringKey a0)
8655  remove_attribute(_TrivialDecorator self, ParticleIndexKey a0)
8656  remove_attribute(_TrivialDecorator self, ObjectKey a0)
8657  remove_attribute(_TrivialDecorator self, SparseFloatKey a0)
8658  remove_attribute(_TrivialDecorator self, SparseIntKey a0)
8659  remove_attribute(_TrivialDecorator self, SparseStringKey a0)
8660  remove_attribute(_TrivialDecorator self, SparseParticleIndexKey a0)
8661  """
8662  return _IMP_kernel._TrivialDecorator_remove_attribute(self, *args)
8663 
8664  def has_attribute(self, *args):
8665  r"""
8666  has_attribute(_TrivialDecorator self, FloatKey a0) -> bool
8667  has_attribute(_TrivialDecorator self, IntKey a0) -> bool
8668  has_attribute(_TrivialDecorator self, FloatsKey a0) -> bool
8669  has_attribute(_TrivialDecorator self, IntsKey a0) -> bool
8670  has_attribute(_TrivialDecorator self, StringKey a0) -> bool
8671  has_attribute(_TrivialDecorator self, ParticleIndexKey a0) -> bool
8672  has_attribute(_TrivialDecorator self, ObjectKey a0) -> bool
8673  has_attribute(_TrivialDecorator self, SparseFloatKey a0) -> bool
8674  has_attribute(_TrivialDecorator self, SparseIntKey a0) -> bool
8675  has_attribute(_TrivialDecorator self, SparseStringKey a0) -> bool
8676  has_attribute(_TrivialDecorator self, SparseParticleIndexKey a0) -> bool
8677  """
8678  return _IMP_kernel._TrivialDecorator_has_attribute(self, *args)
8679 
8680  def get_derivative(self, a0):
8681  r"""get_derivative(_TrivialDecorator self, FloatKey a0) -> double"""
8682  return _IMP_kernel._TrivialDecorator_get_derivative(self, a0)
8683 
8684  def get_name(self):
8685  r"""get_name(_TrivialDecorator self) -> std::string"""
8686  return _IMP_kernel._TrivialDecorator_get_name(self)
8687 
8688  def clear_caches(self):
8689  r"""clear_caches(_TrivialDecorator self)"""
8690  return _IMP_kernel._TrivialDecorator_clear_caches(self)
8691 
8692  def set_name(self, a0):
8693  r"""set_name(_TrivialDecorator self, std::string a0)"""
8694  return _IMP_kernel._TrivialDecorator_set_name(self, a0)
8695 
8696  def set_check_level(self, a0):
8697  r"""set_check_level(_TrivialDecorator self, IMP::CheckLevel a0)"""
8698  return _IMP_kernel._TrivialDecorator_set_check_level(self, a0)
8699 
8700  def add_to_derivative(self, a0, a1, a2):
8701  r"""add_to_derivative(_TrivialDecorator self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
8702  return _IMP_kernel._TrivialDecorator_add_to_derivative(self, a0, a1, a2)
8703 
8704  def set_is_optimized(self, a0, a1):
8705  r"""set_is_optimized(_TrivialDecorator self, FloatKey a0, bool a1)"""
8706  return _IMP_kernel._TrivialDecorator_set_is_optimized(self, a0, a1)
8707 
8708  def get_is_optimized(self, a0):
8709  r"""get_is_optimized(_TrivialDecorator self, FloatKey a0) -> bool"""
8710  return _IMP_kernel._TrivialDecorator_get_is_optimized(self, a0)
8711 
8712  def get_check_level(self):
8713  r"""get_check_level(_TrivialDecorator self) -> IMP::CheckLevel"""
8714  return _IMP_kernel._TrivialDecorator_get_check_level(self)
8715 
8716  def __eq__(self, *args):
8717  r"""
8718  __eq__(_TrivialDecorator self, _TrivialDecorator o) -> bool
8719  __eq__(_TrivialDecorator self, Particle d) -> bool
8720  """
8721  return _IMP_kernel._TrivialDecorator___eq__(self, *args)
8722 
8723  def __ne__(self, *args):
8724  r"""
8725  __ne__(_TrivialDecorator self, _TrivialDecorator o) -> bool
8726  __ne__(_TrivialDecorator self, Particle d) -> bool
8727  """
8728  return _IMP_kernel._TrivialDecorator___ne__(self, *args)
8729 
8730  def __le__(self, *args):
8731  r"""
8732  __le__(_TrivialDecorator self, _TrivialDecorator o) -> bool
8733  __le__(_TrivialDecorator self, Particle d) -> bool
8734  """
8735  return _IMP_kernel._TrivialDecorator___le__(self, *args)
8736 
8737  def __lt__(self, *args):
8738  r"""
8739  __lt__(_TrivialDecorator self, _TrivialDecorator o) -> bool
8740  __lt__(_TrivialDecorator self, Particle d) -> bool
8741  """
8742  return _IMP_kernel._TrivialDecorator___lt__(self, *args)
8743 
8744  def __ge__(self, *args):
8745  r"""
8746  __ge__(_TrivialDecorator self, _TrivialDecorator o) -> bool
8747  __ge__(_TrivialDecorator self, Particle d) -> bool
8748  """
8749  return _IMP_kernel._TrivialDecorator___ge__(self, *args)
8750 
8751  def __gt__(self, *args):
8752  r"""
8753  __gt__(_TrivialDecorator self, _TrivialDecorator o) -> bool
8754  __gt__(_TrivialDecorator self, Particle d) -> bool
8755  """
8756  return _IMP_kernel._TrivialDecorator___gt__(self, *args)
8757 
8758  def __hash__(self):
8759  r"""__hash__(_TrivialDecorator self) -> std::size_t"""
8760  return _IMP_kernel._TrivialDecorator___hash__(self)
8761 
8762  def __str__(self):
8763  r"""__str__(_TrivialDecorator self) -> std::string"""
8764  return _IMP_kernel._TrivialDecorator___str__(self)
8765 
8766  def __repr__(self):
8767  r"""__repr__(_TrivialDecorator self) -> std::string"""
8768  return _IMP_kernel._TrivialDecorator___repr__(self)
8769 
8770  def _get_as_binary(self):
8771  r"""_get_as_binary(_TrivialDecorator self) -> PyObject *"""
8772  return _IMP_kernel._TrivialDecorator__get_as_binary(self)
8773 
8774  def _set_from_binary(self, p):
8775  r"""_set_from_binary(_TrivialDecorator self, PyObject * p)"""
8776  return _IMP_kernel._TrivialDecorator__set_from_binary(self, p)
8777 
8778  def __getstate__(self):
8779  p = self._get_as_binary()
8780  if len(self.__dict__) > 1:
8781  d = self.__dict__.copy()
8782  del d['this']
8783  p = (d, p)
8784  return p
8785 
8786  def __setstate__(self, p):
8787  if not hasattr(self, 'this'):
8788  self.__init__()
8789  if isinstance(p, tuple):
8790  d, p = p
8791  self.__dict__.update(d)
8792  return self._set_from_binary(p)
8793 
8794  __swig_destroy__ = _IMP_kernel.delete__TrivialDecorator
8795 
8796 # Register _TrivialDecorator in _IMP_kernel:
8797 _IMP_kernel._TrivialDecorator_swigregister(_TrivialDecorator)
8798 class _TrivialDerivedDecorator(_TrivialDecorator):
8799  r"""Proxy of C++ IMP::internal::_TrivialDerivedDecorator class."""
8800 
8801  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
8802 
8803  def __init__(self, *args):
8804  r"""
8805  __init__(_TrivialDerivedDecorator self) -> _TrivialDerivedDecorator
8806  __init__(_TrivialDerivedDecorator self, Model m, ParticleIndex id) -> _TrivialDerivedDecorator
8807  __init__(_TrivialDerivedDecorator self, _ParticleAdaptor d) -> _TrivialDerivedDecorator
8808  """
8809  _IMP_kernel._TrivialDerivedDecorator_swiginit(self, _IMP_kernel.new__TrivialDerivedDecorator(*args))
8810 
8811  def show(self, *args):
8812  r"""show(_TrivialDerivedDecorator self, _ostream out=std::cout)"""
8813  return _IMP_kernel._TrivialDerivedDecorator_show(self, *args)
8814 
8815  @staticmethod
8816  def setup_particle(*args):
8817  r"""
8818  setup_particle(Model m, ParticleIndex pi) -> _TrivialDerivedDecorator
8819  setup_particle(_ParticleAdaptor pa) -> _TrivialDerivedDecorator
8820  """
8821  return _IMP_kernel._TrivialDerivedDecorator_setup_particle(*args)
8822 
8823  @staticmethod
8824  def get_is_setup(*args):
8825  r"""
8826  get_is_setup(_ParticleAdaptor p) -> bool
8827  get_is_setup(Model m, ParticleIndex pi) -> bool
8828  """
8829  return _IMP_kernel._TrivialDerivedDecorator_get_is_setup(*args)
8830 
8831  def add_attribute(self, *args):
8832  r"""
8833  add_attribute(_TrivialDerivedDecorator self, FloatKey k, IMP::Float v, bool opt)
8834  add_attribute(_TrivialDerivedDecorator self, FloatKey a0, IMP::Float a1)
8835  add_attribute(_TrivialDerivedDecorator self, IntKey a0, IMP::Int a1)
8836  add_attribute(_TrivialDerivedDecorator self, FloatsKey a0, IMP::Floats a1)
8837  add_attribute(_TrivialDerivedDecorator self, IntsKey a0, IMP::Ints a1)
8838  add_attribute(_TrivialDerivedDecorator self, StringKey a0, IMP::String a1)
8839  add_attribute(_TrivialDerivedDecorator self, ParticleIndexKey a0, Particle a1)
8840  add_attribute(_TrivialDerivedDecorator self, ObjectKey a0, Object a1)
8841  add_attribute(_TrivialDerivedDecorator self, SparseFloatKey a0, IMP::Float a1)
8842  add_attribute(_TrivialDerivedDecorator self, SparseIntKey a0, IMP::Int a1)
8843  add_attribute(_TrivialDerivedDecorator self, SparseStringKey a0, IMP::String a1)
8844  add_attribute(_TrivialDerivedDecorator self, SparseParticleIndexKey a0, ParticleIndex a1)
8845  """
8846  return _IMP_kernel._TrivialDerivedDecorator_add_attribute(self, *args)
8847 
8848  def get_value(self, *args):
8849  r"""
8850  get_value(_TrivialDerivedDecorator self, FloatKey a0) -> IMP::Float
8851  get_value(_TrivialDerivedDecorator self, IntKey a0) -> IMP::Int
8852  get_value(_TrivialDerivedDecorator self, FloatsKey a0) -> IMP::Floats
8853  get_value(_TrivialDerivedDecorator self, IntsKey a0) -> IMP::Ints
8854  get_value(_TrivialDerivedDecorator self, StringKey a0) -> IMP::String
8855  get_value(_TrivialDerivedDecorator self, ParticleIndexKey a0) -> Particle
8856  get_value(_TrivialDerivedDecorator self, ObjectKey a0) -> Object
8857  get_value(_TrivialDerivedDecorator self, SparseFloatKey a0) -> IMP::Float
8858  get_value(_TrivialDerivedDecorator self, SparseIntKey a0) -> IMP::Int
8859  get_value(_TrivialDerivedDecorator self, SparseStringKey a0) -> IMP::String
8860  get_value(_TrivialDerivedDecorator self, SparseParticleIndexKey a0) -> ParticleIndex
8861  """
8862  return _IMP_kernel._TrivialDerivedDecorator_get_value(self, *args)
8863 
8864  def set_value(self, *args):
8865  r"""
8866  set_value(_TrivialDerivedDecorator self, FloatKey a0, IMP::Float a1)
8867  set_value(_TrivialDerivedDecorator self, IntKey a0, IMP::Int a1)
8868  set_value(_TrivialDerivedDecorator self, FloatsKey a0, IMP::Floats a1)
8869  set_value(_TrivialDerivedDecorator self, IntsKey a0, IMP::Ints a1)
8870  set_value(_TrivialDerivedDecorator self, StringKey a0, IMP::String a1)
8871  set_value(_TrivialDerivedDecorator self, ParticleIndexKey a0, Particle a1)
8872  set_value(_TrivialDerivedDecorator self, ObjectKey a0, Object a1)
8873  set_value(_TrivialDerivedDecorator self, SparseFloatKey a0, IMP::Float a1)
8874  set_value(_TrivialDerivedDecorator self, SparseIntKey a0, IMP::Int a1)
8875  set_value(_TrivialDerivedDecorator self, SparseStringKey a0, IMP::String a1)
8876  set_value(_TrivialDerivedDecorator self, SparseParticleIndexKey a0, ParticleIndex a1)
8877  """
8878  return _IMP_kernel._TrivialDerivedDecorator_set_value(self, *args)
8879 
8880  def remove_attribute(self, *args):
8881  r"""
8882  remove_attribute(_TrivialDerivedDecorator self, FloatKey a0)
8883  remove_attribute(_TrivialDerivedDecorator self, IntKey a0)
8884  remove_attribute(_TrivialDerivedDecorator self, FloatsKey a0)
8885  remove_attribute(_TrivialDerivedDecorator self, IntsKey a0)
8886  remove_attribute(_TrivialDerivedDecorator self, StringKey a0)
8887  remove_attribute(_TrivialDerivedDecorator self, ParticleIndexKey a0)
8888  remove_attribute(_TrivialDerivedDecorator self, ObjectKey a0)
8889  remove_attribute(_TrivialDerivedDecorator self, SparseFloatKey a0)
8890  remove_attribute(_TrivialDerivedDecorator self, SparseIntKey a0)
8891  remove_attribute(_TrivialDerivedDecorator self, SparseStringKey a0)
8892  remove_attribute(_TrivialDerivedDecorator self, SparseParticleIndexKey a0)
8893  """
8894  return _IMP_kernel._TrivialDerivedDecorator_remove_attribute(self, *args)
8895 
8896  def has_attribute(self, *args):
8897  r"""
8898  has_attribute(_TrivialDerivedDecorator self, FloatKey a0) -> bool
8899  has_attribute(_TrivialDerivedDecorator self, IntKey a0) -> bool
8900  has_attribute(_TrivialDerivedDecorator self, FloatsKey a0) -> bool
8901  has_attribute(_TrivialDerivedDecorator self, IntsKey a0) -> bool
8902  has_attribute(_TrivialDerivedDecorator self, StringKey a0) -> bool
8903  has_attribute(_TrivialDerivedDecorator self, ParticleIndexKey a0) -> bool
8904  has_attribute(_TrivialDerivedDecorator self, ObjectKey a0) -> bool
8905  has_attribute(_TrivialDerivedDecorator self, SparseFloatKey a0) -> bool
8906  has_attribute(_TrivialDerivedDecorator self, SparseIntKey a0) -> bool
8907  has_attribute(_TrivialDerivedDecorator self, SparseStringKey a0) -> bool
8908  has_attribute(_TrivialDerivedDecorator self, SparseParticleIndexKey a0) -> bool
8909  """
8910  return _IMP_kernel._TrivialDerivedDecorator_has_attribute(self, *args)
8911 
8912  def get_derivative(self, a0):
8913  r"""get_derivative(_TrivialDerivedDecorator self, FloatKey a0) -> double"""
8914  return _IMP_kernel._TrivialDerivedDecorator_get_derivative(self, a0)
8915 
8916  def get_name(self):
8917  r"""get_name(_TrivialDerivedDecorator self) -> std::string"""
8918  return _IMP_kernel._TrivialDerivedDecorator_get_name(self)
8919 
8920  def clear_caches(self):
8921  r"""clear_caches(_TrivialDerivedDecorator self)"""
8922  return _IMP_kernel._TrivialDerivedDecorator_clear_caches(self)
8923 
8924  def set_name(self, a0):
8925  r"""set_name(_TrivialDerivedDecorator self, std::string a0)"""
8926  return _IMP_kernel._TrivialDerivedDecorator_set_name(self, a0)
8927 
8928  def set_check_level(self, a0):
8929  r"""set_check_level(_TrivialDerivedDecorator self, IMP::CheckLevel a0)"""
8930  return _IMP_kernel._TrivialDerivedDecorator_set_check_level(self, a0)
8931 
8932  def add_to_derivative(self, a0, a1, a2):
8933  r"""add_to_derivative(_TrivialDerivedDecorator self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
8934  return _IMP_kernel._TrivialDerivedDecorator_add_to_derivative(self, a0, a1, a2)
8935 
8936  def set_is_optimized(self, a0, a1):
8937  r"""set_is_optimized(_TrivialDerivedDecorator self, FloatKey a0, bool a1)"""
8938  return _IMP_kernel._TrivialDerivedDecorator_set_is_optimized(self, a0, a1)
8939 
8940  def get_is_optimized(self, a0):
8941  r"""get_is_optimized(_TrivialDerivedDecorator self, FloatKey a0) -> bool"""
8942  return _IMP_kernel._TrivialDerivedDecorator_get_is_optimized(self, a0)
8943 
8944  def get_check_level(self):
8945  r"""get_check_level(_TrivialDerivedDecorator self) -> IMP::CheckLevel"""
8946  return _IMP_kernel._TrivialDerivedDecorator_get_check_level(self)
8947 
8948  def __eq__(self, *args):
8949  r"""
8950  __eq__(_TrivialDerivedDecorator self, _TrivialDerivedDecorator o) -> bool
8951  __eq__(_TrivialDerivedDecorator self, Particle d) -> bool
8952  """
8953  return _IMP_kernel._TrivialDerivedDecorator___eq__(self, *args)
8954 
8955  def __ne__(self, *args):
8956  r"""
8957  __ne__(_TrivialDerivedDecorator self, _TrivialDerivedDecorator o) -> bool
8958  __ne__(_TrivialDerivedDecorator self, Particle d) -> bool
8959  """
8960  return _IMP_kernel._TrivialDerivedDecorator___ne__(self, *args)
8961 
8962  def __le__(self, *args):
8963  r"""
8964  __le__(_TrivialDerivedDecorator self, _TrivialDerivedDecorator o) -> bool
8965  __le__(_TrivialDerivedDecorator self, Particle d) -> bool
8966  """
8967  return _IMP_kernel._TrivialDerivedDecorator___le__(self, *args)
8968 
8969  def __lt__(self, *args):
8970  r"""
8971  __lt__(_TrivialDerivedDecorator self, _TrivialDerivedDecorator o) -> bool
8972  __lt__(_TrivialDerivedDecorator self, Particle d) -> bool
8973  """
8974  return _IMP_kernel._TrivialDerivedDecorator___lt__(self, *args)
8975 
8976  def __ge__(self, *args):
8977  r"""
8978  __ge__(_TrivialDerivedDecorator self, _TrivialDerivedDecorator o) -> bool
8979  __ge__(_TrivialDerivedDecorator self, Particle d) -> bool
8980  """
8981  return _IMP_kernel._TrivialDerivedDecorator___ge__(self, *args)
8982 
8983  def __gt__(self, *args):
8984  r"""
8985  __gt__(_TrivialDerivedDecorator self, _TrivialDerivedDecorator o) -> bool
8986  __gt__(_TrivialDerivedDecorator self, Particle d) -> bool
8987  """
8988  return _IMP_kernel._TrivialDerivedDecorator___gt__(self, *args)
8989 
8990  def __hash__(self):
8991  r"""__hash__(_TrivialDerivedDecorator self) -> std::size_t"""
8992  return _IMP_kernel._TrivialDerivedDecorator___hash__(self)
8993 
8994  def __str__(self):
8995  r"""__str__(_TrivialDerivedDecorator self) -> std::string"""
8996  return _IMP_kernel._TrivialDerivedDecorator___str__(self)
8997 
8998  def __repr__(self):
8999  r"""__repr__(_TrivialDerivedDecorator self) -> std::string"""
9000  return _IMP_kernel._TrivialDerivedDecorator___repr__(self)
9001 
9002  def _get_as_binary(self):
9003  r"""_get_as_binary(_TrivialDerivedDecorator self) -> PyObject *"""
9004  return _IMP_kernel._TrivialDerivedDecorator__get_as_binary(self)
9005 
9006  def _set_from_binary(self, p):
9007  r"""_set_from_binary(_TrivialDerivedDecorator self, PyObject * p)"""
9008  return _IMP_kernel._TrivialDerivedDecorator__set_from_binary(self, p)
9009 
9010  def __getstate__(self):
9011  p = self._get_as_binary()
9012  if len(self.__dict__) > 1:
9013  d = self.__dict__.copy()
9014  del d['this']
9015  p = (d, p)
9016  return p
9017 
9018  def __setstate__(self, p):
9019  if not hasattr(self, 'this'):
9020  self.__init__()
9021  if isinstance(p, tuple):
9022  d, p = p
9023  self.__dict__.update(d)
9024  return self._set_from_binary(p)
9025 
9026  __swig_destroy__ = _IMP_kernel.delete__TrivialDerivedDecorator
9027 
9028 # Register _TrivialDerivedDecorator in _IMP_kernel:
9029 _IMP_kernel._TrivialDerivedDecorator_swigregister(_TrivialDerivedDecorator)
9030 class _TrivialTraitsDecorator(Decorator):
9031  r"""Proxy of C++ IMP::internal::_TrivialTraitsDecorator class."""
9032 
9033  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9034 
9035  def get_decorator_traits(self):
9036  r"""get_decorator_traits(_TrivialTraitsDecorator self) -> StringKey"""
9037  return _IMP_kernel._TrivialTraitsDecorator_get_decorator_traits(self)
9038 
9039  @staticmethod
9040  def get_default_decorator_traits():
9041  r"""get_default_decorator_traits() -> StringKey"""
9042  return _IMP_kernel._TrivialTraitsDecorator_get_default_decorator_traits()
9043 
9044  def __init__(self, *args):
9045  r"""
9046  __init__(_TrivialTraitsDecorator self) -> _TrivialTraitsDecorator
9047  __init__(_TrivialTraitsDecorator self, Model m, ParticleIndex id, StringKey tr=get_default_key()) -> _TrivialTraitsDecorator
9048  __init__(_TrivialTraitsDecorator self, _ParticleAdaptor d, StringKey tr=get_default_key()) -> _TrivialTraitsDecorator
9049  """
9050  _IMP_kernel._TrivialTraitsDecorator_swiginit(self, _IMP_kernel.new__TrivialTraitsDecorator(*args))
9051 
9052  def show(self, *args):
9053  r"""show(_TrivialTraitsDecorator self, _ostream out=std::cout)"""
9054  return _IMP_kernel._TrivialTraitsDecorator_show(self, *args)
9055 
9056  @staticmethod
9057  def setup_particle(*args):
9058  r"""
9059  setup_particle(Model m, ParticleIndex pi, StringKey tr=IMP::internal::_TrivialTraitsDecorator::get_default_decorator_traits()) -> _TrivialTraitsDecorator
9060  setup_particle(_ParticleAdaptor d, StringKey tr=IMP::internal::_TrivialTraitsDecorator::get_default_decorator_traits()) -> _TrivialTraitsDecorator
9061  """
9062  return _IMP_kernel._TrivialTraitsDecorator_setup_particle(*args)
9063 
9064  @staticmethod
9065  def get_is_setup(*args):
9066  r"""
9067  get_is_setup(_ParticleAdaptor p, StringKey tr=get_default_key()) -> bool
9068  get_is_setup(Model m, ParticleIndex pi, StringKey k=get_default_key()) -> bool
9069  """
9070  return _IMP_kernel._TrivialTraitsDecorator_get_is_setup(*args)
9071 
9072  @staticmethod
9073  def get_default_key():
9074  r"""get_default_key() -> StringKey"""
9075  return _IMP_kernel._TrivialTraitsDecorator_get_default_key()
9076 
9077  def add_attribute(self, *args):
9078  r"""
9079  add_attribute(_TrivialTraitsDecorator self, FloatKey k, IMP::Float v, bool opt)
9080  add_attribute(_TrivialTraitsDecorator self, FloatKey a0, IMP::Float a1)
9081  add_attribute(_TrivialTraitsDecorator self, IntKey a0, IMP::Int a1)
9082  add_attribute(_TrivialTraitsDecorator self, FloatsKey a0, IMP::Floats a1)
9083  add_attribute(_TrivialTraitsDecorator self, IntsKey a0, IMP::Ints a1)
9084  add_attribute(_TrivialTraitsDecorator self, StringKey a0, IMP::String a1)
9085  add_attribute(_TrivialTraitsDecorator self, ParticleIndexKey a0, Particle a1)
9086  add_attribute(_TrivialTraitsDecorator self, ObjectKey a0, Object a1)
9087  add_attribute(_TrivialTraitsDecorator self, SparseFloatKey a0, IMP::Float a1)
9088  add_attribute(_TrivialTraitsDecorator self, SparseIntKey a0, IMP::Int a1)
9089  add_attribute(_TrivialTraitsDecorator self, SparseStringKey a0, IMP::String a1)
9090  add_attribute(_TrivialTraitsDecorator self, SparseParticleIndexKey a0, ParticleIndex a1)
9091  """
9092  return _IMP_kernel._TrivialTraitsDecorator_add_attribute(self, *args)
9093 
9094  def get_value(self, *args):
9095  r"""
9096  get_value(_TrivialTraitsDecorator self, FloatKey a0) -> IMP::Float
9097  get_value(_TrivialTraitsDecorator self, IntKey a0) -> IMP::Int
9098  get_value(_TrivialTraitsDecorator self, FloatsKey a0) -> IMP::Floats
9099  get_value(_TrivialTraitsDecorator self, IntsKey a0) -> IMP::Ints
9100  get_value(_TrivialTraitsDecorator self, StringKey a0) -> IMP::String
9101  get_value(_TrivialTraitsDecorator self, ParticleIndexKey a0) -> Particle
9102  get_value(_TrivialTraitsDecorator self, ObjectKey a0) -> Object
9103  get_value(_TrivialTraitsDecorator self, SparseFloatKey a0) -> IMP::Float
9104  get_value(_TrivialTraitsDecorator self, SparseIntKey a0) -> IMP::Int
9105  get_value(_TrivialTraitsDecorator self, SparseStringKey a0) -> IMP::String
9106  get_value(_TrivialTraitsDecorator self, SparseParticleIndexKey a0) -> ParticleIndex
9107  """
9108  return _IMP_kernel._TrivialTraitsDecorator_get_value(self, *args)
9109 
9110  def set_value(self, *args):
9111  r"""
9112  set_value(_TrivialTraitsDecorator self, FloatKey a0, IMP::Float a1)
9113  set_value(_TrivialTraitsDecorator self, IntKey a0, IMP::Int a1)
9114  set_value(_TrivialTraitsDecorator self, FloatsKey a0, IMP::Floats a1)
9115  set_value(_TrivialTraitsDecorator self, IntsKey a0, IMP::Ints a1)
9116  set_value(_TrivialTraitsDecorator self, StringKey a0, IMP::String a1)
9117  set_value(_TrivialTraitsDecorator self, ParticleIndexKey a0, Particle a1)
9118  set_value(_TrivialTraitsDecorator self, ObjectKey a0, Object a1)
9119  set_value(_TrivialTraitsDecorator self, SparseFloatKey a0, IMP::Float a1)
9120  set_value(_TrivialTraitsDecorator self, SparseIntKey a0, IMP::Int a1)
9121  set_value(_TrivialTraitsDecorator self, SparseStringKey a0, IMP::String a1)
9122  set_value(_TrivialTraitsDecorator self, SparseParticleIndexKey a0, ParticleIndex a1)
9123  """
9124  return _IMP_kernel._TrivialTraitsDecorator_set_value(self, *args)
9125 
9126  def remove_attribute(self, *args):
9127  r"""
9128  remove_attribute(_TrivialTraitsDecorator self, FloatKey a0)
9129  remove_attribute(_TrivialTraitsDecorator self, IntKey a0)
9130  remove_attribute(_TrivialTraitsDecorator self, FloatsKey a0)
9131  remove_attribute(_TrivialTraitsDecorator self, IntsKey a0)
9132  remove_attribute(_TrivialTraitsDecorator self, StringKey a0)
9133  remove_attribute(_TrivialTraitsDecorator self, ParticleIndexKey a0)
9134  remove_attribute(_TrivialTraitsDecorator self, ObjectKey a0)
9135  remove_attribute(_TrivialTraitsDecorator self, SparseFloatKey a0)
9136  remove_attribute(_TrivialTraitsDecorator self, SparseIntKey a0)
9137  remove_attribute(_TrivialTraitsDecorator self, SparseStringKey a0)
9138  remove_attribute(_TrivialTraitsDecorator self, SparseParticleIndexKey a0)
9139  """
9140  return _IMP_kernel._TrivialTraitsDecorator_remove_attribute(self, *args)
9141 
9142  def has_attribute(self, *args):
9143  r"""
9144  has_attribute(_TrivialTraitsDecorator self, FloatKey a0) -> bool
9145  has_attribute(_TrivialTraitsDecorator self, IntKey a0) -> bool
9146  has_attribute(_TrivialTraitsDecorator self, FloatsKey a0) -> bool
9147  has_attribute(_TrivialTraitsDecorator self, IntsKey a0) -> bool
9148  has_attribute(_TrivialTraitsDecorator self, StringKey a0) -> bool
9149  has_attribute(_TrivialTraitsDecorator self, ParticleIndexKey a0) -> bool
9150  has_attribute(_TrivialTraitsDecorator self, ObjectKey a0) -> bool
9151  has_attribute(_TrivialTraitsDecorator self, SparseFloatKey a0) -> bool
9152  has_attribute(_TrivialTraitsDecorator self, SparseIntKey a0) -> bool
9153  has_attribute(_TrivialTraitsDecorator self, SparseStringKey a0) -> bool
9154  has_attribute(_TrivialTraitsDecorator self, SparseParticleIndexKey a0) -> bool
9155  """
9156  return _IMP_kernel._TrivialTraitsDecorator_has_attribute(self, *args)
9157 
9158  def get_derivative(self, a0):
9159  r"""get_derivative(_TrivialTraitsDecorator self, FloatKey a0) -> double"""
9160  return _IMP_kernel._TrivialTraitsDecorator_get_derivative(self, a0)
9161 
9162  def get_name(self):
9163  r"""get_name(_TrivialTraitsDecorator self) -> std::string"""
9164  return _IMP_kernel._TrivialTraitsDecorator_get_name(self)
9165 
9166  def clear_caches(self):
9167  r"""clear_caches(_TrivialTraitsDecorator self)"""
9168  return _IMP_kernel._TrivialTraitsDecorator_clear_caches(self)
9169 
9170  def set_name(self, a0):
9171  r"""set_name(_TrivialTraitsDecorator self, std::string a0)"""
9172  return _IMP_kernel._TrivialTraitsDecorator_set_name(self, a0)
9173 
9174  def set_check_level(self, a0):
9175  r"""set_check_level(_TrivialTraitsDecorator self, IMP::CheckLevel a0)"""
9176  return _IMP_kernel._TrivialTraitsDecorator_set_check_level(self, a0)
9177 
9178  def add_to_derivative(self, a0, a1, a2):
9179  r"""add_to_derivative(_TrivialTraitsDecorator self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
9180  return _IMP_kernel._TrivialTraitsDecorator_add_to_derivative(self, a0, a1, a2)
9181 
9182  def set_is_optimized(self, a0, a1):
9183  r"""set_is_optimized(_TrivialTraitsDecorator self, FloatKey a0, bool a1)"""
9184  return _IMP_kernel._TrivialTraitsDecorator_set_is_optimized(self, a0, a1)
9185 
9186  def get_is_optimized(self, a0):
9187  r"""get_is_optimized(_TrivialTraitsDecorator self, FloatKey a0) -> bool"""
9188  return _IMP_kernel._TrivialTraitsDecorator_get_is_optimized(self, a0)
9189 
9190  def get_check_level(self):
9191  r"""get_check_level(_TrivialTraitsDecorator self) -> IMP::CheckLevel"""
9192  return _IMP_kernel._TrivialTraitsDecorator_get_check_level(self)
9193 
9194  def __eq__(self, *args):
9195  r"""
9196  __eq__(_TrivialTraitsDecorator self, _TrivialTraitsDecorator o) -> bool
9197  __eq__(_TrivialTraitsDecorator self, Particle d) -> bool
9198  """
9199  return _IMP_kernel._TrivialTraitsDecorator___eq__(self, *args)
9200 
9201  def __ne__(self, *args):
9202  r"""
9203  __ne__(_TrivialTraitsDecorator self, _TrivialTraitsDecorator o) -> bool
9204  __ne__(_TrivialTraitsDecorator self, Particle d) -> bool
9205  """
9206  return _IMP_kernel._TrivialTraitsDecorator___ne__(self, *args)
9207 
9208  def __le__(self, *args):
9209  r"""
9210  __le__(_TrivialTraitsDecorator self, _TrivialTraitsDecorator o) -> bool
9211  __le__(_TrivialTraitsDecorator self, Particle d) -> bool
9212  """
9213  return _IMP_kernel._TrivialTraitsDecorator___le__(self, *args)
9214 
9215  def __lt__(self, *args):
9216  r"""
9217  __lt__(_TrivialTraitsDecorator self, _TrivialTraitsDecorator o) -> bool
9218  __lt__(_TrivialTraitsDecorator self, Particle d) -> bool
9219  """
9220  return _IMP_kernel._TrivialTraitsDecorator___lt__(self, *args)
9221 
9222  def __ge__(self, *args):
9223  r"""
9224  __ge__(_TrivialTraitsDecorator self, _TrivialTraitsDecorator o) -> bool
9225  __ge__(_TrivialTraitsDecorator self, Particle d) -> bool
9226  """
9227  return _IMP_kernel._TrivialTraitsDecorator___ge__(self, *args)
9228 
9229  def __gt__(self, *args):
9230  r"""
9231  __gt__(_TrivialTraitsDecorator self, _TrivialTraitsDecorator o) -> bool
9232  __gt__(_TrivialTraitsDecorator self, Particle d) -> bool
9233  """
9234  return _IMP_kernel._TrivialTraitsDecorator___gt__(self, *args)
9235 
9236  def __hash__(self):
9237  r"""__hash__(_TrivialTraitsDecorator self) -> std::size_t"""
9238  return _IMP_kernel._TrivialTraitsDecorator___hash__(self)
9239 
9240  def __str__(self):
9241  r"""__str__(_TrivialTraitsDecorator self) -> std::string"""
9242  return _IMP_kernel._TrivialTraitsDecorator___str__(self)
9243 
9244  def __repr__(self):
9245  r"""__repr__(_TrivialTraitsDecorator self) -> std::string"""
9246  return _IMP_kernel._TrivialTraitsDecorator___repr__(self)
9247  __swig_destroy__ = _IMP_kernel.delete__TrivialTraitsDecorator
9248 
9249 # Register _TrivialTraitsDecorator in _IMP_kernel:
9250 _IMP_kernel._TrivialTraitsDecorator_swigregister(_TrivialTraitsDecorator)
9251 
9252 def __lshift__(*args):
9253  r"""
9254  __lshift__(_ostream out, _TrivialDecorator n) -> _ostream
9255  __lshift__(_ostream out, _TrivialDerivedDecorator n) -> _ostream
9256  __lshift__(_ostream out, _TrivialTraitsDecorator n) -> _ostream
9257  """
9258  return _IMP_kernel.__lshift__(*args)
9259 class _ConstOptimizer(Optimizer):
9260  r"""Proxy of C++ IMP::internal::_ConstOptimizer class."""
9261 
9262  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9263 
9264  def __init__(self, *args):
9265  r"""
9266  __init__(_ConstOptimizer self, Model m) -> _ConstOptimizer
9267  __init__(_ConstOptimizer self) -> _ConstOptimizer
9268  """
9269  _IMP_kernel._ConstOptimizer_swiginit(self, _IMP_kernel.new__ConstOptimizer(*args))
9270 
9271  def do_optimize(self, max_steps):
9272  r"""do_optimize(_ConstOptimizer self, unsigned int max_steps) -> IMP::Float"""
9273  return _IMP_kernel._ConstOptimizer_do_optimize(self, max_steps)
9274 
9275  def get_version_info(self):
9276  r"""get_version_info(_ConstOptimizer self) -> VersionInfo"""
9277  return _IMP_kernel._ConstOptimizer_get_version_info(self)
9278  __swig_destroy__ = _IMP_kernel.delete__ConstOptimizer
9279 
9280  def __str__(self):
9281  r"""__str__(_ConstOptimizer self) -> std::string"""
9282  return _IMP_kernel._ConstOptimizer___str__(self)
9283 
9284  def __repr__(self):
9285  r"""__repr__(_ConstOptimizer self) -> std::string"""
9286  return _IMP_kernel._ConstOptimizer___repr__(self)
9287 
9288  @staticmethod
9289  def get_from(o):
9290  return _object_cast_to__ConstOptimizer(o)
9291 
9292 
9293  def _get_as_binary(self):
9294  r"""_get_as_binary(_ConstOptimizer self) -> PyObject *"""
9295  return _IMP_kernel._ConstOptimizer__get_as_binary(self)
9296 
9297  def _set_from_binary(self, p):
9298  r"""_set_from_binary(_ConstOptimizer self, PyObject * p)"""
9299  return _IMP_kernel._ConstOptimizer__set_from_binary(self, p)
9300 
9301  def __getstate__(self):
9302  p = self._get_as_binary()
9303  if len(self.__dict__) > 1:
9304  d = self.__dict__.copy()
9305  del d['this']
9306  p = (d, p)
9307  return p
9308 
9309  def __setstate__(self, p):
9310  if not hasattr(self, 'this'):
9311  self.__init__()
9312  if isinstance(p, tuple):
9313  d, p = p
9314  self.__dict__.update(d)
9315  return self._set_from_binary(p)
9316 
9317 
9318 # Register _ConstOptimizer in _IMP_kernel:
9319 _IMP_kernel._ConstOptimizer_swigregister(_ConstOptimizer)
9320 
9321 def get_particle(p):
9322  r"""get_particle(Particle p) -> Particle"""
9323  return _IMP_kernel.get_particle(p)
9324 
9325 def _decorator_test(p):
9326  r"""_decorator_test(Particle p)"""
9327  return _IMP_kernel._decorator_test(p)
9328 
9329 def _overloaded_decorator(*args):
9330  r"""
9331  _overloaded_decorator(_TrivialDecorator a) -> int
9332  _overloaded_decorator(_TrivialDerivedDecorator a) -> int
9333  """
9334  return _IMP_kernel._overloaded_decorator(*args)
9335 
9336 def _take_particles(*args):
9337  r"""
9338  _take_particles(IMP::Particles const & ps) -> unsigned int
9339  _take_particles(Model m, IMP::Particles const & ps) -> unsigned int
9340  _take_particles(Model m, IMP::Particles const & ps, TextOutput out) -> unsigned int
9341  """
9342  return _IMP_kernel._take_particles(*args)
9343 
9344 def _give_particles(m):
9345  r"""_give_particles(Model m) -> IMP::Particles const &"""
9346  return _IMP_kernel._give_particles(m)
9347 
9348 def _pass_particles(ps):
9349  r"""_pass_particles(IMP::Particles const & ps) -> IMP::Particles const &"""
9350  return _IMP_kernel._pass_particles(ps)
9351 
9352 def _pass_particle(ps):
9353  r"""_pass_particle(Particle ps) -> Particle"""
9354  return _IMP_kernel._pass_particle(ps)
9355 
9356 def _pass_particle_pair(pp):
9357  r"""_pass_particle_pair(IMP::ParticlePair const & pp) -> IMP::ParticlePair const &"""
9358  return _IMP_kernel._pass_particle_pair(pp)
9359 
9360 def _give_particles_copy(m):
9361  r"""_give_particles_copy(Model m) -> IMP::Particles"""
9362  return _IMP_kernel._give_particles_copy(m)
9363 
9364 def _pass_float_keys(input):
9365  r"""_pass_float_keys(IMP::FloatKeys const & input) -> IMP::FloatKeys"""
9366  return _IMP_kernel._pass_float_keys(input)
9367 
9368 def _pass(*args):
9369  r"""
9370  _pass(IMP::Particles const & p) -> IMP::Particles const
9371  _pass(IMP::Restraints const & p) -> IMP::Restraints const &
9372  """
9373  return _IMP_kernel._pass(*args)
9374 
9375 def _pass_decorators(p):
9376  r"""_pass_decorators(IMP::internal::_TrivialDecorators const & p) -> IMP::internal::_TrivialDecorators const &"""
9377  return _IMP_kernel._pass_decorators(p)
9378 
9379 def _pass_decorator_traits(p):
9380  r"""_pass_decorator_traits(IMP::internal::_TrivialTraitsDecorators const & p) -> IMP::internal::_TrivialTraitsDecorators const &"""
9381  return _IMP_kernel._pass_decorator_traits(p)
9382 
9383 def _pass_particle_pairs(p):
9384  r"""_pass_particle_pairs(IMP::ParticlePairsTemp const & p) -> IMP::ParticlePairsTemp"""
9385  return _IMP_kernel._pass_particle_pairs(p)
9386 
9387 def _pass_particle_index_pairs(p):
9388  r"""_pass_particle_index_pairs(IMP::ParticleIndexPairs const & p) -> IMP::ParticleIndexPairs"""
9389  return _IMP_kernel._pass_particle_index_pairs(p)
9390 
9391 def _pass_model_objects(p):
9392  r"""_pass_model_objects(IMP::ModelObjectsTemp const & p) -> IMP::ModelObjectsTemp"""
9393  return _IMP_kernel._pass_model_objects(p)
9394 
9395 def _pass_particles_temps(ps):
9396  r"""_pass_particles_temps(IMP::ParticlesTemps const & ps) -> IMP::ParticlesTemps"""
9397  return _IMP_kernel._pass_particles_temps(ps)
9398 
9399 def _test_overload(*args):
9400  r"""
9401  _test_overload(IMP::Particles const & ps) -> int
9402  _test_overload(IMP::Restraints const & ps) -> int
9403  """
9404  return _IMP_kernel._test_overload(*args)
9405 
9406 def _get_range(m, k):
9407  r"""_get_range(Model m, FloatKey k) -> IMP::FloatRange"""
9408  return _IMP_kernel._get_range(m, k)
9409 
9410 def _create_particles_from_pdb(name, m):
9411  r"""_create_particles_from_pdb(std::string name, Model m) -> IMP::ParticleIndexes"""
9412  return _IMP_kernel._create_particles_from_pdb(name, m)
9413 class _LogPairScore(PairScore):
9414  r"""Proxy of C++ IMP::internal::_LogPairScore class."""
9415 
9416  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9417  __repr__ = _swig_repr
9418 
9419  def __init__(self):
9420  r"""__init__(_LogPairScore self) -> _LogPairScore"""
9421  _IMP_kernel._LogPairScore_swiginit(self, _IMP_kernel.new__LogPairScore())
9422 
9423  def do_get_inputs(self, arg2, arg3):
9424  r"""do_get_inputs(_LogPairScore self, Model arg2, IMP::ParticleIndexes const & arg3) -> IMP::ModelObjectsTemp"""
9425  return _IMP_kernel._LogPairScore_do_get_inputs(self, arg2, arg3)
9426 
9427  def evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked=False):
9428  r"""evaluate_indexes(_LogPairScore self, Model m, IMP::ParticleIndexPairs const & p, DerivativeAccumulator da, unsigned int lower_bound, unsigned int upper_bound, bool all_indexes_checked=False) -> double"""
9429  return _IMP_kernel._LogPairScore_evaluate_indexes(self, m, p, da, lower_bound, upper_bound, all_indexes_checked)
9430 
9431  def evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked=False):
9432  r"""evaluate_indexes_scores(_LogPairScore 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"""
9433  return _IMP_kernel._LogPairScore_evaluate_indexes_scores(self, m, p, da, lower_bound, upper_bound, score, all_indexes_checked)
9434 
9435  def evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked=False):
9436  r"""evaluate_indexes_delta(_LogPairScore 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"""
9437  return _IMP_kernel._LogPairScore_evaluate_indexes_delta(self, m, p, da, indexes, score, all_indexes_checked)
9438 
9439  def evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked=False):
9440  r"""evaluate_if_good_indexes(_LogPairScore 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"""
9441  return _IMP_kernel._LogPairScore_evaluate_if_good_indexes(self, m, p, da, max, lower_bound, upper_bound, all_indexes_checked)
9442 
9443  def get_version_info(self):
9444  r"""get_version_info(_LogPairScore self) -> VersionInfo"""
9445  return _IMP_kernel._LogPairScore_get_version_info(self)
9446  __swig_destroy__ = _IMP_kernel.delete__LogPairScore
9447 
9448  def get_particle_pairs(self):
9449  r"""get_particle_pairs(_LogPairScore self) -> IMP::ParticlePairsTemp"""
9450  return _IMP_kernel._LogPairScore_get_particle_pairs(self)
9451 
9452  def clear(self):
9453  r"""clear(_LogPairScore self)"""
9454  return _IMP_kernel._LogPairScore_clear(self)
9455 
9456  def get_contains(self, pp):
9457  r"""get_contains(_LogPairScore self, IMP::ParticlePair const & pp) -> bool"""
9458  return _IMP_kernel._LogPairScore_get_contains(self, pp)
9459 
9460 # Register _LogPairScore in _IMP_kernel:
9461 _IMP_kernel._LogPairScore_swigregister(_LogPairScore)
9462 
9463 def _overloaded_particles(*args):
9464  r"""
9465  _overloaded_particles(Particle arg1)
9466  _overloaded_particles(IMP::Particles const & arg1)
9467  _overloaded_particles(IMP::ParticlesTemp const & arg1)
9468  _overloaded_particles(Model arg1, IMP::ParticleIndexes const & arg2)
9469  _overloaded_particles(IMP::internal::_TrivialDecorators const & arg1)
9470  _overloaded_particles(_TrivialDecorator arg1)
9471  """
9472  return _IMP_kernel._overloaded_particles(*args)
9473 class _ImplicitParticles(object):
9474  r"""Proxy of C++ IMP::internal::_ImplicitParticles class."""
9475 
9476  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9477  __repr__ = _swig_repr
9478 
9479  def __init__(self, *args):
9480  r"""
9481  __init__(_ImplicitParticles self, Particle arg2) -> _ImplicitParticles
9482  __init__(_ImplicitParticles self, IMP::Particles const & arg2) -> _ImplicitParticles
9483  __init__(_ImplicitParticles self, IMP::ParticlesTemp const & arg2) -> _ImplicitParticles
9484  __init__(_ImplicitParticles self, Model arg2, IMP::ParticleIndexes const & arg3) -> _ImplicitParticles
9485  __init__(_ImplicitParticles self, IMP::internal::_TrivialDecorators const & arg2) -> _ImplicitParticles
9486  __init__(_ImplicitParticles self, _TrivialDecorator arg2) -> _ImplicitParticles
9487  """
9488  _IMP_kernel._ImplicitParticles_swiginit(self, _IMP_kernel.new__ImplicitParticles(*args))
9489  __swig_destroy__ = _IMP_kernel.delete__ImplicitParticles
9490 
9491 # Register _ImplicitParticles in _IMP_kernel:
9492 _IMP_kernel._ImplicitParticles_swigregister(_ImplicitParticles)
9493 
9494 def _implicit_particles(arg1):
9495  r"""_implicit_particles(_ImplicitParticles arg1)"""
9496  return _IMP_kernel._implicit_particles(arg1)
9497 
9498 def _take_particle_adaptor(pa):
9499  r"""_take_particle_adaptor(_ParticleAdaptor pa) -> ParticleIndex"""
9500  return _IMP_kernel._take_particle_adaptor(pa)
9501 
9502 def _take_particle_indexes_adaptor(pa):
9503  r"""_take_particle_indexes_adaptor(_ParticleIndexesAdaptor pa) -> IMP::ParticleIndexes"""
9504  return _IMP_kernel._take_particle_indexes_adaptor(pa)
9505 class _RestraintsScoringFunction(ScoringFunction):
9506  r"""Proxy of C++ IMP::internal::GenericRestraintsScoringFunction< ::IMP::Restraints > class."""
9507 
9508  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9509  __repr__ = _swig_repr
9510 
9511  def __init__(self, *args):
9512  r"""
9513  __init__(_RestraintsScoringFunction self, IMP::RestraintsTemp const & rs, double weight=1.0, double max=NO_MAX, std::string name="RestraintsScoringFunction%1%") -> _RestraintsScoringFunction
9514  __init__(_RestraintsScoringFunction self) -> _RestraintsScoringFunction
9515  """
9516  _IMP_kernel._RestraintsScoringFunction_swiginit(self, _IMP_kernel.new__RestraintsScoringFunction(*args))
9517 
9518  def do_add_score_and_derivatives(self, sa, ss):
9519  r"""do_add_score_and_derivatives(_RestraintsScoringFunction self, ScoreAccumulator sa, IMP::ScoreStatesTemp const & ss)"""
9520  return _IMP_kernel._RestraintsScoringFunction_do_add_score_and_derivatives(self, sa, ss)
9521 
9522  def do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss):
9523  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)"""
9524  return _IMP_kernel._RestraintsScoringFunction_do_add_score_and_derivatives_moved(self, sa, moved_pis, reset_pis, ss)
9525 
9526  def do_get_inputs(self):
9527  r"""do_get_inputs(_RestraintsScoringFunction self) -> IMP::ModelObjectsTemp"""
9528  return _IMP_kernel._RestraintsScoringFunction_do_get_inputs(self)
9529 
9530  def get_restraints(self):
9531  r"""get_restraints(_RestraintsScoringFunction self) -> IMP::Vector< IMP::Pointer< IMP::Restraint >,std::allocator< IMP::Pointer< IMP::Restraint > > > const &"""
9532  return _IMP_kernel._RestraintsScoringFunction_get_restraints(self)
9533 
9534  def set_restraints(self, s):
9535  r"""set_restraints(_RestraintsScoringFunction self, IMP::RestraintsTemp const & s)"""
9536  return _IMP_kernel._RestraintsScoringFunction_set_restraints(self, s)
9537 
9538  def get_number_of_restraints(self):
9539  r"""get_number_of_restraints(_RestraintsScoringFunction self) -> unsigned int"""
9540  return _IMP_kernel._RestraintsScoringFunction_get_number_of_restraints(self)
9541 
9542  def clear_restraints(self):
9543  r"""clear_restraints(_RestraintsScoringFunction self)"""
9544  return _IMP_kernel._RestraintsScoringFunction_clear_restraints(self)
9545 
9546  def get_restraint(self, i):
9547  r"""get_restraint(_RestraintsScoringFunction self, unsigned int i) -> Restraint"""
9548  return _IMP_kernel._RestraintsScoringFunction_get_restraint(self, i)
9549 
9550  def erase_restraint(self, i):
9551  r"""erase_restraint(_RestraintsScoringFunction self, unsigned int i)"""
9552  return _IMP_kernel._RestraintsScoringFunction_erase_restraint(self, i)
9553 
9554  def add_restraint(self, r):
9555  r"""add_restraint(_RestraintsScoringFunction self, Restraint r) -> unsigned int"""
9556  return _IMP_kernel._RestraintsScoringFunction_add_restraint(self, r)
9557 
9558  def add_restraints(self, r):
9559  r"""add_restraints(_RestraintsScoringFunction self, IMP::Vector< IMP::Pointer< IMP::Restraint >,std::allocator< IMP::Pointer< IMP::Restraint > > > const & r)"""
9560  return _IMP_kernel._RestraintsScoringFunction_add_restraints(self, r)
9561 
9562  def _python_index_restraint(self, r, start, stop):
9563  r"""_python_index_restraint(_RestraintsScoringFunction self, Restraint r, unsigned int start, unsigned int stop) -> unsigned int"""
9564  return _IMP_kernel._RestraintsScoringFunction__python_index_restraint(self, r, start, stop)
9565 
9566  def get_version_info(self):
9567  r"""get_version_info(_RestraintsScoringFunction self) -> VersionInfo"""
9568  return _IMP_kernel._RestraintsScoringFunction_get_version_info(self)
9569  __swig_destroy__ = _IMP_kernel.delete__RestraintsScoringFunction
9570 
9571  @staticmethod
9572  def get_from(o):
9573  return _object_cast_to__RestraintsScoringFunction(o)
9574 
9575 
9576  def __get_restraints(self):
9577  return _list_util.VarList(
9578  getdimfunc=self.get_number_of_restraints,
9579  getfunc=self.get_restraint, erasefunc=self.erase_restraint,
9580  appendfunc=self.add_restraint, extendfunc=self.add_restraints,
9581  clearfunc=self.clear_restraints,
9582  indexfunc=self._python_index_restraint)
9583 
9584  def __set_restraints(self, obj):
9585  _list_util.set_varlist(self.restraints, obj)
9586 
9587  def __del_restraints(self):
9588  _list_util.del_varlist(self.restraints)
9589 
9590  restraints = property(__get_restraints, __set_restraints,
9591  __del_restraints, doc="List of Restraints")
9592 
9593 
9594  def _get_jax(self):
9595  import IMP._jax_util
9596  jis = [r.get_derived_object()._get_jax() for r in self.restraints]
9597  funcs = [j.score_func for j in jis]
9598  keys = frozenset(x for j in jis for x in j._keys)
9599  def jax_sf(jm):
9600  return sum(f(jm) for f in funcs)
9601  return IMP._jax_util.JAXRestraintInfo(
9602  m=self.get_model(), score_func=jax_sf, weight=1.0, keys=keys)
9603 
9604 
9605 # Register _RestraintsScoringFunction in _IMP_kernel:
9606 _IMP_kernel._RestraintsScoringFunction_swigregister(_RestraintsScoringFunction)
9607 class ScopedSetFloatAttribute(_RAII):
9608  r"""Proxy of C++ IMP::ScopedSetAttribute< IMP::FloatKey,IMP::Float > class."""
9609 
9610  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
9611 
9612  def __init__(self, *args):
9613  r"""
9614  __init__(ScopedSetFloatAttribute self) -> ScopedSetFloatAttribute
9615  __init__(ScopedSetFloatAttribute self, Particle p, FloatKey key, double const & value) -> ScopedSetFloatAttribute
9616  """
9617  _IMP_kernel.ScopedSetFloatAttribute_swiginit(self, _IMP_kernel.new_ScopedSetFloatAttribute(*args))
9618 
9619  def set(self, p, key, value):
9620  r"""set(ScopedSetFloatAttribute self, Particle p, FloatKey key, double const & value)"""
9621  return _IMP_kernel.ScopedSetFloatAttribute_set(self, p, key, value)
9622 
9623  def reset(self):
9624  r"""reset(ScopedSetFloatAttribute self)"""
9625  return _IMP_kernel.ScopedSetFloatAttribute_reset(self)
9626  __swig_destroy__ = _IMP_kernel.delete_ScopedSetFloatAttribute
9627 
9628  def show(self, *args):
9629  r"""show(ScopedSetFloatAttribute self, _ostream out=std::cout)"""
9630  return _IMP_kernel.ScopedSetFloatAttribute_show(self, *args)
9631 
9632  def __str__(self):
9633  r"""__str__(ScopedSetFloatAttribute self) -> std::string"""
9634  return _IMP_kernel.ScopedSetFloatAttribute___str__(self)
9635 
9636  def __repr__(self):
9637  r"""__repr__(ScopedSetFloatAttribute self) -> std::string"""
9638  return _IMP_kernel.ScopedSetFloatAttribute___repr__(self)
9639 
9640 # Register ScopedSetFloatAttribute in _IMP_kernel:
9641 _IMP_kernel.ScopedSetFloatAttribute_swigregister(ScopedSetFloatAttribute)
9642 
9643 def _get_module_data_path(module, file_name):
9644  r"""_get_module_data_path(std::string module, std::string file_name) -> std::string"""
9645  return _IMP_kernel._get_module_data_path(module, file_name)
9646 
9647 def _get_module_example_path(module, file_name):
9648  r"""_get_module_example_path(std::string module, std::string file_name) -> std::string"""
9649  return _IMP_kernel._get_module_example_path(module, file_name)
9650 
9651 #used_modules=[]
9652 #def show_used_modules():
9653 # for m in used_modules:
9654 # print "%-20s %s" % (m.get_module(), m.get_version())
9655 
9656 # Ensure that Windows gets the PATH set to include anything in the library
9657 # search path
9658 if sys.platform == 'win32' and 'IMP_LD_PATH' in os.environ:
9659  dirs = os.environ['IMP_LD_PATH'].split(":")
9660  pathcomps = os.environ['PATH'].split(";")
9661  for d in dirs:
9662  if d not in pathcomps:
9663  os.environ['PATH'] = d + ';' + os.environ['PATH']
9664 
9665 
9666 
9667 import sys
9668 import os
9669 
9671  """Allow command line tools to easily implement multiple commands.
9672  Typically, an IMP command line tool will use an instance of this class
9673  to provide a consistent interface to multiple distinct commands
9674  from a single binary, rather than providing a potentially large
9675  number of binaries. This is similar to the way a number of common
9676  command line tools outside of IMP function (e.g. Git provides a single
9677  `git` tool which implements multiple commands - `git add`, `git commit`,
9678  `git push` and so on).
9679 
9680  Each command is implemented with a Python module of the same name
9681  that can be imported from the module (for example, if `module_name`
9682  is `IMP.foo`, the `bar` command is provided by the `IMP.foo.bar` Python
9683  module, which would usually be found as `modules/foo/pyext/src/bar.py`).
9684  Each such module should have a docstring and a `%main()` method
9685  that takes no arguments (the module should also call its `%main()` method
9686  if it is run directly, i.e. with something like
9687  `if __name__=="__main__": %main()`). The encompassing module
9688  (`IMP.foo` in the example) should define `_all_commands` as a Python
9689  list of all valid commands.
9690 
9691  See the `multifit` and `cnmultifit` command line tools for example
9692  usage.
9693  """
9694 
9695  def __init__(self, short_help, long_help, module_name):
9696  """Constructor.
9697  @param short_help A few words that describe the command line tool.
9698  @param long_help Longer text, used in the `help` command.
9699  @param module_name Name of the module (e.g. `IMP.foo`) that
9700  implements the commands.
9701  """
9702  self.short_help = short_help
9703  self.long_help = long_help
9704  self.module_name = module_name
9705  self._all_commands = self.import_module()._all_commands
9706  self._progname = os.path.basename(sys.argv[0])
9707 
9708  def main(self):
9709  """Call this method to act upon the user-provided command line"""
9710  if len(sys.argv) <= 1:
9711  print(self.short_help + " Use '%s help' for help." % self._progname)
9712  else:
9713  command = sys.argv[1]
9714  if command in ('help', '--help', '-h'):
9715  if len(sys.argv) == 3:
9716  self.show_command_help(sys.argv[2])
9717  else:
9718  self.show_help()
9719  elif command == '--version':
9720  self.show_version()
9721  elif command in self._all_commands:
9722  self.do_command(command)
9723  else:
9724  self.unknown_command(command)
9725 
9726  def import_module(self, mod=None):
9727  modname = self.module_name
9728  if mod is not None:
9729  modname += "." + mod
9730  return __import__(modname, {}, {}, [''])
9731 
9732  def unknown_command(self, command):
9733  print("Unknown command: '%s'" % command)
9734  print("Use '%s help' for help." % self._progname)
9735  sys.exit(1)
9736 
9737  def _get_version(self):
9738  return self.import_module().get_module_version()
9739 
9740  def show_version(self):
9741  print(self._progname + ' ' + self._get_version())
9742 
9743  def show_help(self):
9744  ver = self._get_version()
9745  print("%s, version %s." % (self._progname, ver))
9746  print(self.long_help + """
9747 
9748 This program is part of IMP, the Integrative Modeling Platform,
9749 which is %s.
9750 For additional information about IMP, see <https://integrativemodeling.org>.
9751 
9752 Usage: %s <command> [options] [args]
9753 
9754 Commands:""" % (get_copyright(), self._progname))
9755  commands = self._all_commands[:] + ['help']
9756  commands.sort()
9757  cmdlen = max([len(c) for c in commands])
9758  for c in commands:
9759  if c == 'help':
9760  doc = 'Get help on using %s.' % self._progname
9761  else:
9762  doc = self.import_module(c).__doc__ or "<no help>"
9763  c += ' ' * (cmdlen - len(c))
9764  print(' ' + c + ' ' + doc)
9765  print("""
9766 Use "%s help <command>" for detailed help on any command
9767  or "%s --version" to see the version number.""" % (self._progname,
9768  self._progname))
9769 
9770  def do_command(self, command):
9771  mod = self.import_module(command)
9772  sys.argv[0] = self._progname + ' ' + command
9773  del sys.argv[1]
9774  mod.main()
9775 
9776  def show_command_help(self, command):
9777  if command == 'help':
9778  self.show_help()
9779  elif command in self._all_commands or command == 'help':
9780  mod = self.import_module(command)
9781  sys.argv = [self._progname + ' ' + command, '--help']
9782  mod.main()
9783  else:
9784  self.unknown_command(command)
9785 
9786 
9787 
9788 
9789 def get_networkx_graph(ig):
9790  import networkx
9791  g = networkx.DiGraph()
9792  if len(ig.get_vertices()) == 0:
9793  return g
9794 
9795  class NodeWrapper:
9796 
9797  def __init__(self, p):
9798  self.p = p
9799 
9800  def __str__(self):
9801  return self.p.get_name()
9802 
9803  def __call__(self, name):
9804  return self.p.__call__(name)
9805 
9806  for vi in ig.get_vertices():
9807  n = ig.get_vertex_name(vi)
9808  g.add_node(NodeWrapper(n))
9809  for vi in ig.get_vertices():
9810  n = ig.get_vertex_name(vi)
9811  for ni in ig.get_out_neighbors(vi):
9812  nn = ig.get_vertex_name(ni)
9813  g.add_edge(NodeWrapper(n), NodeWrapper(nn))
9814  return g
9815 
9816 
9817 def show_altgraph(g):
9818  def clean(name):
9819  try:
9820  n0 = name.get_name()
9821  except:
9822  n0 = str(name)
9823  n1 = str(n0).replace('"', '')
9824  n2 = n1.replace("\n", '')
9825  return n2
9826  import altgraph
9827  from altgraph import Graph, Dot
9828  graph = Graph.Graph()
9829  for i, v in enumerate(g.get_vertices()):
9830  graph.add_node(i) # , node_data=g.get_vertex_name(v)
9831  for i, v in enumerate(g.get_vertices()):
9832  for n in g.get_out_neighbors(v):
9833  graph.add_edge(v, n)
9834  dot = Dot.Dot(graph) # , graph_type="digraph"
9835  for i, v in enumerate(g.get_vertices()):
9836  dot.node_style(i, label=clean(g.get_vertex_name(v)))
9837  dot.display()
9838 
9839 
9840 def show_graphviz(g):
9841  import subprocess
9842  tfn = create_temporary_file_name("graph", ".dot")
9843  tfon = create_temporary_file_name("graph", ".pdf")
9844  st = g.get_graphviz_string()
9845  with open(tfn, "w") as fh:
9846  fh.write(st)
9847  try:
9848  print("running dot")
9849  sp = subprocess.Popen(["dot", "-Tpdf", tfn, "-o" + tfon])
9850  sp.wait()
9851  except:
9852  import sys
9853  sys.stderr.write("The dot command from the graphviz package was not found. Please make sure it is in the PATH passed to IMP.\n")
9854  return
9855  import platform
9856  if platform.system() == "Darwin":
9857  cmd = ["open"]
9858  else:
9859  cmd = ["gv", "acroread", "xpdf"]
9860  success = False
9861  for c in cmd:
9862  print("launching viewer " + c)
9863  try:
9864  subprocess.check_call([c, tfon])
9865  success = True
9866  break
9867  except:
9868  pass
9869  if not success:
9870  print("Could not display file. It is saved at " + tfon)
9871  return tfon
9872 
9873 
9874 
9875 
9876 import functools
9877 import contextlib
9878 
9879 def deprecated_module(version, module, help_message):
9880  """Mark a Python module as deprecated.
9881  @note The `module` argument would normally be `__name__`.
9882  @see [deprecation support](@ref deprecation)."""
9884  "Module %s is deprecated. %s\n" % (module, help_message))
9885 
9886 def deprecated_object(version, help_message):
9887  """Python decorator to mark a class as deprecated.
9888  @see [deprecation support](@ref deprecation)."""
9889  def wrapper(obj):
9890  orig_init = obj.__init__
9891 # Don't try to copy __module__ since __init__ may not have it
9892 # (e.g. if we subclassed object but didn't override __init__)
9893  @functools.wraps(orig_init, ('__name__', '__doc__'))
9894  def __init__(obj, *args, **keys):
9895  handle_use_deprecated("Object %s is deprecated. %s\n"
9896  % (type(obj), help_message))
9897  orig_init(obj, *args, **keys)
9898  obj.__init__ = __init__
9899  return obj
9900  return wrapper
9901 
9902 def deprecated_method(version, help_message):
9903  """Python decorator to mark a method as deprecated.
9904  @see [deprecation support](@ref deprecation)."""
9905  def out_wrapper(obj):
9906  @functools.wraps(obj)
9907  def wrapper(cls, *args, **keys):
9908  handle_use_deprecated("Method %s in %s is deprecated. %s\n"
9909  % (obj.__name__, type(cls), help_message))
9910  return obj(cls, *args, **keys)
9911  return wrapper
9912  return out_wrapper
9913 
9914 def deprecated_function(version, help_message):
9915  """Python decorator to mark a function as deprecated.
9916  @see [deprecation support](@ref deprecation)."""
9917  def out_wrapper(obj):
9918  @functools.wraps(obj)
9919  def wrapper(*args, **keys):
9920  handle_use_deprecated("Function %s is deprecated. %s\n"
9921  % (obj.__name__, help_message))
9922  return obj(*args, **keys)
9923  return wrapper
9924  return out_wrapper
9925 
9926 @contextlib.contextmanager
9927 def allow_deprecated(allow=True):
9928  """Context manager to temporarily allow (or disallow) deprecated code.
9929  @see [deprecation support](@ref deprecation)."""
9931  set_deprecation_exceptions(not allow)
9932  yield
9934 
9935 
9936 def _get_all_flags(ntokens):
9937  r"""_get_all_flags(unsigned int ntokens) -> IMP::Strings"""
9938  return _IMP_kernel._get_all_flags(ntokens)
9939 
9940 def _print_internal_help(out, description):
9941  r"""_print_internal_help(_ostream out, std::string description)"""
9942  return _IMP_kernel._print_internal_help(out, description)
9943 
9944 
9945 import argparse
9946 import sys
9947 
9948 class _PassThroughAction(argparse.Action):
9949  """Pass an argument through to the IMP Boost parser"""
9950  def __call__(self, parser, namespace, values, option_string=None):
9951  parser._boost_command_line.append(option_string)
9952  if values != []:
9953  parser._boost_command_line.append(values)
9954 # Terminate processing immediately if necessary (otherwise argparse
9955 # may fail if we're missing positional arguments)
9956  if option_string in ('-h', '--help', '--help_advanced', '--version'):
9957  parser._handle_boost()
9958 
9959 
9960 class ArgumentParser(argparse.ArgumentParser):
9961  """IMP-specific subclass of argparse.ArgumentParser.
9962  This adds options common to all IMP applications
9963  (see IMP::setup_from_argv()).
9964  """
9965 
9966  def __init__(self, *args, **kwargs):
9967 # Don't add --help option (since the Boost option parser handles it)
9968  kwargs['add_help'] = False
9969  super().__init__(*args, **kwargs)
9970  for ntoken in (0, 1):
9971  flags = _get_all_flags(ntoken)
9972  for f in flags:
9973  arg = ['-h', '--help'] if f == 'help' else ['--' + f]
9974  self.add_argument(*arg, help=argparse.SUPPRESS,
9975  nargs=None if ntoken else 0,
9976  action=_PassThroughAction,
9977  default=argparse.SUPPRESS)
9978 
9979  def parse_args(self, args=None, namespace=None):
9980  """Parse the command line and return optional and positional arguments.
9981  This functions in the same way as the method in the base class
9982  argparse.ArgumentParser, except that it also processes optional
9983  arguments common to all IMP applications (these are not returned
9984  in `args`, but can be obtained in the usual way, e.g. by calling
9985  IMP::get_string_flag()).
9986  @returns args
9987  """
9988  self._boost_command_line = [sys.argv[0]]
9989  ret = super().parse_args(args, namespace)
9990  if len(self._boost_command_line) > 1:
9991  self._handle_boost()
9992  return ret
9993 
9994  def _get_description(self):
9995  return self.format_help() + "\nOptions common to all IMP applications:"
9996 
9997  def print_help(self, file=None):
9998  _print_internal_help(file if file else sys.stdout,
9999  self._get_description())
10000 
10001  def _handle_boost(self):
10002  setup_from_argv(self._boost_command_line,
10003  self._get_description(),
10004  '==SUPPRESS==', 0)
10005 
10006 class RandomNumberGenerator(object):
10007  r"""Proxy of C++ IMP::RandomNumberGenerator class."""
10008 
10009  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
10010  __repr__ = _swig_repr
10011 
10012  def seed(self, x):
10013  r"""seed(RandomNumberGenerator self, int x)"""
10014  return _IMP_kernel.RandomNumberGenerator_seed(self, x)
10015 
10016  def __call__(self):
10017  r"""__call__(RandomNumberGenerator self) -> int"""
10018  return _IMP_kernel.RandomNumberGenerator___call__(self)
10019 
10020  def __init__(self):
10021  r"""__init__(RandomNumberGenerator self) -> RandomNumberGenerator"""
10022  _IMP_kernel.RandomNumberGenerator_swiginit(self, _IMP_kernel.new_RandomNumberGenerator())
10023  __swig_destroy__ = _IMP_kernel.delete_RandomNumberGenerator
10024 
10025 # Register RandomNumberGenerator in _IMP_kernel:
10026 _IMP_kernel.RandomNumberGenerator_swigregister(RandomNumberGenerator)
10027 
10028 def get_random_float_uniform(*args):
10029  r"""
10030  get_random_float_uniform() -> float
10031  get_random_float_uniform(float min, float max) -> float
10032  """
10033  return _IMP_kernel.get_random_float_uniform(*args)
10034 
10035 def get_random_double_uniform(*args):
10036  r"""
10037  get_random_double_uniform() -> double
10038  get_random_double_uniform(double min, double max) -> double
10039  """
10040  return _IMP_kernel.get_random_double_uniform(*args)
10041 
10042 def get_random_floats_normal(n, mean=0.0, stddev=1.0):
10043  r"""get_random_floats_normal(unsigned int n, float mean=0.0, float stddev=1.0) -> IMP::Vector< float,std::allocator< float > >"""
10044  return _IMP_kernel.get_random_floats_normal(n, mean, stddev)
10045 
10046 def get_random_doubles_normal(n, mean=0.0, stddev=1.0):
10047  r"""get_random_doubles_normal(unsigned int n, double mean=0.0, double stddev=1.0) -> IMP::Vector< double,std::allocator< double > >"""
10048  return _IMP_kernel.get_random_doubles_normal(n, mean, stddev)
10049 
10050 def get_random_floats_uniform(n):
10051  r"""get_random_floats_uniform(unsigned int n) -> IMP::Vector< float,std::allocator< float > >"""
10052  return _IMP_kernel.get_random_floats_uniform(n)
10053 
10054 def get_random_doubles_uniform(n):
10055  r"""get_random_doubles_uniform(unsigned int n) -> IMP::Vector< double,std::allocator< double > >"""
10056  return _IMP_kernel.get_random_doubles_uniform(n)
10057 
10058 def get_random_seed():
10059  r"""get_random_seed() -> boost::uint64_t"""
10060  return _IMP_kernel.get_random_seed()
10061 
10062 def _get_derivatives_numpy(m, k, m_pyobj, read_only):
10063  r"""_get_derivatives_numpy(Model m, FloatKey k, PyObject * m_pyobj, bool read_only) -> PyObject *"""
10064  return _IMP_kernel._get_derivatives_numpy(m, k, m_pyobj, read_only)
10065 
10066 def _get_floats_numpy(m, k, m_pyobj, read_only):
10067  r"""_get_floats_numpy(Model m, FloatKey k, PyObject * m_pyobj, bool read_only) -> PyObject *"""
10068  return _IMP_kernel._get_floats_numpy(m, k, m_pyobj, read_only)
10069 
10070 def _get_ints_numpy(m, k, m_pyobj, read_only):
10071  r"""_get_ints_numpy(Model m, IntKey k, PyObject * m_pyobj, bool read_only) -> PyObject *"""
10072  return _IMP_kernel._get_ints_numpy(m, k, m_pyobj, read_only)
10073 
10074 def _get_vector3ds_numpy(m, k, m_pyobj, read_only):
10075  r"""_get_vector3ds_numpy(Model m, Vector3DKey k, PyObject * m_pyobj, bool read_only) -> PyObject *"""
10076  return _IMP_kernel._get_vector3ds_numpy(m, k, m_pyobj, read_only)
10077 
10078 def _get_spheres_numpy(m, m_pyobj, read_only):
10079  r"""_get_spheres_numpy(Model m, PyObject * m_pyobj, bool read_only) -> PyObject *"""
10080  return _IMP_kernel._get_spheres_numpy(m, m_pyobj, read_only)
10081 
10082 def _get_sphere_derivatives_numpy(m, m_pyobj, read_only):
10083  r"""_get_sphere_derivatives_numpy(Model m, PyObject * m_pyobj, bool read_only) -> PyObject *"""
10084  return _IMP_kernel._get_sphere_derivatives_numpy(m, m_pyobj, read_only)
10085 
10086 def _get_internal_coordinates_numpy(m, m_pyobj, read_only):
10087  r"""_get_internal_coordinates_numpy(Model m, PyObject * m_pyobj, bool read_only) -> PyObject *"""
10088  return _IMP_kernel._get_internal_coordinates_numpy(m, m_pyobj, read_only)
10089 
10090 def _get_internal_coordinate_derivatives_numpy(m, m_pyobj, read_only):
10091  r"""_get_internal_coordinate_derivatives_numpy(Model m, PyObject * m_pyobj, bool read_only) -> PyObject *"""
10092  return _IMP_kernel._get_internal_coordinate_derivatives_numpy(m, m_pyobj, read_only)
10093 
10094 try:
10095  import numpy
10096  ParticleIndex = numpy.intc
10097 except ImportError:
10098  pass
10099 
10100 
10101 class JAXWarning(UserWarning):
10102  """Warning for incomplete JAX support or different behavior of JAX code"""
10103  pass
10104 
10105 
10106 def get_module_name():
10107  r"""get_module_name() -> std::string const"""
10108  return _IMP_kernel.get_module_name()
10109 
10110 def get_module_version():
10111  r"""get_module_version() -> std::string const"""
10112  return _IMP_kernel.get_module_version()
10113 
10114 def get_example_path(fname):
10115  r"""get_example_path(std::string fname) -> std::string"""
10116  return _IMP_kernel.get_example_path(fname)
10117 
10118 def get_data_path(fname):
10119  r"""get_data_path(std::string fname) -> std::string"""
10120  return _IMP_kernel.get_data_path(fname)
10121 
10122 from . import _version_check
10123 _version_check.check_version(get_module_version())
10124 __version__ = get_module_version()
10125 
10126 
10127 random_number_generator = cvar.random_number_generator
10128 
Particle * get_particle(ParticleIndex p) const
Get the particle from an index.
Definition: Model.h:506
A base class for modifiers of ParticlesTemp.
A class to store a configuration of a model.
Definition: Configuration.h:20
def get_ints_numpy
Get the model's attribute array for IntKey k as a NumPy array.
Definition: __init__.py:5751
Abstract class for scoring object(s) of type ParticleIndexPair.
Definition: PairScore.h:44
A shared container for Pairs.
Definition: PairContainer.h:39
void add_int_flag(std::string name, size_t default_value, std::string description)
Allow command line tools to easily implement multiple commands.
Definition: __init__.py:9670
CheckLevel get_check_level()
Get the current audit mode.
Definition: exception.h:80
Key< 11 > TriggerKey
The type used to identify changed model properties.
Definition: base_types.h:82
bool get_is_quick_test()
Definition: flags.h:183
Abstract predicate function.
Definition: QuadPredicate.h:31
Key< 0 > FloatKey
The type used to identify float attributes in the Particles.
Definition: base_types.h:32
def allow_deprecated
Context manager to temporarily allow (or disallow) deprecated code.
Definition: __init__.py:9927
std::string get_unique_name(std::string templ)
Return a unique name produced from the string.
DependencyGraph get_dependency_graph(Model *m)
def get_floats_numpy
Get the model's attribute array for FloatKey k as a NumPy array.
Definition: __init__.py:5773
Objects get_live_objects()
Return pointers to all live objects.
def get_derived_object
Return this object cast to the most derived subclass.
Definition: __init__.py:843
Vector< char > write_particles_to_buffer(const ParticlesTemp &particles, const FloatKeys &keys)
return a binary buffer with the data
Key< 13 > SparseIntKey
The type used to identify sparse int attributes in the Particles.
Definition: base_types.h:90
def main
Call this method to act upon the user-provided command line.
Definition: __init__.py:9708
Key< 15 > SparseParticleIndexKey
The type used to identify sparse particle attributes in the Particles.
Definition: base_types.h:98
boost::graph DependencyGraph
Directed graph on the interactions between the various objects in the model.
ContainersTemp get_input_containers(const ModelObjectsTemp &mos)
Return all the input particles for a given ModelObject.
def deprecated_module
Mark a Python module as deprecated.
Definition: __init__.py:9879
Key< 16 > Vector3DKey
The type used to identify 3D vector attributes in the Particles.
Definition: base_types.h:102
Vector< VectorD< D > > get_vertices(const BoundingBoxD< D > &bb)
Return a list of the 2^D bounding points for the bounding box.
Definition: BoundingBoxD.h:281
Array< 4, WeakPointer< Particle >, Particle * > ParticleQuad
Definition: base_types.h:172
bool get_bool_flag(std::string name)
void handle_use_deprecated(std::string message)
Break in this method in gdb to find deprecated uses at runtime.
void set_progress_display(std::string description, unsigned int steps)
Set up the progress bar with the passed description.
def deprecated_function
Python decorator to mark a function as deprecated.
Definition: __init__.py:9914
virtual ::IMP::VersionInfo get_version_info() const override
Get information about the module and version of the object.
Definition: Model.h:668
void remove_attribute(TypeKey attribute_key, ParticleIndex particle)
remove particle attribute with the specified key
Index< ParticleIndexTag > ParticleIndex
Definition: base_types.h:182
ParticlesTemp get_particles(Model *m, const ParticleIndexes &ps)
Get the particles from a list of indexes.
Key< 6 > ParticleIndexesKey
The type used to identify a particle attribute in the Particles.
Definition: base_types.h:64
Array< 3, WeakPointer< Particle >, Particle * > ParticleTriplet
Definition: base_types.h:169
ContainersTemp get_output_containers(const ModelObjectsTemp &mos)
Return all the output particles for a given ModelObject.
Base class for all samplers.
Definition: Sampler.h:31
void add_particle(RMF::FileHandle fh, Particle *hs)
virtual void clear_caches()
Definition: Object.h:270
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.
void add_string_flag(std::string name, std::string default_value, std::string description)
LogLevel get_log_level()
Get the currently active global log level.
Definition: log.h:92
def get_sphere_derivatives_numpy
Get the model's XYZR attribute derivatives arrays as NumPy arrays.
Definition: __init__.py:5796
void set_deprecation_warnings(bool tf)
Toggle printing of warnings on using deprecated classes.
def get_numpy
Get the model's attribute array for any type of Key k as a NumPy array.
Definition: __init__.py:5765
TextOutput create_temporary_file(std::string prefix="imp_temp", std::string suffix="")
Create a temporary file. The path can be extracted from the TextOutput.
ParticlesTemp get_output_particles(const ModelObjectsTemp &mos)
Return all the output particles for a given ModelObject.
ScoringFunction * create_scoring_function(RestraintType *rs, double weight=1.0, double max=NO_MAX, std::string name=std::string())
Create a ScoringFunction on a single restraint.
Definition: generic.h:23
A base class for modifiers of ParticlePairsTemp.
Definition: PairModifier.h:31
void write_help(std::ostream &out=std::cerr)
Key< 2 > StringKey
The type used to identify string attributes in the Particles.
Definition: base_types.h:40
size_t get_int_flag(std::string name)
Key< 10 > FloatsKey
The type used to identify float vector attributes in the Particles.
Definition: base_types.h:60
void add_restraint(RMF::FileHandle fh, Restraint *hs)
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
boost::uint64_t get_random_seed()
Return the initial random seed.
Abstract predicate function.
Key< 3 > ParticleIndexKey
The type used to identify a particle attribute in the Particles.
Definition: base_types.h:44
Strings get_live_object_names()
Return the names of all live objects.
void add_to_progress_display(unsigned int step=1)
Set the current progress.
void add_attribute(TypeKey attribute_key, ParticleIndex particle, Type value)
add particle attribute with the specified key and initial value
void add_float_flag(std::string name, double default_value, std::string description)
virtual void do_destroy()
Definition: Object.h:274
Ints get_index(const ParticlesTemp &particles, const Subset &subset, const Subsets &excluded)
Common base class for heavy weight IMP objects.
Definition: Object.h:111
ParticleIndexes get_particle_indexes(ParticlesTemp const &particles)
def deprecated_method
Python decorator to mark a method as deprecated.
Definition: __init__.py:9902
Abstract class for scoring object(s) of type ParticleIndex.
Base class for all optimizers.
Definition: Optimizer.h:48
void reset_log_timer()
Reset the log timer.
void add_restraints(RMF::FileHandle fh, const Restraints &hs)
void add_to_log(LogLevel level, std::string to_write)
Write a string to the log, for Python.
def parse_args
Parse the command line and return optional and positional arguments.
Definition: __init__.py:9979
def get_internal_coordinates_numpy
Get the model's internal coordinate array as a NumPy array.
Definition: __init__.py:5802
void set_is_optimized(TypeKey attribute_key, ParticleIndex particle, bool true_or_false)
Key< 1 > IntKey
The type used to identify int attributes in the Particles.
Definition: base_types.h:36
Restraints create_decomposition(const RestraintsTemp &rs)
Return the decomposition of a list of restraints.
std::string get_relative_path(std::string base, std::string relative)
Return a path to a file relative to another file.
A class to store a set of configurations of a model.
A shared container for Quads.
Definition: QuadContainer.h:39
def get_internal_coordinate_derivatives_numpy
Get the model's internal coordinate derivative array as a NumPy array.
Definition: __init__.py:5808
A shared container for Singletons.
void set_deprecation_exceptions(bool tf)
Toggle whether an exception is thrown when a deprecated method is used.
def get_spheres_numpy
Get the model's XYZR attribute arrays as NumPy arrays.
Definition: __init__.py:5790
Key< 4 > ObjectKey
The type used to identify an Object attribute.
Definition: base_types.h:48
Interface to specialized Particle types (e.g. atoms)
Definition: Decorator.h:119
IMP-specific subclass of argparse.ArgumentParser.
Definition: __init__.py:9960
def get_derivatives_numpy
Get the model's attribute derivatives array for FloatKey k as a NumPy array.
Definition: __init__.py:5778
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.
std::string get_executable_name()
Return the name of the current executable.
void set_log_level(LogLevel l)
Set the current global log level.
unsigned int get_number_of_threads()
float get_random_float_uniform()
Return a uniformly distributed float number in range [0..1)
Definition: random_utils.h:138
def deprecated_object
Python decorator to mark a class as deprecated.
Definition: __init__.py:9886
ParticlesTemp get_input_particles(const ModelObjectsTemp &mos)
Return all the input particles for a given ModelObject.
Base class for optimizers that act on individual attributes.
void set_show_leaked_objects(bool tf)
Set whether to complain about objects not being properly cleaned up.
Abstract predicate function.
Definition: PairPredicate.h:31
bool get_deprecation_exceptions()
Get whether an exception is thrown when a deprecated method is used.
Represents a scoring function on the model.
void set_log_timer(bool tb)
Set whether log messages are tagged with the current log time.
void show_restraint_hierarchy(ScoringFunctionAdaptor rs, std::ostream &out=std::cout)
Print the hierarchy of restraints.
DependencyGraph get_pruned_dependency_graph(Model *m)
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
Warning for incomplete JAX support or different behavior of JAX code.
Definition: __init__.py:10101
Object(std::string name)
Construct an object with the given name.
Array< 2, WeakPointer< Particle >, Particle * > ParticlePair
Definition: base_types.h:163
Key< 5 > IntsKey
The type used to identify int attributes in the Particles.
Definition: base_types.h:56
virtual VersionInfo get_version_info() const
Get information about the module and version of the object.
Definition: Object.h:206
Restraints create_restraints(RMF::FileConstHandle fh, Model *m)
Shared optimizer state that is invoked upon commitment of new coordinates.
Abstract predicate function.
Abstract class to implement hierarchical methods.
Definition: Refiner.h:34
A base class for modifiers of ParticleTripletsTemp.
std::string show_graphviz(Graph g)
void set_check_level(CheckLevel l)
std::string get_string_flag(std::string name)
networkx::DiGraph get_networkx_graph(Graph g)
def __init__
Constructor.
Definition: __init__.py:9695
double get_random_double_uniform()
Return a uniformly distributed double number in range [0..1)
Definition: random_utils.h:173
Key< 8 > ModelKey
The type used to identify data stored directly in the model.
Definition: base_types.h:78
A base class for modifiers of ParticleQuadsTemp.
Definition: QuadModifier.h:31
Key< 14 > SparseFloatKey
The type used to identify sparse float attributes in the Particles.
Definition: base_types.h:94
A shared container for Triplets.
def get_vector3ds_numpy
Get the model's attribute array for Vector3DKey k as a NumPy array.
Definition: __init__.py:5783
Abstract class for scoring object(s) of type ParticleIndexTriplet.
Definition: TripletScore.h:44
void show_altgraph(Graph g)
void update()
Sometimes it is useful to be able to make sure the model is up to date.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.
void add_bool_flag(std::string name, std::string description)
ParticleIndexes get_indexes(const ParticlesTemp &ps)
Get the indexes from a list of particles.
Abstract class for containers of particles.
void read_particles_from_buffer(const Vector< char > &buffer, const ParticlesTemp &particles, const FloatKeys &keys)
load found attributes into the particles
Abstract single variable functor class for score functions.
Definition: UnaryFunction.h:27
void set_number_of_threads(unsigned int n)
double get_float_flag(std::string name)
void set_check_level(CheckLevel tf)
Control runtime checks in the code.
Definition: exception.h:72
ScoreStatesTemp get_update_order(ScoreStatesTemp input)
std::string get_module_version()
Return the version of this module, as a string.
std::string create_temporary_file_name(std::string prefix="imp_temp", std::string suffix="")
Create a temporary file.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:56
Key< 12 > SparseStringKey
The type used to identify sparse string attributes in the Particles.
Definition: base_types.h:86
std::string get_copyright()
Get the IMP copyright notice.