IMP logo
IMP Reference Guide  develop.78018a392b,2024/05/10
The Integrative Modeling Platform
example/__init__.py
1 # This file was automatically generated by SWIG (https://www.swig.org).
2 # Version 4.2.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-2024 IMP Inventors. All rights reserved.
10 
11 from __future__ import print_function, division, absolute_import
12 
13 
14 
15 from sys import version_info as _swig_python_version_info
16 import _IMP_example
17 
18 try:
19  import builtins as __builtin__
20 except ImportError:
21  import __builtin__
22 
23 def _swig_repr(self):
24  try:
25  strthis = "proxy of " + self.this.__repr__()
26  except __builtin__.Exception:
27  strthis = ""
28  return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
29 
30 
31 def _swig_setattr_nondynamic_instance_variable(set):
32  def set_instance_attr(self, name, value):
33  if name == "this":
34  set(self, name, value)
35  elif name == "thisown":
36  self.this.own(value)
37  elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
38  set(self, name, value)
39  else:
40  raise AttributeError("You cannot add instance attributes to %s" % self)
41  return set_instance_attr
42 
43 
44 def _swig_setattr_nondynamic_class_variable(set):
45  def set_class_attr(cls, name, value):
46  if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
47  set(cls, name, value)
48  else:
49  raise AttributeError("You cannot add class attributes to %s" % cls)
50  return set_class_attr
51 
52 
53 def _swig_add_metaclass(metaclass):
54  """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
55  def wrapper(cls):
56  return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
57  return wrapper
58 
59 
60 class _SwigNonDynamicMeta(type):
61  """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
62  __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
63 
64 
65 import weakref
66 
67 class IMP_EXAMPLE_SwigPyIterator(object):
68  r"""Proxy of C++ swig::IMP_EXAMPLE_SwigPyIterator class."""
69 
70  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
71 
72  def __init__(self, *args, **kwargs):
73  raise AttributeError("No constructor defined - class is abstract")
74  __repr__ = _swig_repr
75  __swig_destroy__ = _IMP_example.delete_IMP_EXAMPLE_SwigPyIterator
76 
77  def value(self):
78  r"""value(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
79  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_value(self)
80 
81  def incr(self, n=1):
82  r"""incr(IMP_EXAMPLE_SwigPyIterator self, size_t n=1) -> IMP_EXAMPLE_SwigPyIterator"""
83  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_incr(self, n)
84 
85  def decr(self, n=1):
86  r"""decr(IMP_EXAMPLE_SwigPyIterator self, size_t n=1) -> IMP_EXAMPLE_SwigPyIterator"""
87  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_decr(self, n)
88 
89  def distance(self, x):
90  r"""distance(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> ptrdiff_t"""
91  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_distance(self, x)
92 
93  def equal(self, x):
94  r"""equal(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
95  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_equal(self, x)
96 
97  def copy(self):
98  r"""copy(IMP_EXAMPLE_SwigPyIterator self) -> IMP_EXAMPLE_SwigPyIterator"""
99  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_copy(self)
100 
101  def next(self):
102  r"""next(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
103  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_next(self)
104 
105  def __next__(self):
106  r"""__next__(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
107  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___next__(self)
108 
109  def previous(self):
110  r"""previous(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
111  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_previous(self)
112 
113  def advance(self, n):
114  r"""advance(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
115  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_advance(self, n)
116 
117  def __eq__(self, x):
118  r"""__eq__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
119  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___eq__(self, x)
120 
121  def __ne__(self, x):
122  r"""__ne__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
123  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___ne__(self, x)
124 
125  def __iadd__(self, n):
126  r"""__iadd__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
127  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___iadd__(self, n)
128 
129  def __isub__(self, n):
130  r"""__isub__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
131  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___isub__(self, n)
132 
133  def __add__(self, n):
134  r"""__add__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
135  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___add__(self, n)
136 
137  def __sub__(self, *args):
138  r"""
139  __sub__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator
140  __sub__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> ptrdiff_t
141  """
142  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___sub__(self, *args)
143  def __iter__(self):
144  return self
145 
146 # Register IMP_EXAMPLE_SwigPyIterator in _IMP_example:
147 _IMP_example.IMP_EXAMPLE_SwigPyIterator_swigregister(IMP_EXAMPLE_SwigPyIterator)
148 
149 _value_types=[]
150 _object_types=[]
151 _raii_types=[]
152 _plural_types=[]
153 
154 IMP_DEBUG = _IMP_example.IMP_DEBUG
155 
156 IMP_RELEASE = _IMP_example.IMP_RELEASE
157 
158 IMP_SILENT = _IMP_example.IMP_SILENT
159 
160 IMP_PROGRESS = _IMP_example.IMP_PROGRESS
161 
162 IMP_TERSE = _IMP_example.IMP_TERSE
163 
164 IMP_VERBOSE = _IMP_example.IMP_VERBOSE
165 
166 IMP_MEMORY = _IMP_example.IMP_MEMORY
167 
168 IMP_NONE = _IMP_example.IMP_NONE
169 
170 IMP_USAGE = _IMP_example.IMP_USAGE
171 
172 IMP_INTERNAL = _IMP_example.IMP_INTERNAL
173 
174 IMP_KERNEL_HAS_LOG4CXX = _IMP_example.IMP_KERNEL_HAS_LOG4CXX
175 
176 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_example.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
177 
178 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_example.IMP_COMPILER_HAS_DEBUG_VECTOR
179 
180 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_example.IMP_COMPILER_HAS_RANDOM_SHUFFLE
181 
182 IMP_COMPILER_HAS_THREE_WAY = _IMP_example.IMP_COMPILER_HAS_THREE_WAY
183 
184 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_example.IMP_KERNEL_HAS_BOOST_RANDOM
185 
186 IMP_KERNEL_HAS_NUMPY = _IMP_example.IMP_KERNEL_HAS_NUMPY
187 
188 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_example.IMP_KERNEL_HAS_GPERFTOOLS
189 
190 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
191 
192 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
193 
194 IMPKERNEL_SHOW_WARNINGS = _IMP_example.IMPKERNEL_SHOW_WARNINGS
195 
196 
197 import sys
198 class _DirectorObjects(object):
199  """@internal Simple class to keep references to director objects
200  to prevent premature deletion."""
201  def __init__(self):
202  self._objects = []
203  def register(self, obj):
204  """Take a reference to a director object; will only work for
205  refcounted C++ classes"""
206  if hasattr(obj, 'get_ref_count'):
207  self._objects.append(obj)
208  def cleanup(self):
209  """Only drop our reference and allow cleanup by Python if no other
210  Python references exist (we hold 3 references: one in self._objects,
211  one in x, and one in the argument list for getrefcount) *and* no
212  other C++ references exist (the Python object always holds one)"""
213  objs = [x for x in self._objects if sys.getrefcount(x) > 3 \
214  or x.get_ref_count() > 1]
215 # Do in two steps so the references are kept until the end of the
216 # function (deleting references may trigger a fresh call to this method)
217  self._objects = objs
218  def get_object_count(self):
219  """Get number of director objects (useful for testing only)"""
220  return len(self._objects)
221 _director_objects = _DirectorObjects()
222 
223 class _ostream(object):
224  r"""Proxy of C++ std::ostream class."""
225 
226  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
227 
228  def __init__(self, *args, **kwargs):
229  raise AttributeError("No constructor defined")
230  __repr__ = _swig_repr
231 
232  def write(self, osa_buf):
233  r"""write(_ostream self, char const * osa_buf)"""
234  return _IMP_example._ostream_write(self, osa_buf)
235 
236 # Register _ostream in _IMP_example:
237 _IMP_example._ostream_swigregister(_ostream)
238 IMP_C_OPEN_BINARY = _IMP_example.IMP_C_OPEN_BINARY
239 
240 import IMP
241 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CGAL_HAS_BOOST_FILESYSTEM
242 
243 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
244 
245 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_example.IMP_CGAL_HAS_BOOST_RANDOM
246 
247 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_example.IMP_CGAL_HAS_BOOST_SYSTEM
248 
249 IMP_CGAL_HAS_NUMPY = _IMP_example.IMP_CGAL_HAS_NUMPY
250 
251 IMPCGAL_SHOW_WARNINGS = _IMP_example.IMPCGAL_SHOW_WARNINGS
252 
253 import IMP.cgal
254 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_example.IMP_ALGEBRA_HAS_IMP_CGAL
255 
256 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
257 
258 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
259 
260 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_RANDOM
261 
262 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_SYSTEM
263 
264 IMP_ALGEBRA_HAS_CGAL = _IMP_example.IMP_ALGEBRA_HAS_CGAL
265 
266 IMP_ALGEBRA_HAS_NUMPY = _IMP_example.IMP_ALGEBRA_HAS_NUMPY
267 
268 IMP_ALGEBRA_HAS_ANN = _IMP_example.IMP_ALGEBRA_HAS_ANN
269 
270 IMPALGEBRA_SHOW_WARNINGS = _IMP_example.IMPALGEBRA_SHOW_WARNINGS
271 
272 import IMP.algebra
273 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_example.IMP_DISPLAY_HAS_IMP_CGAL
274 
275 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
276 
277 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
278 
279 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_example.IMP_DISPLAY_HAS_BOOST_RANDOM
280 
281 IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_example.IMP_DISPLAY_HAS_BOOST_SYSTEM
282 
283 IMP_DISPLAY_HAS_CGAL = _IMP_example.IMP_DISPLAY_HAS_CGAL
284 
285 IMP_DISPLAY_HAS_NUMPY = _IMP_example.IMP_DISPLAY_HAS_NUMPY
286 
287 IMPDISPLAY_SHOW_WARNINGS = _IMP_example.IMPDISPLAY_SHOW_WARNINGS
288 
289 import IMP.display
290 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_example.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
291 
292 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
293 
294 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
295 
296 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
297 
298 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
299 
300 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_example.IMP_SCORE_FUNCTOR_HAS_CGAL
301 
302 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_example.IMP_SCORE_FUNCTOR_HAS_HDF5
303 
304 IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_example.IMP_SCORE_FUNCTOR_HAS_NUMPY
305 
306 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_example.IMPSCOREFUNCTOR_SHOW_WARNINGS
307 
308 import IMP.score_functor
309 IMP_STATISTICS_HAS_IMP_CGAL = _IMP_example.IMP_STATISTICS_HAS_IMP_CGAL
310 
311 IMP_STATISTICS_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_STATISTICS_HAS_BOOST_FILESYSTEM
312 
313 IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS
314 
315 IMP_STATISTICS_HAS_BOOST_RANDOM = _IMP_example.IMP_STATISTICS_HAS_BOOST_RANDOM
316 
317 IMP_STATISTICS_HAS_BOOST_SYSTEM = _IMP_example.IMP_STATISTICS_HAS_BOOST_SYSTEM
318 
319 IMP_STATISTICS_HAS_CGAL = _IMP_example.IMP_STATISTICS_HAS_CGAL
320 
321 IMP_STATISTICS_HAS_NUMPY = _IMP_example.IMP_STATISTICS_HAS_NUMPY
322 
323 IMPSTATISTICS_SHOW_WARNINGS = _IMP_example.IMPSTATISTICS_SHOW_WARNINGS
324 
325 import IMP.statistics
326 IMP_CORE_HAS_IMP_CGAL = _IMP_example.IMP_CORE_HAS_IMP_CGAL
327 
328 IMP_CORE_HAS_IMP_KERNEL = _IMP_example.IMP_CORE_HAS_IMP_KERNEL
329 
330 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CORE_HAS_BOOST_FILESYSTEM
331 
332 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
333 
334 IMP_CORE_HAS_BOOST_RANDOM = _IMP_example.IMP_CORE_HAS_BOOST_RANDOM
335 
336 IMP_CORE_HAS_BOOST_SYSTEM = _IMP_example.IMP_CORE_HAS_BOOST_SYSTEM
337 
338 IMP_CORE_HAS_CGAL = _IMP_example.IMP_CORE_HAS_CGAL
339 
340 IMP_CORE_HAS_HDF5 = _IMP_example.IMP_CORE_HAS_HDF5
341 
342 IMP_CORE_HAS_NUMPY = _IMP_example.IMP_CORE_HAS_NUMPY
343 
344 IMPCORE_SHOW_WARNINGS = _IMP_example.IMPCORE_SHOW_WARNINGS
345 
346 import IMP.core
347 IMP_CONTAINER_HAS_IMP_ALGEBRA = _IMP_example.IMP_CONTAINER_HAS_IMP_ALGEBRA
348 
349 IMP_CONTAINER_HAS_IMP_CGAL = _IMP_example.IMP_CONTAINER_HAS_IMP_CGAL
350 
351 IMP_CONTAINER_HAS_IMP_DISPLAY = _IMP_example.IMP_CONTAINER_HAS_IMP_DISPLAY
352 
353 IMP_CONTAINER_HAS_IMP_KERNEL = _IMP_example.IMP_CONTAINER_HAS_IMP_KERNEL
354 
355 IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR
356 
357 IMP_CONTAINER_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CONTAINER_HAS_BOOST_FILESYSTEM
358 
359 IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS
360 
361 IMP_CONTAINER_HAS_BOOST_RANDOM = _IMP_example.IMP_CONTAINER_HAS_BOOST_RANDOM
362 
363 IMP_CONTAINER_HAS_BOOST_SYSTEM = _IMP_example.IMP_CONTAINER_HAS_BOOST_SYSTEM
364 
365 IMP_CONTAINER_HAS_CGAL = _IMP_example.IMP_CONTAINER_HAS_CGAL
366 
367 IMP_CONTAINER_HAS_HDF5 = _IMP_example.IMP_CONTAINER_HAS_HDF5
368 
369 IMP_CONTAINER_HAS_NUMPY = _IMP_example.IMP_CONTAINER_HAS_NUMPY
370 
371 IMP_CONTAINER_HAS_PYTHON_IHM = _IMP_example.IMP_CONTAINER_HAS_PYTHON_IHM
372 
373 IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_example.IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP
374 
375 IMP_CONTAINER_HAS_ROBIN_MAP = _IMP_example.IMP_CONTAINER_HAS_ROBIN_MAP
376 
377 IMPCONTAINER_SHOW_WARNINGS = _IMP_example.IMPCONTAINER_SHOW_WARNINGS
378 
379 import IMP.container
380 IMP_ATOM_HAS_IMP_CGAL = _IMP_example.IMP_ATOM_HAS_IMP_CGAL
381 
382 IMP_ATOM_HAS_IMP_KERNEL = _IMP_example.IMP_ATOM_HAS_IMP_KERNEL
383 
384 IMP_ATOM_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR
385 
386 IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS
387 
388 IMP_ATOM_HAS_BOOST_RANDOM = _IMP_example.IMP_ATOM_HAS_BOOST_RANDOM
389 
390 IMP_ATOM_HAS_BOOST_REGEX = _IMP_example.IMP_ATOM_HAS_BOOST_REGEX
391 
392 IMP_ATOM_HAS_BOOST_SYSTEM = _IMP_example.IMP_ATOM_HAS_BOOST_SYSTEM
393 
394 IMP_ATOM_HAS_CGAL = _IMP_example.IMP_ATOM_HAS_CGAL
395 
396 IMP_ATOM_HAS_HDF5 = _IMP_example.IMP_ATOM_HAS_HDF5
397 
398 IMP_ATOM_HAS_NUMPY = _IMP_example.IMP_ATOM_HAS_NUMPY
399 
400 IMP_ATOM_HAS_PYTHON_IHM = _IMP_example.IMP_ATOM_HAS_PYTHON_IHM
401 
402 IMPATOM_SHOW_WARNINGS = _IMP_example.IMPATOM_SHOW_WARNINGS
403 
404 IMP_ATOM_TYPE_INDEX = _IMP_example.IMP_ATOM_TYPE_INDEX
405 
406 IMP_RESIDUE_TYPE_INDEX = _IMP_example.IMP_RESIDUE_TYPE_INDEX
407 
408 IMP_HIERARCHY_TYPE_INDEX = _IMP_example.IMP_HIERARCHY_TYPE_INDEX
409 
410 IMP_CHAIN_TYPE_INDEX = _IMP_example.IMP_CHAIN_TYPE_INDEX
411 
412 import IMP.atom
413 IMP_EM_HAS_IMP_CGAL = _IMP_example.IMP_EM_HAS_IMP_CGAL
414 
415 IMP_EM_HAS_IMP_CONTAINER = _IMP_example.IMP_EM_HAS_IMP_CONTAINER
416 
417 IMP_EM_HAS_IMP_DISPLAY = _IMP_example.IMP_EM_HAS_IMP_DISPLAY
418 
419 IMP_EM_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_EM_HAS_IMP_SCORE_FUNCTOR
420 
421 IMP_EM_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_EM_HAS_BOOST_FILESYSTEM
422 
423 IMP_EM_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_EM_HAS_BOOST_PROGRAMOPTIONS
424 
425 IMP_EM_HAS_BOOST_RANDOM = _IMP_example.IMP_EM_HAS_BOOST_RANDOM
426 
427 IMP_EM_HAS_BOOST_REGEX = _IMP_example.IMP_EM_HAS_BOOST_REGEX
428 
429 IMP_EM_HAS_BOOST_SYSTEM = _IMP_example.IMP_EM_HAS_BOOST_SYSTEM
430 
431 IMP_EM_HAS_CGAL = _IMP_example.IMP_EM_HAS_CGAL
432 
433 IMP_EM_HAS_HDF5 = _IMP_example.IMP_EM_HAS_HDF5
434 
435 IMP_EM_HAS_NUMPY = _IMP_example.IMP_EM_HAS_NUMPY
436 
437 IMP_EM_HAS_PYTHON_IHM = _IMP_example.IMP_EM_HAS_PYTHON_IHM
438 
439 IMPEM_SHOW_WARNINGS = _IMP_example.IMPEM_SHOW_WARNINGS
440 
441 import IMP.em
442 IMP_SAXS_HAS_IMP_CGAL = _IMP_example.IMP_SAXS_HAS_IMP_CGAL
443 
444 IMP_SAXS_HAS_IMP_CONTAINER = _IMP_example.IMP_SAXS_HAS_IMP_CONTAINER
445 
446 IMP_SAXS_HAS_IMP_DISPLAY = _IMP_example.IMP_SAXS_HAS_IMP_DISPLAY
447 
448 IMP_SAXS_HAS_IMP_KERNEL = _IMP_example.IMP_SAXS_HAS_IMP_KERNEL
449 
450 IMP_SAXS_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_SAXS_HAS_IMP_SCORE_FUNCTOR
451 
452 IMP_SAXS_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_SAXS_HAS_BOOST_FILESYSTEM
453 
454 IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS
455 
456 IMP_SAXS_HAS_BOOST_RANDOM = _IMP_example.IMP_SAXS_HAS_BOOST_RANDOM
457 
458 IMP_SAXS_HAS_BOOST_REGEX = _IMP_example.IMP_SAXS_HAS_BOOST_REGEX
459 
460 IMP_SAXS_HAS_BOOST_SYSTEM = _IMP_example.IMP_SAXS_HAS_BOOST_SYSTEM
461 
462 IMP_SAXS_HAS_CGAL = _IMP_example.IMP_SAXS_HAS_CGAL
463 
464 IMP_SAXS_HAS_HDF5 = _IMP_example.IMP_SAXS_HAS_HDF5
465 
466 IMP_SAXS_HAS_NUMPY = _IMP_example.IMP_SAXS_HAS_NUMPY
467 
468 IMP_SAXS_HAS_PYTHON_IHM = _IMP_example.IMP_SAXS_HAS_PYTHON_IHM
469 
470 IMPSAXS_SHOW_WARNINGS = _IMP_example.IMPSAXS_SHOW_WARNINGS
471 
472 import IMP.saxs
473 IMP_ISD_HAS_IMP_CGAL = _IMP_example.IMP_ISD_HAS_IMP_CGAL
474 
475 IMP_ISD_HAS_IMP_DISPLAY = _IMP_example.IMP_ISD_HAS_IMP_DISPLAY
476 
477 IMP_ISD_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_ISD_HAS_IMP_SCORE_FUNCTOR
478 
479 IMP_ISD_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_ISD_HAS_BOOST_FILESYSTEM
480 
481 IMP_ISD_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ISD_HAS_BOOST_PROGRAMOPTIONS
482 
483 IMP_ISD_HAS_BOOST_RANDOM = _IMP_example.IMP_ISD_HAS_BOOST_RANDOM
484 
485 IMP_ISD_HAS_BOOST_REGEX = _IMP_example.IMP_ISD_HAS_BOOST_REGEX
486 
487 IMP_ISD_HAS_BOOST_SYSTEM = _IMP_example.IMP_ISD_HAS_BOOST_SYSTEM
488 
489 IMP_ISD_HAS_CGAL = _IMP_example.IMP_ISD_HAS_CGAL
490 
491 IMP_ISD_HAS_HDF5 = _IMP_example.IMP_ISD_HAS_HDF5
492 
493 IMP_ISD_HAS_NUMPY = _IMP_example.IMP_ISD_HAS_NUMPY
494 
495 IMP_ISD_HAS_PYTHON_IHM = _IMP_example.IMP_ISD_HAS_PYTHON_IHM
496 
497 IMPISD_SHOW_WARNINGS = _IMP_example.IMPISD_SHOW_WARNINGS
498 
499 import IMP.isd
500 IMP_RMF_HAS_IMP_CGAL = _IMP_example.IMP_RMF_HAS_IMP_CGAL
501 
502 IMP_RMF_HAS_IMP_EM = _IMP_example.IMP_RMF_HAS_IMP_EM
503 
504 IMP_RMF_HAS_IMP_SAXS = _IMP_example.IMP_RMF_HAS_IMP_SAXS
505 
506 IMP_RMF_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_RMF_HAS_IMP_SCORE_FUNCTOR
507 
508 IMP_RMF_HAS_IMP_STATISTICS = _IMP_example.IMP_RMF_HAS_IMP_STATISTICS
509 
510 IMP_RMF_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_RMF_HAS_BOOST_FILESYSTEM
511 
512 IMP_RMF_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_RMF_HAS_BOOST_PROGRAMOPTIONS
513 
514 IMP_RMF_HAS_BOOST_RANDOM = _IMP_example.IMP_RMF_HAS_BOOST_RANDOM
515 
516 IMP_RMF_HAS_BOOST_REGEX = _IMP_example.IMP_RMF_HAS_BOOST_REGEX
517 
518 IMP_RMF_HAS_BOOST_SYSTEM = _IMP_example.IMP_RMF_HAS_BOOST_SYSTEM
519 
520 IMP_RMF_HAS_CGAL = _IMP_example.IMP_RMF_HAS_CGAL
521 
522 IMP_RMF_HAS_HDF5 = _IMP_example.IMP_RMF_HAS_HDF5
523 
524 IMP_RMF_HAS_NUMPY = _IMP_example.IMP_RMF_HAS_NUMPY
525 
526 IMP_RMF_HAS_PYTHON_IHM = _IMP_example.IMP_RMF_HAS_PYTHON_IHM
527 
528 IMPRMF_SHOW_WARNINGS = _IMP_example.IMPRMF_SHOW_WARNINGS
529 
530 import IMP.rmf
531 import RMF
532 IMP_DOMINO_HAS_IMP_ATOM = _IMP_example.IMP_DOMINO_HAS_IMP_ATOM
533 
534 IMP_DOMINO_HAS_IMP_CGAL = _IMP_example.IMP_DOMINO_HAS_IMP_CGAL
535 
536 IMP_DOMINO_HAS_IMP_EM = _IMP_example.IMP_DOMINO_HAS_IMP_EM
537 
538 IMP_DOMINO_HAS_IMP_ISD = _IMP_example.IMP_DOMINO_HAS_IMP_ISD
539 
540 IMP_DOMINO_HAS_IMP_KERNEL = _IMP_example.IMP_DOMINO_HAS_IMP_KERNEL
541 
542 IMP_DOMINO_HAS_IMP_RMF = _IMP_example.IMP_DOMINO_HAS_IMP_RMF
543 
544 IMP_DOMINO_HAS_IMP_SAXS = _IMP_example.IMP_DOMINO_HAS_IMP_SAXS
545 
546 IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR
547 
548 IMP_DOMINO_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_DOMINO_HAS_BOOST_FILESYSTEM
549 
550 IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS
551 
552 IMP_DOMINO_HAS_BOOST_RANDOM = _IMP_example.IMP_DOMINO_HAS_BOOST_RANDOM
553 
554 IMP_DOMINO_HAS_BOOST_REGEX = _IMP_example.IMP_DOMINO_HAS_BOOST_REGEX
555 
556 IMP_DOMINO_HAS_BOOST_SYSTEM = _IMP_example.IMP_DOMINO_HAS_BOOST_SYSTEM
557 
558 IMP_DOMINO_HAS_CGAL = _IMP_example.IMP_DOMINO_HAS_CGAL
559 
560 IMP_DOMINO_HAS_HDF5 = _IMP_example.IMP_DOMINO_HAS_HDF5
561 
562 IMP_DOMINO_HAS_NUMPY = _IMP_example.IMP_DOMINO_HAS_NUMPY
563 
564 IMP_DOMINO_HAS_RMF = _IMP_example.IMP_DOMINO_HAS_RMF
565 
566 IMP_DOMINO_HAS_PYTHON_IHM = _IMP_example.IMP_DOMINO_HAS_PYTHON_IHM
567 
568 IMPDOMINO_SHOW_WARNINGS = _IMP_example.IMPDOMINO_SHOW_WARNINGS
569 
570 import RMF_HDF5
571 import IMP.domino
572 IMP_EXAMPLE_HAS_IMP_ALGEBRA = _IMP_example.IMP_EXAMPLE_HAS_IMP_ALGEBRA
573 
574 IMP_EXAMPLE_HAS_IMP_CGAL = _IMP_example.IMP_EXAMPLE_HAS_IMP_CGAL
575 
576 IMP_EXAMPLE_HAS_IMP_DISPLAY = _IMP_example.IMP_EXAMPLE_HAS_IMP_DISPLAY
577 
578 IMP_EXAMPLE_HAS_IMP_EM = _IMP_example.IMP_EXAMPLE_HAS_IMP_EM
579 
580 IMP_EXAMPLE_HAS_IMP_ISD = _IMP_example.IMP_EXAMPLE_HAS_IMP_ISD
581 
582 IMP_EXAMPLE_HAS_IMP_KERNEL = _IMP_example.IMP_EXAMPLE_HAS_IMP_KERNEL
583 
584 IMP_EXAMPLE_HAS_IMP_RMF = _IMP_example.IMP_EXAMPLE_HAS_IMP_RMF
585 
586 IMP_EXAMPLE_HAS_IMP_SAXS = _IMP_example.IMP_EXAMPLE_HAS_IMP_SAXS
587 
588 IMP_EXAMPLE_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_EXAMPLE_HAS_IMP_SCORE_FUNCTOR
589 
590 IMP_EXAMPLE_HAS_IMP_STATISTICS = _IMP_example.IMP_EXAMPLE_HAS_IMP_STATISTICS
591 
592 IMP_EXAMPLE_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_FILESYSTEM
593 
594 IMP_EXAMPLE_HAS_BOOST_GRAPH = _IMP_example.IMP_EXAMPLE_HAS_BOOST_GRAPH
595 
596 IMP_EXAMPLE_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_EXAMPLE_HAS_BOOST_PROGRAMOPTIONS
597 
598 IMP_EXAMPLE_HAS_BOOST_RANDOM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_RANDOM
599 
600 IMP_EXAMPLE_HAS_BOOST_REGEX = _IMP_example.IMP_EXAMPLE_HAS_BOOST_REGEX
601 
602 IMP_EXAMPLE_HAS_BOOST_SYSTEM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_SYSTEM
603 
604 IMP_EXAMPLE_HAS_CGAL = _IMP_example.IMP_EXAMPLE_HAS_CGAL
605 
606 IMP_EXAMPLE_HAS_HDF5 = _IMP_example.IMP_EXAMPLE_HAS_HDF5
607 
608 IMP_EXAMPLE_HAS_NUMPY = _IMP_example.IMP_EXAMPLE_HAS_NUMPY
609 
610 IMP_EXAMPLE_HAS_RMF = _IMP_example.IMP_EXAMPLE_HAS_RMF
611 
612 IMP_EXAMPLE_HAS_PYTHON_IHM = _IMP_example.IMP_EXAMPLE_HAS_PYTHON_IHM
613 
614 IMP_EXAMPLE_HAS_EXAMPLEDEPENDENCY = _IMP_example.IMP_EXAMPLE_HAS_EXAMPLEDEPENDENCY
615 
616 IMPEXAMPLE_SHOW_WARNINGS = _IMP_example.IMPEXAMPLE_SHOW_WARNINGS
617 
618 
619 _object_types.append("ExampleRestraint")
620 
621 
622 def _object_cast_to_ExampleRestraint(o):
623  r"""_object_cast_to_ExampleRestraint(Object o) -> ExampleRestraint"""
624  return _IMP_example._object_cast_to_ExampleRestraint(o)
625 
626 def ExampleDecorators(l=[]):
627  return [ExampleDecorator(x) for x in l]
628 _plural_types.append("ExampleDecorators")
629 
630 
631 _value_types.append("ExampleDecorator")
632 
633 
634 _object_types.append("ExampleUnaryFunction")
635 
636 
637 def _object_cast_to_ExampleUnaryFunction(o):
638  r"""_object_cast_to_ExampleUnaryFunction(Object o) -> ExampleUnaryFunction"""
639  return _IMP_example._object_cast_to_ExampleUnaryFunction(o)
640 
641 _object_types.append("ExampleSingletonModifier")
642 
643 
644 def _object_cast_to_ExampleSingletonModifier(o):
645  r"""_object_cast_to_ExampleSingletonModifier(Object o) -> ExampleSingletonModifier"""
646  return _IMP_example._object_cast_to_ExampleSingletonModifier(o)
647 
648 _object_types.append("ExamplePairScore")
649 
650 
651 def _object_cast_to_ExamplePairScore(o):
652  r"""_object_cast_to_ExamplePairScore(Object o) -> ExamplePairScore"""
653  return _IMP_example._object_cast_to_ExamplePairScore(o)
654 
655 _object_types.append("ExampleSubsetFilterTable")
656 
657 
658 def _object_cast_to_ExampleSubsetFilterTable(o):
659  r"""_object_cast_to_ExampleSubsetFilterTable(Object o) -> ExampleSubsetFilterTable"""
660  return _IMP_example._object_cast_to_ExampleSubsetFilterTable(o)
661 
662 _object_types.append("ExampleConstraint")
663 
664 
665 def _object_cast_to_ExampleConstraint(o):
666  r"""_object_cast_to_ExampleConstraint(Object o) -> ExampleConstraint"""
667  return _IMP_example._object_cast_to_ExampleConstraint(o)
668 
669 _object_types.append("ExampleObject")
670 
671 
672 def _object_cast_to_ExampleObject(o):
673  r"""_object_cast_to_ExampleObject(Object o) -> ExampleObject"""
674  return _IMP_example._object_cast_to_ExampleObject(o)
675 
676 ExampleTemplateClass3Ds=list
677 _plural_types.append("ExampleTemplateClass3Ds")
678 _value_types.append("ExampleTemplateClass3D")
679 
680 
681 def create_model_and_particles():
682  m = IMP.Model()
685  IMP.algebra.Vector3D(10,10,10))
686  for i in range(0,100):
687  p = m.add_particle("p")
688  sc.add(p)
691  d.set_coordinates_are_optimized(True)
692  return (m, sc)
693 
694 
695 
697  """An example restraint written in Python.
698  This should be functionally equivalent to the C++ ExampleRestraint.
699  """
700  def __init__(self, m, p, k):
701  IMP.Restraint.__init__(self, m, "PythonExampleRestraint%1%")
702  self.p, self.k = p, k
703 
704  def do_add_score_and_derivatives(self, sa):
705  d = IMP.core.XYZ(self.get_model(), self.p)
706  score = .5 * self.k * d.get_z() * d.get_z()
707  if sa.get_derivative_accumulator():
708  deriv = self.k * d.get_z()
709  d.add_to_derivative(2, deriv, sa.get_derivative_accumulator())
710  sa.add_score(score)
711 
712  def do_get_inputs(self):
713  return [self.get_model().get_particle(self.p)]
714 
715 
716 
717 
719  """An example PairScore written in Python.
720  This should be functionally equivalent to the C++ ExamplePairScore.
721  """
722  def __init__(self, x0, k):
723  IMP.PairScore.__init__(self)
724  self.x0, self.k = x0, k
725 
726  def evaluate_index(self, m, pip, da):
727  d0 = IMP.core.XYZ(m, pip[0])
728  d1 = IMP.core.XYZ(m, pip[1])
729  diff = (d0.get_coordinates()
730  - d1.get_coordinates()).get_magnitude() - self.x0
731  score = .5 * self.k * diff * diff
732  if da:
733 # derivatives are requested
734  delta = d0.get_coordinates() - d1.get_coordinates()
735  udelta = delta.get_unit_vector()
736  dv = self.k * diff
737  d0.add_to_derivatives(udelta * dv, da)
738  d1.add_to_derivatives(-udelta * dv, da)
739  return score
740 
741  def do_get_inputs(self, m, pis):
742  return IMP.get_particles(m, pis)
743 
744 
745 
746 
748  """An example UnaryFunction written in Python.
749  This should be functionally equivalent to the C++ ExampleUnaryFunction.
750  """
751  def __init__(self, center, k):
752  IMP.UnaryFunction.__init__(self)
753  self.center, self.k = center, k
754 
755  def evaluate_with_derivative(self, feature):
756  return (self.evaluate(feature), self.k * (feature - self.center))
757 
758  def evaluate(self, feature):
759  return .5 * self.k * (feature - self.center) * (feature - self.center)
760 
761 
762 
763 
765  """An example Constraint written in Python.
766  This should be functionally equivalent to the C++ ExampleConstraint.
767  """
768 
769  k = None
770 
771  def __init__(self, p):
772  IMP.Constraint.__init__(self, p.get_model(), "ExampleConstraint%1%")
773  self.p = p
774  if self.k is None:
775  PythonExampleConstraint.k = IMP.IntKey("Constraint key")
776  if not p.has_attribute(self.k):
777  p.add_attribute(self.k, 0)
778 
779  def do_update_attributes(self):
780  self.p.set_value(self.k, self.p.get_value(self.k) + 1)
781 
782  def do_update_derivatives(self, da):
783  pass
784 
785  def do_get_inputs(self):
786  return [self.p]
787 
788  def do_get_outputs(self):
789  return [self.p]
790 
791 
792 
793 
795  """An example SingletonModifier written in Python.
796  This should be functionally equivalent to the C++
797  ExampleSingletonModifier.
798  """
799 
800  def __init__(self, bb):
801  IMP.SingletonModifier.__init__(self, "ExampleSingletonModifier%1%")
802  self.bb = bb
803 
804  def apply_index(self, m, pi):
805  d = IMP.core.XYZ(m, pi)
806  for i in range(3):
807 # shift the coordinate until it is in the box
808  while d.get_coordinate(i) < self.bb.get_corner(0)[i]:
809  d.set_coordinate(i,d.get_coordinate(i) + \
810  (self.bb.get_corner(1)[i] - self.bb.get_corner(0)[i]))
811  while d.get_coordinate(i) > self.bb.get_corner(1)[i]:
812  d.set_coordinate(i,d.get_coordinate(i) - \
813  (self.bb.get_corner(1)[i] - self.bb.get_corner(0)[i]))
814 
815  def do_get_inputs(self, m, pis):
816  return IMP.get_particles(m, pis)
817 
818  def do_get_outputs(self, m, pis):
819  return self.do_get_inputs(m, pis)
820 
821 
823  r"""Proxy of C++ IMP::example::ExampleRestraint class."""
824 
825  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
826 
827  def __init__(self, *args):
828  r"""
829  __init__(ExampleRestraint self, Model m, ParticleIndex p, double k) -> ExampleRestraint
830  __init__(ExampleRestraint self) -> ExampleRestraint
831  """
832  _IMP_example.ExampleRestraint_swiginit(self, _IMP_example.new_ExampleRestraint(*args))
833 
834  def do_add_score_and_derivatives(self, sa):
835  r"""do_add_score_and_derivatives(ExampleRestraint self, ScoreAccumulator sa)"""
836  return _IMP_example.ExampleRestraint_do_add_score_and_derivatives(self, sa)
837 
838  def do_get_inputs(self):
839  r"""do_get_inputs(ExampleRestraint self) -> IMP::ModelObjectsTemp"""
840  return _IMP_example.ExampleRestraint_do_get_inputs(self)
841 
842  def get_version_info(self):
843  r"""get_version_info(ExampleRestraint self) -> VersionInfo"""
844  return _IMP_example.ExampleRestraint_get_version_info(self)
845  __swig_destroy__ = _IMP_example.delete_ExampleRestraint
846 
847  def __str__(self):
848  r"""__str__(ExampleRestraint self) -> std::string"""
849  return _IMP_example.ExampleRestraint___str__(self)
850 
851  def __repr__(self):
852  r"""__repr__(ExampleRestraint self) -> std::string"""
853  return _IMP_example.ExampleRestraint___repr__(self)
854 
855  @staticmethod
856  def get_from(o):
857  return _object_cast_to_ExampleRestraint(o)
858 
859 
860  def _get_as_binary(self):
861  r"""_get_as_binary(ExampleRestraint self) -> PyObject *"""
862  return _IMP_example.ExampleRestraint__get_as_binary(self)
863 
864  def _set_from_binary(self, p):
865  r"""_set_from_binary(ExampleRestraint self, PyObject * p)"""
866  return _IMP_example.ExampleRestraint__set_from_binary(self, p)
867 
868  def __getstate__(self):
869  p = self._get_as_binary()
870  if len(self.__dict__) > 1:
871  d = self.__dict__.copy()
872  del d['this']
873  p = (d, p)
874  return p
875 
876  def __setstate__(self, p):
877  if not hasattr(self, 'this'):
878  self.__init__()
879  if isinstance(p, tuple):
880  d, p = p
881  self.__dict__.update(d)
882  return self._set_from_binary(p)
883 
884 
885 # Register ExampleRestraint in _IMP_example:
886 _IMP_example.ExampleRestraint_swigregister(ExampleRestraint)
888  r"""Proxy of C++ IMP::example::ExampleDecorator class."""
889 
890  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
891 
892  def get_decorator_name(self):
893  r"""get_decorator_name(ExampleDecorator self) -> std::string"""
894  return _IMP_example.ExampleDecorator_get_decorator_name(self)
895 
896  def set_decorator_name(self, nm):
897  r"""set_decorator_name(ExampleDecorator self, std::string nm)"""
898  return _IMP_example.ExampleDecorator_set_decorator_name(self, nm)
899 
900  def __init__(self, *args):
901  r"""
902  __init__(ExampleDecorator self) -> ExampleDecorator
903  __init__(ExampleDecorator self, Model m, ParticleIndex id) -> ExampleDecorator
904  __init__(ExampleDecorator self, _ParticleAdaptor d) -> ExampleDecorator
905  """
906  _IMP_example.ExampleDecorator_swiginit(self, _IMP_example.new_ExampleDecorator(*args))
907 
908  @staticmethod
909  def get_is_setup(*args):
910  r"""
911  get_is_setup(Model m, ParticleIndex pi) -> bool
912  get_is_setup(_ParticleAdaptor p) -> bool
913  """
914  return _IMP_example.ExampleDecorator_get_is_setup(*args)
915 
916  def show(self, *args):
917  r"""show(ExampleDecorator self, _ostream out=std::cout)"""
918  return _IMP_example.ExampleDecorator_show(self, *args)
919 
920  @staticmethod
921  def setup_particle(*args):
922  r"""
923  setup_particle(Model m, ParticleIndex pi, std::string name) -> ExampleDecorator
924  setup_particle(_ParticleAdaptor pa, std::string name) -> ExampleDecorator
925  """
926  return _IMP_example.ExampleDecorator_setup_particle(*args)
927 
928  def add_attribute(self, *args):
929  r"""
930  add_attribute(ExampleDecorator self, FloatKey k, IMP::Float v, bool opt)
931  add_attribute(ExampleDecorator self, FloatKey a0, IMP::Float a1)
932  add_attribute(ExampleDecorator self, IntKey a0, IMP::Int a1)
933  add_attribute(ExampleDecorator self, FloatsKey a0, IMP::Floats a1)
934  add_attribute(ExampleDecorator self, IntsKey a0, IMP::Ints a1)
935  add_attribute(ExampleDecorator self, StringKey a0, IMP::String a1)
936  add_attribute(ExampleDecorator self, ParticleIndexKey a0, Particle a1)
937  add_attribute(ExampleDecorator self, ObjectKey a0, Object a1)
938  add_attribute(ExampleDecorator self, SparseFloatKey a0, IMP::Float a1)
939  add_attribute(ExampleDecorator self, SparseIntKey a0, IMP::Int a1)
940  add_attribute(ExampleDecorator self, SparseStringKey a0, IMP::String a1)
941  add_attribute(ExampleDecorator self, SparseParticleIndexKey a0, ParticleIndex a1)
942  """
943  return _IMP_example.ExampleDecorator_add_attribute(self, *args)
944 
945  def get_value(self, *args):
946  r"""
947  get_value(ExampleDecorator self, FloatKey a0) -> IMP::Float
948  get_value(ExampleDecorator self, IntKey a0) -> IMP::Int
949  get_value(ExampleDecorator self, FloatsKey a0) -> IMP::Floats
950  get_value(ExampleDecorator self, IntsKey a0) -> IMP::Ints
951  get_value(ExampleDecorator self, StringKey a0) -> IMP::String
952  get_value(ExampleDecorator self, ParticleIndexKey a0) -> Particle
953  get_value(ExampleDecorator self, ObjectKey a0) -> Object
954  get_value(ExampleDecorator self, SparseFloatKey a0) -> IMP::Float
955  get_value(ExampleDecorator self, SparseIntKey a0) -> IMP::Int
956  get_value(ExampleDecorator self, SparseStringKey a0) -> IMP::String
957  get_value(ExampleDecorator self, SparseParticleIndexKey a0) -> ParticleIndex
958  """
959  return _IMP_example.ExampleDecorator_get_value(self, *args)
960 
961  def set_value(self, *args):
962  r"""
963  set_value(ExampleDecorator self, FloatKey a0, IMP::Float a1)
964  set_value(ExampleDecorator self, IntKey a0, IMP::Int a1)
965  set_value(ExampleDecorator self, FloatsKey a0, IMP::Floats a1)
966  set_value(ExampleDecorator self, IntsKey a0, IMP::Ints a1)
967  set_value(ExampleDecorator self, StringKey a0, IMP::String a1)
968  set_value(ExampleDecorator self, ParticleIndexKey a0, Particle a1)
969  set_value(ExampleDecorator self, ObjectKey a0, Object a1)
970  set_value(ExampleDecorator self, SparseFloatKey a0, IMP::Float a1)
971  set_value(ExampleDecorator self, SparseIntKey a0, IMP::Int a1)
972  set_value(ExampleDecorator self, SparseStringKey a0, IMP::String a1)
973  set_value(ExampleDecorator self, SparseParticleIndexKey a0, ParticleIndex a1)
974  """
975  return _IMP_example.ExampleDecorator_set_value(self, *args)
976 
977  def remove_attribute(self, *args):
978  r"""
979  remove_attribute(ExampleDecorator self, FloatKey a0)
980  remove_attribute(ExampleDecorator self, IntKey a0)
981  remove_attribute(ExampleDecorator self, FloatsKey a0)
982  remove_attribute(ExampleDecorator self, IntsKey a0)
983  remove_attribute(ExampleDecorator self, StringKey a0)
984  remove_attribute(ExampleDecorator self, ParticleIndexKey a0)
985  remove_attribute(ExampleDecorator self, ObjectKey a0)
986  remove_attribute(ExampleDecorator self, SparseFloatKey a0)
987  remove_attribute(ExampleDecorator self, SparseIntKey a0)
988  remove_attribute(ExampleDecorator self, SparseStringKey a0)
989  remove_attribute(ExampleDecorator self, SparseParticleIndexKey a0)
990  """
991  return _IMP_example.ExampleDecorator_remove_attribute(self, *args)
992 
993  def has_attribute(self, *args):
994  r"""
995  has_attribute(ExampleDecorator self, FloatKey a0) -> bool
996  has_attribute(ExampleDecorator self, IntKey a0) -> bool
997  has_attribute(ExampleDecorator self, FloatsKey a0) -> bool
998  has_attribute(ExampleDecorator self, IntsKey a0) -> bool
999  has_attribute(ExampleDecorator self, StringKey a0) -> bool
1000  has_attribute(ExampleDecorator self, ParticleIndexKey a0) -> bool
1001  has_attribute(ExampleDecorator self, ObjectKey a0) -> bool
1002  has_attribute(ExampleDecorator self, SparseFloatKey a0) -> bool
1003  has_attribute(ExampleDecorator self, SparseIntKey a0) -> bool
1004  has_attribute(ExampleDecorator self, SparseStringKey a0) -> bool
1005  has_attribute(ExampleDecorator self, SparseParticleIndexKey a0) -> bool
1006  """
1007  return _IMP_example.ExampleDecorator_has_attribute(self, *args)
1008 
1009  def get_derivative(self, a0):
1010  r"""get_derivative(ExampleDecorator self, FloatKey a0) -> double"""
1011  return _IMP_example.ExampleDecorator_get_derivative(self, a0)
1012 
1013  def get_name(self):
1014  r"""get_name(ExampleDecorator self) -> std::string"""
1015  return _IMP_example.ExampleDecorator_get_name(self)
1016 
1017  def clear_caches(self):
1018  r"""clear_caches(ExampleDecorator self)"""
1019  return _IMP_example.ExampleDecorator_clear_caches(self)
1020 
1021  def set_name(self, a0):
1022  r"""set_name(ExampleDecorator self, std::string a0)"""
1023  return _IMP_example.ExampleDecorator_set_name(self, a0)
1024 
1025  def set_check_level(self, a0):
1026  r"""set_check_level(ExampleDecorator self, IMP::CheckLevel a0)"""
1027  return _IMP_example.ExampleDecorator_set_check_level(self, a0)
1028 
1029  def add_to_derivative(self, a0, a1, a2):
1030  r"""add_to_derivative(ExampleDecorator self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
1031  return _IMP_example.ExampleDecorator_add_to_derivative(self, a0, a1, a2)
1032 
1033  def set_is_optimized(self, a0, a1):
1034  r"""set_is_optimized(ExampleDecorator self, FloatKey a0, bool a1)"""
1035  return _IMP_example.ExampleDecorator_set_is_optimized(self, a0, a1)
1036 
1037  def get_is_optimized(self, a0):
1038  r"""get_is_optimized(ExampleDecorator self, FloatKey a0) -> bool"""
1039  return _IMP_example.ExampleDecorator_get_is_optimized(self, a0)
1040 
1041  def get_check_level(self):
1042  r"""get_check_level(ExampleDecorator self) -> IMP::CheckLevel"""
1043  return _IMP_example.ExampleDecorator_get_check_level(self)
1044 
1045  def __eq__(self, *args):
1046  r"""
1047  __eq__(ExampleDecorator self, ExampleDecorator o) -> bool
1048  __eq__(ExampleDecorator self, Particle d) -> bool
1049  """
1050  return _IMP_example.ExampleDecorator___eq__(self, *args)
1051 
1052  def __ne__(self, *args):
1053  r"""
1054  __ne__(ExampleDecorator self, ExampleDecorator o) -> bool
1055  __ne__(ExampleDecorator self, Particle d) -> bool
1056  """
1057  return _IMP_example.ExampleDecorator___ne__(self, *args)
1058 
1059  def __le__(self, *args):
1060  r"""
1061  __le__(ExampleDecorator self, ExampleDecorator o) -> bool
1062  __le__(ExampleDecorator self, Particle d) -> bool
1063  """
1064  return _IMP_example.ExampleDecorator___le__(self, *args)
1065 
1066  def __lt__(self, *args):
1067  r"""
1068  __lt__(ExampleDecorator self, ExampleDecorator o) -> bool
1069  __lt__(ExampleDecorator self, Particle d) -> bool
1070  """
1071  return _IMP_example.ExampleDecorator___lt__(self, *args)
1072 
1073  def __ge__(self, *args):
1074  r"""
1075  __ge__(ExampleDecorator self, ExampleDecorator o) -> bool
1076  __ge__(ExampleDecorator self, Particle d) -> bool
1077  """
1078  return _IMP_example.ExampleDecorator___ge__(self, *args)
1079 
1080  def __gt__(self, *args):
1081  r"""
1082  __gt__(ExampleDecorator self, ExampleDecorator o) -> bool
1083  __gt__(ExampleDecorator self, Particle d) -> bool
1084  """
1085  return _IMP_example.ExampleDecorator___gt__(self, *args)
1086 
1087  def __hash__(self):
1088  r"""__hash__(ExampleDecorator self) -> std::size_t"""
1089  return _IMP_example.ExampleDecorator___hash__(self)
1090 
1091  def __str__(self):
1092  r"""__str__(ExampleDecorator self) -> std::string"""
1093  return _IMP_example.ExampleDecorator___str__(self)
1094 
1095  def __repr__(self):
1096  r"""__repr__(ExampleDecorator self) -> std::string"""
1097  return _IMP_example.ExampleDecorator___repr__(self)
1098 
1099  def _get_as_binary(self):
1100  r"""_get_as_binary(ExampleDecorator self) -> PyObject *"""
1101  return _IMP_example.ExampleDecorator__get_as_binary(self)
1102 
1103  def _set_from_binary(self, p):
1104  r"""_set_from_binary(ExampleDecorator self, PyObject * p)"""
1105  return _IMP_example.ExampleDecorator__set_from_binary(self, p)
1106 
1107  def __getstate__(self):
1108  p = self._get_as_binary()
1109  if len(self.__dict__) > 1:
1110  d = self.__dict__.copy()
1111  del d['this']
1112  p = (d, p)
1113  return p
1114 
1115  def __setstate__(self, p):
1116  if not hasattr(self, 'this'):
1117  self.__init__()
1118  if isinstance(p, tuple):
1119  d, p = p
1120  self.__dict__.update(d)
1121  return self._set_from_binary(p)
1122 
1123  __swig_destroy__ = _IMP_example.delete_ExampleDecorator
1124 
1125 # Register ExampleDecorator in _IMP_example:
1126 _IMP_example.ExampleDecorator_swigregister(ExampleDecorator)
1127 
1128 def __lshift__(out, n):
1129  r"""__lshift__(_ostream out, ExampleDecorator n) -> _ostream"""
1130  return _IMP_example.__lshift__(out, n)
1132  r"""Proxy of C++ IMP::example::ExampleUnaryFunction class."""
1133 
1134  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1135 
1136  def __init__(self, *args):
1137  r"""
1138  __init__(ExampleUnaryFunction self, IMP::Float center, IMP::Float k) -> ExampleUnaryFunction
1139  __init__(ExampleUnaryFunction self) -> ExampleUnaryFunction
1140  """
1141  _IMP_example.ExampleUnaryFunction_swiginit(self, _IMP_example.new_ExampleUnaryFunction(*args))
1142 
1143  def get_version_info(self):
1144  r"""get_version_info(ExampleUnaryFunction self) -> VersionInfo"""
1145  return _IMP_example.ExampleUnaryFunction_get_version_info(self)
1146  __swig_destroy__ = _IMP_example.delete_ExampleUnaryFunction
1147 
1148  def __str__(self):
1149  r"""__str__(ExampleUnaryFunction self) -> std::string"""
1150  return _IMP_example.ExampleUnaryFunction___str__(self)
1151 
1152  def __repr__(self):
1153  r"""__repr__(ExampleUnaryFunction self) -> std::string"""
1154  return _IMP_example.ExampleUnaryFunction___repr__(self)
1155 
1156  @staticmethod
1157  def get_from(o):
1158  return _object_cast_to_ExampleUnaryFunction(o)
1159 
1160 
1161  def _get_as_binary(self):
1162  r"""_get_as_binary(ExampleUnaryFunction self) -> PyObject *"""
1163  return _IMP_example.ExampleUnaryFunction__get_as_binary(self)
1164 
1165  def _set_from_binary(self, p):
1166  r"""_set_from_binary(ExampleUnaryFunction self, PyObject * p)"""
1167  return _IMP_example.ExampleUnaryFunction__set_from_binary(self, p)
1168 
1169  def __getstate__(self):
1170  p = self._get_as_binary()
1171  if len(self.__dict__) > 1:
1172  d = self.__dict__.copy()
1173  del d['this']
1174  p = (d, p)
1175  return p
1176 
1177  def __setstate__(self, p):
1178  if not hasattr(self, 'this'):
1179  self.__init__()
1180  if isinstance(p, tuple):
1181  d, p = p
1182  self.__dict__.update(d)
1183  return self._set_from_binary(p)
1184 
1185 
1186 # Register ExampleUnaryFunction in _IMP_example:
1187 _IMP_example.ExampleUnaryFunction_swigregister(ExampleUnaryFunction)
1188 class ExampleObject(IMP.Object):
1189  r"""Proxy of C++ IMP::example::ExampleObject class."""
1190 
1191  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1192 
1193  def __init__(self, *args):
1194  r"""
1195  __init__(ExampleObject self, IMP::Floats const & data) -> ExampleObject
1196  __init__(ExampleObject self) -> ExampleObject
1197  """
1198  _IMP_example.ExampleObject_swiginit(self, _IMP_example.new_ExampleObject(*args))
1199 
1200  def get_data(self, i):
1201  r"""get_data(ExampleObject self, unsigned int i) -> double"""
1202  return _IMP_example.ExampleObject_get_data(self, i)
1203 
1204  def get_version_info(self):
1205  r"""get_version_info(ExampleObject self) -> VersionInfo"""
1206  return _IMP_example.ExampleObject_get_version_info(self)
1207  __swig_destroy__ = _IMP_example.delete_ExampleObject
1208 
1209  def __str__(self):
1210  r"""__str__(ExampleObject self) -> std::string"""
1211  return _IMP_example.ExampleObject___str__(self)
1212 
1213  def __repr__(self):
1214  r"""__repr__(ExampleObject self) -> std::string"""
1215  return _IMP_example.ExampleObject___repr__(self)
1216 
1217  @staticmethod
1218  def get_from(o):
1219  return _object_cast_to_ExampleObject(o)
1220 
1221 
1222  def _get_as_binary(self):
1223  r"""_get_as_binary(ExampleObject self) -> PyObject *"""
1224  return _IMP_example.ExampleObject__get_as_binary(self)
1225 
1226  def _set_from_binary(self, p):
1227  r"""_set_from_binary(ExampleObject self, PyObject * p)"""
1228  return _IMP_example.ExampleObject__set_from_binary(self, p)
1229 
1230  def __getstate__(self):
1231  p = self._get_as_binary()
1232  if len(self.__dict__) > 1:
1233  d = self.__dict__.copy()
1234  del d['this']
1235  p = (d, p)
1236  return p
1237 
1238  def __setstate__(self, p):
1239  if not hasattr(self, 'this'):
1240  self.__init__()
1241  if isinstance(p, tuple):
1242  d, p = p
1243  self.__dict__.update(d)
1244  return self._set_from_binary(p)
1245 
1246 
1247 # Register ExampleObject in _IMP_example:
1248 _IMP_example.ExampleObject_swigregister(ExampleObject)
1250  r"""Proxy of C++ IMP::example::ExampleSingletonModifier class."""
1251 
1252  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1253 
1254  def __init__(self, *args):
1255  r"""
1256  __init__(ExampleSingletonModifier self, BoundingBox3D bb) -> ExampleSingletonModifier
1257  __init__(ExampleSingletonModifier self) -> ExampleSingletonModifier
1258  """
1259  _IMP_example.ExampleSingletonModifier_swiginit(self, _IMP_example.new_ExampleSingletonModifier(*args))
1260 
1261  def do_get_inputs(self, m, pis):
1262  r"""do_get_inputs(ExampleSingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1263  return _IMP_example.ExampleSingletonModifier_do_get_inputs(self, m, pis)
1264 
1265  def do_get_outputs(self, m, pis):
1266  r"""do_get_outputs(ExampleSingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1267  return _IMP_example.ExampleSingletonModifier_do_get_outputs(self, m, pis)
1268 
1269  def get_version_info(self):
1270  r"""get_version_info(ExampleSingletonModifier self) -> VersionInfo"""
1271  return _IMP_example.ExampleSingletonModifier_get_version_info(self)
1272  __swig_destroy__ = _IMP_example.delete_ExampleSingletonModifier
1273 
1274  def __str__(self):
1275  r"""__str__(ExampleSingletonModifier self) -> std::string"""
1276  return _IMP_example.ExampleSingletonModifier___str__(self)
1277 
1278  def __repr__(self):
1279  r"""__repr__(ExampleSingletonModifier self) -> std::string"""
1280  return _IMP_example.ExampleSingletonModifier___repr__(self)
1281 
1282  @staticmethod
1283  def get_from(o):
1284  return _object_cast_to_ExampleSingletonModifier(o)
1285 
1286 
1287  def _get_as_binary(self):
1288  r"""_get_as_binary(ExampleSingletonModifier self) -> PyObject *"""
1289  return _IMP_example.ExampleSingletonModifier__get_as_binary(self)
1290 
1291  def _set_from_binary(self, p):
1292  r"""_set_from_binary(ExampleSingletonModifier self, PyObject * p)"""
1293  return _IMP_example.ExampleSingletonModifier__set_from_binary(self, p)
1294 
1295  def __getstate__(self):
1296  p = self._get_as_binary()
1297  if len(self.__dict__) > 1:
1298  d = self.__dict__.copy()
1299  del d['this']
1300  p = (d, p)
1301  return p
1302 
1303  def __setstate__(self, p):
1304  if not hasattr(self, 'this'):
1305  self.__init__()
1306  if isinstance(p, tuple):
1307  d, p = p
1308  self.__dict__.update(d)
1309  return self._set_from_binary(p)
1310 
1311 
1312 # Register ExampleSingletonModifier in _IMP_example:
1313 _IMP_example.ExampleSingletonModifier_swigregister(ExampleSingletonModifier)
1315  r"""Proxy of C++ IMP::example::ExamplePairScore class."""
1316 
1317  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1318 
1319  def __init__(self, *args):
1320  r"""
1321  __init__(ExamplePairScore self, double x0, double k) -> ExamplePairScore
1322  __init__(ExamplePairScore self) -> ExamplePairScore
1323  """
1324  _IMP_example.ExamplePairScore_swiginit(self, _IMP_example.new_ExamplePairScore(*args))
1325 
1326  def do_get_inputs(self, m, pis):
1327  r"""do_get_inputs(ExamplePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1328  return _IMP_example.ExamplePairScore_do_get_inputs(self, m, pis)
1329 
1330  def get_version_info(self):
1331  r"""get_version_info(ExamplePairScore self) -> VersionInfo"""
1332  return _IMP_example.ExamplePairScore_get_version_info(self)
1333  __swig_destroy__ = _IMP_example.delete_ExamplePairScore
1334 
1335  def __str__(self):
1336  r"""__str__(ExamplePairScore self) -> std::string"""
1337  return _IMP_example.ExamplePairScore___str__(self)
1338 
1339  def __repr__(self):
1340  r"""__repr__(ExamplePairScore self) -> std::string"""
1341  return _IMP_example.ExamplePairScore___repr__(self)
1342 
1343  @staticmethod
1344  def get_from(o):
1345  return _object_cast_to_ExamplePairScore(o)
1346 
1347 
1348  def _get_as_binary(self):
1349  r"""_get_as_binary(ExamplePairScore self) -> PyObject *"""
1350  return _IMP_example.ExamplePairScore__get_as_binary(self)
1351 
1352  def _set_from_binary(self, p):
1353  r"""_set_from_binary(ExamplePairScore self, PyObject * p)"""
1354  return _IMP_example.ExamplePairScore__set_from_binary(self, p)
1355 
1356  def __getstate__(self):
1357  p = self._get_as_binary()
1358  if len(self.__dict__) > 1:
1359  d = self.__dict__.copy()
1360  del d['this']
1361  p = (d, p)
1362  return p
1363 
1364  def __setstate__(self, p):
1365  if not hasattr(self, 'this'):
1366  self.__init__()
1367  if isinstance(p, tuple):
1368  d, p = p
1369  self.__dict__.update(d)
1370  return self._set_from_binary(p)
1371 
1372 
1373 # Register ExamplePairScore in _IMP_example:
1374 _IMP_example.ExamplePairScore_swigregister(ExamplePairScore)
1376  r"""Proxy of C++ IMP::example::ExampleSubsetFilterTable class."""
1377 
1378  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1379 
1380  def __init__(self, max_diff, pt):
1381  r"""__init__(ExampleSubsetFilterTable self, unsigned int max_diff, IMP::ParticlesTemp const & pt) -> ExampleSubsetFilterTable"""
1382  _IMP_example.ExampleSubsetFilterTable_swiginit(self, _IMP_example.new_ExampleSubsetFilterTable(max_diff, pt))
1383 
1384  def get_version_info(self):
1385  r"""get_version_info(ExampleSubsetFilterTable self) -> VersionInfo"""
1386  return _IMP_example.ExampleSubsetFilterTable_get_version_info(self)
1387  __swig_destroy__ = _IMP_example.delete_ExampleSubsetFilterTable
1388 
1389  def __str__(self):
1390  r"""__str__(ExampleSubsetFilterTable self) -> std::string"""
1391  return _IMP_example.ExampleSubsetFilterTable___str__(self)
1392 
1393  def __repr__(self):
1394  r"""__repr__(ExampleSubsetFilterTable self) -> std::string"""
1395  return _IMP_example.ExampleSubsetFilterTable___repr__(self)
1396 
1397  @staticmethod
1398  def get_from(o):
1399  return _object_cast_to_ExampleSubsetFilterTable(o)
1400 
1401 
1402 # Register ExampleSubsetFilterTable in _IMP_example:
1403 _IMP_example.ExampleSubsetFilterTable_swigregister(ExampleSubsetFilterTable)
1405  r"""Proxy of C++ IMP::example::ExampleConstraint class."""
1406 
1407  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1408 
1409  def __init__(self, *args):
1410  r"""
1411  __init__(ExampleConstraint self, Particle p) -> ExampleConstraint
1412  __init__(ExampleConstraint self) -> ExampleConstraint
1413  """
1414  _IMP_example.ExampleConstraint_swiginit(self, _IMP_example.new_ExampleConstraint(*args))
1415 
1416  def do_get_inputs(self):
1417  r"""do_get_inputs(ExampleConstraint self) -> IMP::ModelObjectsTemp"""
1418  return _IMP_example.ExampleConstraint_do_get_inputs(self)
1419 
1420  def do_get_outputs(self):
1421  r"""do_get_outputs(ExampleConstraint self) -> IMP::ModelObjectsTemp"""
1422  return _IMP_example.ExampleConstraint_do_get_outputs(self)
1423 
1424  @staticmethod
1425  def get_key():
1426  r"""get_key() -> IntKey"""
1427  return _IMP_example.ExampleConstraint_get_key()
1428 
1429  def get_version_info(self):
1430  r"""get_version_info(ExampleConstraint self) -> VersionInfo"""
1431  return _IMP_example.ExampleConstraint_get_version_info(self)
1432  __swig_destroy__ = _IMP_example.delete_ExampleConstraint
1433 
1434  def __str__(self):
1435  r"""__str__(ExampleConstraint self) -> std::string"""
1436  return _IMP_example.ExampleConstraint___str__(self)
1437 
1438  def __repr__(self):
1439  r"""__repr__(ExampleConstraint self) -> std::string"""
1440  return _IMP_example.ExampleConstraint___repr__(self)
1441 
1442  @staticmethod
1443  def get_from(o):
1444  return _object_cast_to_ExampleConstraint(o)
1445 
1446 
1447  def _get_as_binary(self):
1448  r"""_get_as_binary(ExampleConstraint self) -> PyObject *"""
1449  return _IMP_example.ExampleConstraint__get_as_binary(self)
1450 
1451  def _set_from_binary(self, p):
1452  r"""_set_from_binary(ExampleConstraint self, PyObject * p)"""
1453  return _IMP_example.ExampleConstraint__set_from_binary(self, p)
1454 
1455  def __getstate__(self):
1456  p = self._get_as_binary()
1457  if len(self.__dict__) > 1:
1458  d = self.__dict__.copy()
1459  del d['this']
1460  p = (d, p)
1461  return p
1462 
1463  def __setstate__(self, p):
1464  if not hasattr(self, 'this'):
1465  self.__init__()
1466  if isinstance(p, tuple):
1467  d, p = p
1468  self.__dict__.update(d)
1469  return self._set_from_binary(p)
1470 
1471 
1472 # Register ExampleConstraint in _IMP_example:
1473 _IMP_example.ExampleConstraint_swigregister(ExampleConstraint)
1474 
1475 def get_number_of_incidences(psa, psb, point_distance):
1476  r"""get_number_of_incidences(IMP::ParticlesTemp const & psa, IMP::ParticlesTemp const & psb, double point_distance) -> unsigned int"""
1477  return _IMP_example.get_number_of_incidences(psa, psb, point_distance)
1478 
1479 def create_chain_restraint(m, ps, length_factor, k, name):
1480  r"""create_chain_restraint(Model m, IMP::ParticleIndexes const & ps, double length_factor, double k, std::string name) -> Restraint"""
1481  return _IMP_example.create_chain_restraint(m, ps, length_factor, k, name)
1482 
1483 def create_excluded_volume(m, ps, k, name):
1484  r"""create_excluded_volume(Model m, IMP::ParticleIndexes const & ps, double k, std::string name) -> Restraint"""
1485  return _IMP_example.create_excluded_volume(m, ps, k, name)
1486 class ExampleTemplateClass3D(object):
1487  r"""Proxy of C++ IMP::example::ExampleTemplateClassD< 3 > class."""
1488 
1489  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1490 
1491  def __init__(self, *args):
1492  r"""
1493  __init__(ExampleTemplateClass3D self) -> ExampleTemplateClass3D
1494  __init__(ExampleTemplateClass3D self, Vector3D a, Vector3D b) -> ExampleTemplateClass3D
1495  """
1496  _IMP_example.ExampleTemplateClass3D_swiginit(self, _IMP_example.new_ExampleTemplateClass3D(*args))
1497 
1498  def get_point(self, i):
1499  r"""get_point(ExampleTemplateClass3D self, unsigned int i) -> Vector3D"""
1500  return _IMP_example.ExampleTemplateClass3D_get_point(self, i)
1501 
1502  def show(self, *args):
1503  r"""show(ExampleTemplateClass3D self, _ostream out=std::cout)"""
1504  return _IMP_example.ExampleTemplateClass3D_show(self, *args)
1505 
1506  def __str__(self):
1507  r"""__str__(ExampleTemplateClass3D self) -> std::string"""
1508  return _IMP_example.ExampleTemplateClass3D___str__(self)
1509 
1510  def __repr__(self):
1511  r"""__repr__(ExampleTemplateClass3D self) -> std::string"""
1512  return _IMP_example.ExampleTemplateClass3D___repr__(self)
1513  __swig_destroy__ = _IMP_example.delete_ExampleTemplateClass3D
1514 
1515 # Register ExampleTemplateClass3D in _IMP_example:
1516 _IMP_example.ExampleTemplateClass3D_swigregister(ExampleTemplateClass3D)
1517 
1518 def get_module_version():
1519  r"""get_module_version() -> std::string const"""
1520  return _IMP_example.get_module_version()
1521 
1522 def get_example_path(fname):
1523  r"""get_example_path(std::string fname) -> std::string"""
1524  return _IMP_example.get_example_path(fname)
1525 
1526 def get_data_path(fname):
1527  r"""get_data_path(std::string fname) -> std::string"""
1528  return _IMP_example.get_data_path(fname)
1529 
1530 from . import _version_check
1531 _version_check.check_version(get_module_version())
1532 __version__ = get_module_version()
1533 
1534 
unsigned int get_number_of_incidences(const ParticlesTemp &psa, const ParticlesTemp &psb, double point_distance)
Definition: counting.h:23
A base class for modifiers of ParticlesTemp.
Abstract class for scoring object(s) of type ParticleIndexPair.
Definition: PairScore.h:44
virtual double evaluate(double feature) const
Calculate score with respect to the given feature.
Definition: UnaryFunction.h:35
An example PairScore written in Python.
An example SingletonModifier written in Python.
Various classes to hold sets of particles.
static XYZR setup_particle(Model *m, ParticleIndex pi)
Definition: XYZR.h:48
An example UnaryFunction written in Python.
Make CGAL functionality available to IMP.
A line segment templated on the dimension.
ParticlesTemp get_particles(Model *m, const ParticleIndexes &ps)
Get the particles from a list of indexes.
virtual void clear_caches()
Definition: Object.h:270
virtual ModelObjectsTemp do_get_outputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the outputs.
Composable functors to implement scores via compile-time composition.
Restraint * create_excluded_volume(Model *m, const ParticleIndexes &ps, double k, std::string name)
Vector3D get_random_vector_in(const Cylinder3D &c)
Generate a random vector in a cylinder with uniform density.
Code to compute statistical measures.
Implement a constraint on the Model.
Definition: Constraint.h:49
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:86
An example simple object which is reference counted.
Definition: ExampleObject.h:31
A simple decorator which adds a name to a particle.
An example Constraint written in Python.
Common base class for heavy weight IMP objects.
Definition: Object.h:111
Store a list of ParticleIndexes.
An example restraint written in Python.
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
Overload this method to specify the inputs.
Restrain a particle to be in the x,y plane.
Basic utilities for handling cryo-electron microscopy 3D density maps.
A decorator for a particle with x,y,z coordinates.
Definition: XYZ.h:30
Interface to specialized Particle types (e.g. atoms)
Definition: Decorator.h:119
virtual ModelObjectsTemp do_get_outputs() const =0
Basic functionality that is expected to be used by a wide variety of IMP users.
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
virtual void apply_index(Model *m, ParticleIndex v) const =0
std::string get_module_version()
Return the version of this module, as a string.
virtual VersionInfo get_version_info() const
Get information about the module and version of the object.
Definition: Object.h:206
virtual DerivativePair evaluate_with_derivative(double feature) const
Calculate score and derivative with respect to the given feature.
Definition: UnaryFunction.h:50
VectorD< 3 > Vector3D
Definition: VectorD.h:408
void set_check_level(CheckLevel l)
Apply a harmonic to the distance between two particles.
Restraint * create_chain_restraint(Model *m, const ParticleIndexes &ps, double length_factor, double k, std::string name)
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
Model * get_model() const
Definition: ModelObject.h:64
A trivial constraint that just increments a counter.
Output IMP model data in various file formats.
Functionality for loading, creating, manipulating and scoring atomic structures.
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.
Support for the RMF file format for storing hierarchical molecular data and markup.
Abstract single variable functor class for score functions.
Definition: UnaryFunction.h:27
virtual ModelObjectsTemp do_get_inputs() const =0
Divide-and-conquer inferential optimization in discrete space.
virtual double evaluate_index(Model *m, const ParticleIndexPair &vt, DerivativeAccumulator *da) const =0
Compute the score and the derivative if needed.
Support for small angle X-ray scattering (SAXS) data.
Inferential scoring building on methods developed as part of the Inferential Structure Determination ...
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:56