IMP logo
IMP Reference Guide  2.11.1
The Integrative Modeling Platform
example/__init__.py
1 # This file was automatically generated by SWIG (http://www.swig.org).
2 # Version 3.0.10
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 # This wrapper is part of IMP,
8 # Copyright 2007-2019 IMP Inventors. All rights reserved.
9 
10 from __future__ import print_function, division, absolute_import
11 
12 
13 
14 
15 from sys import version_info as _swig_python_version_info
16 if _swig_python_version_info >= (2, 7, 0):
17  def swig_import_helper():
18  import importlib
19  pkg = __name__.rpartition('.')[0]
20  mname = '.'.join((pkg, '_IMP_example')).lstrip('.')
21  try:
22  return importlib.import_module(mname)
23  except ImportError:
24  return importlib.import_module('_IMP_example')
25  _IMP_example = swig_import_helper()
26  del swig_import_helper
27 elif _swig_python_version_info >= (2, 6, 0):
28  def swig_import_helper():
29  from os.path import dirname
30  import imp
31  fp = None
32  try:
33  fp, pathname, description = imp.find_module('_IMP_example', [dirname(__file__)])
34  except ImportError:
35  import _IMP_example
36  return _IMP_example
37  if fp is not None:
38  try:
39  _mod = imp.load_module('_IMP_example', fp, pathname, description)
40  finally:
41  fp.close()
42  return _mod
43  _IMP_example = swig_import_helper()
44  del swig_import_helper
45 else:
46  import _IMP_example
47 del _swig_python_version_info
48 try:
49  _swig_property = property
50 except NameError:
51  pass # Python < 2.2 doesn't have 'property'.
52 
53 try:
54  import builtins as __builtin__
55 except ImportError:
56  import __builtin__
57 
58 def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
59  if (name == "thisown"):
60  return self.this.own(value)
61  if (name == "this"):
62  if type(value).__name__ == 'SwigPyObject':
63  self.__dict__[name] = value
64  return
65  method = class_type.__swig_setmethods__.get(name, None)
66  if method:
67  return method(self, value)
68  if (not static):
69  object.__setattr__(self, name, value)
70  else:
71  raise AttributeError("You cannot add attributes to %s" % self)
72 
73 
74 def _swig_setattr(self, class_type, name, value):
75  return _swig_setattr_nondynamic(self, class_type, name, value, 0)
76 
77 
78 def _swig_getattr(self, class_type, name):
79  if (name == "thisown"):
80  return self.this.own()
81  method = class_type.__swig_getmethods__.get(name, None)
82  if method:
83  return method(self)
84  raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
85 
86 
87 def _swig_repr(self):
88  try:
89  strthis = "proxy of " + self.this.__repr__()
90  except __builtin__.Exception:
91  strthis = ""
92  return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
93 
94 
95 def _swig_setattr_nondynamic_method(set):
96  def set_attr(self, name, value):
97  if (name == "thisown"):
98  return self.this.own(value)
99  if hasattr(self, name) or (name == "this"):
100  set(self, name, value)
101  else:
102  raise AttributeError("You cannot add attributes to %s" % self)
103  return set_attr
104 
105 
106 try:
107  import weakref
108  weakref_proxy = weakref.proxy
109 except __builtin__.Exception:
110  weakref_proxy = lambda x: x
111 
112 
113 class IMP_EXAMPLE_SwigPyIterator(object):
114  """Proxy of C++ swig::IMP_EXAMPLE_SwigPyIterator class."""
115 
116  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
117 
118  def __init__(self, *args, **kwargs):
119  raise AttributeError("No constructor defined - class is abstract")
120  __repr__ = _swig_repr
121  __swig_destroy__ = _IMP_example.delete_IMP_EXAMPLE_SwigPyIterator
122  __del__ = lambda self: None
123 
124  def value(self):
125  """value(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
126  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_value(self)
127 
128 
129  def incr(self, n=1):
130  """
131  incr(IMP_EXAMPLE_SwigPyIterator self, size_t n=1) -> IMP_EXAMPLE_SwigPyIterator
132  incr(IMP_EXAMPLE_SwigPyIterator self) -> IMP_EXAMPLE_SwigPyIterator
133  """
134  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_incr(self, n)
135 
136 
137  def decr(self, n=1):
138  """
139  decr(IMP_EXAMPLE_SwigPyIterator self, size_t n=1) -> IMP_EXAMPLE_SwigPyIterator
140  decr(IMP_EXAMPLE_SwigPyIterator self) -> IMP_EXAMPLE_SwigPyIterator
141  """
142  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_decr(self, n)
143 
144 
145  def distance(self, x):
146  """distance(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> ptrdiff_t"""
147  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_distance(self, x)
148 
149 
150  def equal(self, x):
151  """equal(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
152  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_equal(self, x)
153 
154 
155  def copy(self):
156  """copy(IMP_EXAMPLE_SwigPyIterator self) -> IMP_EXAMPLE_SwigPyIterator"""
157  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_copy(self)
158 
159 
160  def next(self):
161  """next(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
162  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_next(self)
163 
164 
165  def __next__(self):
166  """__next__(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
167  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___next__(self)
168 
169 
170  def previous(self):
171  """previous(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
172  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_previous(self)
173 
174 
175  def advance(self, n):
176  """advance(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
177  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_advance(self, n)
178 
179 
180  def __eq__(self, x):
181  """__eq__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
182  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___eq__(self, x)
183 
184 
185  def __ne__(self, x):
186  """__ne__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
187  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___ne__(self, x)
188 
189 
190  def __iadd__(self, n):
191  """__iadd__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
192  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___iadd__(self, n)
193 
194 
195  def __isub__(self, n):
196  """__isub__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
197  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___isub__(self, n)
198 
199 
200  def __add__(self, n):
201  """__add__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
202  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___add__(self, n)
203 
204 
205  def __sub__(self, *args):
206  """
207  __sub__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator
208  __sub__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> ptrdiff_t
209  """
210  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___sub__(self, *args)
211 
212  def __iter__(self):
213  return self
214 IMP_EXAMPLE_SwigPyIterator_swigregister = _IMP_example.IMP_EXAMPLE_SwigPyIterator_swigregister
215 IMP_EXAMPLE_SwigPyIterator_swigregister(IMP_EXAMPLE_SwigPyIterator)
216 
217 
218 _value_types=[]
219 _object_types=[]
220 _raii_types=[]
221 _plural_types=[]
222 
223 IMP_DEBUG = _IMP_example.IMP_DEBUG
224 IMP_RELEASE = _IMP_example.IMP_RELEASE
225 IMP_SILENT = _IMP_example.IMP_SILENT
226 IMP_PROGRESS = _IMP_example.IMP_PROGRESS
227 IMP_TERSE = _IMP_example.IMP_TERSE
228 IMP_VERBOSE = _IMP_example.IMP_VERBOSE
229 IMP_MEMORY = _IMP_example.IMP_MEMORY
230 IMP_NONE = _IMP_example.IMP_NONE
231 IMP_USAGE = _IMP_example.IMP_USAGE
232 IMP_INTERNAL = _IMP_example.IMP_INTERNAL
233 IMP_KERNEL_HAS_LOG4CXX = _IMP_example.IMP_KERNEL_HAS_LOG4CXX
234 IMP_COMPILER_HAS_AUTO = _IMP_example.IMP_COMPILER_HAS_AUTO
235 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_example.IMP_COMPILER_HAS_DEBUG_VECTOR
236 IMP_COMPILER_HAS_UNIQUE_PTR = _IMP_example.IMP_COMPILER_HAS_UNIQUE_PTR
237 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_example.IMP_KERNEL_HAS_BOOST_RANDOM
238 IMP_KERNEL_HAS_NUMPY = _IMP_example.IMP_KERNEL_HAS_NUMPY
239 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_example.IMP_KERNEL_HAS_GPERFTOOLS
240 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
241 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
242 IMPKERNEL_SHOW_WARNINGS = _IMP_example.IMPKERNEL_SHOW_WARNINGS
243 
244 import sys
245 class _DirectorObjects(object):
246  """@internal Simple class to keep references to director objects
247  to prevent premature deletion."""
248  def __init__(self):
249  self._objects = []
250  def register(self, obj):
251  """Take a reference to a director object; will only work for
252  refcounted C++ classes"""
253  if hasattr(obj, 'get_ref_count'):
254  self._objects.append(obj)
255  def cleanup(self):
256  """Only drop our reference and allow cleanup by Python if no other
257  Python references exist (we hold 3 references: one in self._objects,
258  one in x, and one in the argument list for getrefcount) *and* no
259  other C++ references exist (the Python object always holds one)"""
260  objs = [x for x in self._objects if sys.getrefcount(x) > 3 \
261  or x.get_ref_count() > 1]
262 # Do in two steps so the references are kept until the end of the
263 # function (deleting references may trigger a fresh call to this method)
264  self._objects = objs
265  def get_object_count(self):
266  """Get number of director objects (useful for testing only)"""
267  return len(self._objects)
268 _director_objects = _DirectorObjects()
269 
270 class _ostream(object):
271  """Proxy of C++ std::ostream class."""
272 
273  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
274 
275  def __init__(self, *args, **kwargs):
276  raise AttributeError("No constructor defined")
277  __repr__ = _swig_repr
278 
279  def write(self, osa_buf):
280  """write(_ostream self, char const * osa_buf)"""
281  return _IMP_example._ostream_write(self, osa_buf)
282 
283 _ostream_swigregister = _IMP_example._ostream_swigregister
284 _ostream_swigregister(_ostream)
285 
286 IMP_COMPILER_HAS_OVERRIDE = _IMP_example.IMP_COMPILER_HAS_OVERRIDE
287 IMP_COMPILER_HAS_FINAL = _IMP_example.IMP_COMPILER_HAS_FINAL
288 IMP_HAS_NOEXCEPT = _IMP_example.IMP_HAS_NOEXCEPT
289 IMP_C_OPEN_BINARY = _IMP_example.IMP_C_OPEN_BINARY
290 import IMP
291 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CGAL_HAS_BOOST_FILESYSTEM
292 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
293 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_example.IMP_CGAL_HAS_BOOST_RANDOM
294 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_example.IMP_CGAL_HAS_BOOST_SYSTEM
295 IMP_CGAL_HAS_NUMPY = _IMP_example.IMP_CGAL_HAS_NUMPY
296 IMPCGAL_SHOW_WARNINGS = _IMP_example.IMPCGAL_SHOW_WARNINGS
297 import IMP.cgal
298 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_example.IMP_ALGEBRA_HAS_IMP_CGAL
299 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
300 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
301 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_RANDOM
302 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_SYSTEM
303 IMP_ALGEBRA_HAS_CGAL = _IMP_example.IMP_ALGEBRA_HAS_CGAL
304 IMP_ALGEBRA_HAS_NUMPY = _IMP_example.IMP_ALGEBRA_HAS_NUMPY
305 IMP_ALGEBRA_HAS_ANN = _IMP_example.IMP_ALGEBRA_HAS_ANN
306 IMPALGEBRA_SHOW_WARNINGS = _IMP_example.IMPALGEBRA_SHOW_WARNINGS
307 import IMP.algebra
308 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_example.IMP_DISPLAY_HAS_IMP_CGAL
309 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
310 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
311 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_example.IMP_DISPLAY_HAS_BOOST_RANDOM
312 IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_example.IMP_DISPLAY_HAS_BOOST_SYSTEM
313 IMP_DISPLAY_HAS_CGAL = _IMP_example.IMP_DISPLAY_HAS_CGAL
314 IMP_DISPLAY_HAS_NUMPY = _IMP_example.IMP_DISPLAY_HAS_NUMPY
315 IMPDISPLAY_SHOW_WARNINGS = _IMP_example.IMPDISPLAY_SHOW_WARNINGS
316 import IMP.display
317 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_example.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
318 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
319 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
320 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
321 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
322 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_example.IMP_SCORE_FUNCTOR_HAS_CGAL
323 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_example.IMP_SCORE_FUNCTOR_HAS_HDF5
324 IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_example.IMP_SCORE_FUNCTOR_HAS_NUMPY
325 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_example.IMPSCOREFUNCTOR_SHOW_WARNINGS
326 import IMP.score_functor
327 IMP_STATISTICS_HAS_IMP_CGAL = _IMP_example.IMP_STATISTICS_HAS_IMP_CGAL
328 IMP_STATISTICS_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_STATISTICS_HAS_BOOST_FILESYSTEM
329 IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS
330 IMP_STATISTICS_HAS_BOOST_RANDOM = _IMP_example.IMP_STATISTICS_HAS_BOOST_RANDOM
331 IMP_STATISTICS_HAS_BOOST_SYSTEM = _IMP_example.IMP_STATISTICS_HAS_BOOST_SYSTEM
332 IMP_STATISTICS_HAS_CGAL = _IMP_example.IMP_STATISTICS_HAS_CGAL
333 IMP_STATISTICS_HAS_NUMPY = _IMP_example.IMP_STATISTICS_HAS_NUMPY
334 IMPSTATISTICS_SHOW_WARNINGS = _IMP_example.IMPSTATISTICS_SHOW_WARNINGS
335 import IMP.statistics
336 IMP_CORE_HAS_IMP_CGAL = _IMP_example.IMP_CORE_HAS_IMP_CGAL
337 IMP_CORE_HAS_IMP_KERNEL = _IMP_example.IMP_CORE_HAS_IMP_KERNEL
338 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CORE_HAS_BOOST_FILESYSTEM
339 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
340 IMP_CORE_HAS_BOOST_RANDOM = _IMP_example.IMP_CORE_HAS_BOOST_RANDOM
341 IMP_CORE_HAS_BOOST_SYSTEM = _IMP_example.IMP_CORE_HAS_BOOST_SYSTEM
342 IMP_CORE_HAS_CGAL = _IMP_example.IMP_CORE_HAS_CGAL
343 IMP_CORE_HAS_HDF5 = _IMP_example.IMP_CORE_HAS_HDF5
344 IMP_CORE_HAS_NUMPY = _IMP_example.IMP_CORE_HAS_NUMPY
345 IMPCORE_SHOW_WARNINGS = _IMP_example.IMPCORE_SHOW_WARNINGS
346 import IMP.core
347 IMP_CONTAINER_HAS_IMP_ALGEBRA = _IMP_example.IMP_CONTAINER_HAS_IMP_ALGEBRA
348 IMP_CONTAINER_HAS_IMP_CGAL = _IMP_example.IMP_CONTAINER_HAS_IMP_CGAL
349 IMP_CONTAINER_HAS_IMP_DISPLAY = _IMP_example.IMP_CONTAINER_HAS_IMP_DISPLAY
350 IMP_CONTAINER_HAS_IMP_KERNEL = _IMP_example.IMP_CONTAINER_HAS_IMP_KERNEL
351 IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR
352 IMP_CONTAINER_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CONTAINER_HAS_BOOST_FILESYSTEM
353 IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS
354 IMP_CONTAINER_HAS_BOOST_RANDOM = _IMP_example.IMP_CONTAINER_HAS_BOOST_RANDOM
355 IMP_CONTAINER_HAS_BOOST_SYSTEM = _IMP_example.IMP_CONTAINER_HAS_BOOST_SYSTEM
356 IMP_CONTAINER_HAS_CGAL = _IMP_example.IMP_CONTAINER_HAS_CGAL
357 IMP_CONTAINER_HAS_HDF5 = _IMP_example.IMP_CONTAINER_HAS_HDF5
358 IMP_CONTAINER_HAS_NUMPY = _IMP_example.IMP_CONTAINER_HAS_NUMPY
359 IMP_CONTAINER_HAS_PYTHON_IHM = _IMP_example.IMP_CONTAINER_HAS_PYTHON_IHM
360 IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_example.IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP
361 IMP_CONTAINER_HAS_ROBIN_MAP = _IMP_example.IMP_CONTAINER_HAS_ROBIN_MAP
362 IMPCONTAINER_SHOW_WARNINGS = _IMP_example.IMPCONTAINER_SHOW_WARNINGS
363 import IMP.container
364 IMP_ATOM_HAS_IMP_CGAL = _IMP_example.IMP_ATOM_HAS_IMP_CGAL
365 IMP_ATOM_HAS_IMP_KERNEL = _IMP_example.IMP_ATOM_HAS_IMP_KERNEL
366 IMP_ATOM_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR
367 IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS
368 IMP_ATOM_HAS_BOOST_RANDOM = _IMP_example.IMP_ATOM_HAS_BOOST_RANDOM
369 IMP_ATOM_HAS_BOOST_REGEX = _IMP_example.IMP_ATOM_HAS_BOOST_REGEX
370 IMP_ATOM_HAS_BOOST_SYSTEM = _IMP_example.IMP_ATOM_HAS_BOOST_SYSTEM
371 IMP_ATOM_HAS_CGAL = _IMP_example.IMP_ATOM_HAS_CGAL
372 IMP_ATOM_HAS_HDF5 = _IMP_example.IMP_ATOM_HAS_HDF5
373 IMP_ATOM_HAS_NUMPY = _IMP_example.IMP_ATOM_HAS_NUMPY
374 IMP_ATOM_HAS_PYTHON_IHM = _IMP_example.IMP_ATOM_HAS_PYTHON_IHM
375 IMPATOM_SHOW_WARNINGS = _IMP_example.IMPATOM_SHOW_WARNINGS
376 IMP_ATOM_TYPE_INDEX = _IMP_example.IMP_ATOM_TYPE_INDEX
377 IMP_RESIDUE_TYPE_INDEX = _IMP_example.IMP_RESIDUE_TYPE_INDEX
378 IMP_HIERARCHY_TYPE_INDEX = _IMP_example.IMP_HIERARCHY_TYPE_INDEX
379 IMP_CHAIN_TYPE_INDEX = _IMP_example.IMP_CHAIN_TYPE_INDEX
380 import IMP.atom
381 IMP_RMF_HAS_IMP_CGAL = _IMP_example.IMP_RMF_HAS_IMP_CGAL
382 IMP_RMF_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_RMF_HAS_IMP_SCORE_FUNCTOR
383 IMP_RMF_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_RMF_HAS_BOOST_FILESYSTEM
384 IMP_RMF_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_RMF_HAS_BOOST_PROGRAMOPTIONS
385 IMP_RMF_HAS_BOOST_RANDOM = _IMP_example.IMP_RMF_HAS_BOOST_RANDOM
386 IMP_RMF_HAS_BOOST_REGEX = _IMP_example.IMP_RMF_HAS_BOOST_REGEX
387 IMP_RMF_HAS_BOOST_SYSTEM = _IMP_example.IMP_RMF_HAS_BOOST_SYSTEM
388 IMP_RMF_HAS_CGAL = _IMP_example.IMP_RMF_HAS_CGAL
389 IMP_RMF_HAS_HDF5 = _IMP_example.IMP_RMF_HAS_HDF5
390 IMP_RMF_HAS_NUMPY = _IMP_example.IMP_RMF_HAS_NUMPY
391 IMP_RMF_HAS_PYTHON_IHM = _IMP_example.IMP_RMF_HAS_PYTHON_IHM
392 IMPRMF_SHOW_WARNINGS = _IMP_example.IMPRMF_SHOW_WARNINGS
393 import IMP.rmf
394 import RMF
395 IMP_DOMINO_HAS_IMP_ATOM = _IMP_example.IMP_DOMINO_HAS_IMP_ATOM
396 IMP_DOMINO_HAS_IMP_CGAL = _IMP_example.IMP_DOMINO_HAS_IMP_CGAL
397 IMP_DOMINO_HAS_IMP_KERNEL = _IMP_example.IMP_DOMINO_HAS_IMP_KERNEL
398 IMP_DOMINO_HAS_IMP_RMF = _IMP_example.IMP_DOMINO_HAS_IMP_RMF
399 IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR
400 IMP_DOMINO_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_DOMINO_HAS_BOOST_FILESYSTEM
401 IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS
402 IMP_DOMINO_HAS_BOOST_RANDOM = _IMP_example.IMP_DOMINO_HAS_BOOST_RANDOM
403 IMP_DOMINO_HAS_BOOST_REGEX = _IMP_example.IMP_DOMINO_HAS_BOOST_REGEX
404 IMP_DOMINO_HAS_BOOST_SYSTEM = _IMP_example.IMP_DOMINO_HAS_BOOST_SYSTEM
405 IMP_DOMINO_HAS_CGAL = _IMP_example.IMP_DOMINO_HAS_CGAL
406 IMP_DOMINO_HAS_HDF5 = _IMP_example.IMP_DOMINO_HAS_HDF5
407 IMP_DOMINO_HAS_NUMPY = _IMP_example.IMP_DOMINO_HAS_NUMPY
408 IMP_DOMINO_HAS_RMF = _IMP_example.IMP_DOMINO_HAS_RMF
409 IMP_DOMINO_HAS_PYTHON_IHM = _IMP_example.IMP_DOMINO_HAS_PYTHON_IHM
410 IMPDOMINO_SHOW_WARNINGS = _IMP_example.IMPDOMINO_SHOW_WARNINGS
411 import RMF_HDF5
412 import IMP.domino
413 IMP_EXAMPLE_HAS_IMP_ALGEBRA = _IMP_example.IMP_EXAMPLE_HAS_IMP_ALGEBRA
414 IMP_EXAMPLE_HAS_IMP_CGAL = _IMP_example.IMP_EXAMPLE_HAS_IMP_CGAL
415 IMP_EXAMPLE_HAS_IMP_DISPLAY = _IMP_example.IMP_EXAMPLE_HAS_IMP_DISPLAY
416 IMP_EXAMPLE_HAS_IMP_KERNEL = _IMP_example.IMP_EXAMPLE_HAS_IMP_KERNEL
417 IMP_EXAMPLE_HAS_IMP_RMF = _IMP_example.IMP_EXAMPLE_HAS_IMP_RMF
418 IMP_EXAMPLE_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_EXAMPLE_HAS_IMP_SCORE_FUNCTOR
419 IMP_EXAMPLE_HAS_IMP_STATISTICS = _IMP_example.IMP_EXAMPLE_HAS_IMP_STATISTICS
420 IMP_EXAMPLE_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_FILESYSTEM
421 IMP_EXAMPLE_HAS_BOOST_GRAPH = _IMP_example.IMP_EXAMPLE_HAS_BOOST_GRAPH
422 IMP_EXAMPLE_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_EXAMPLE_HAS_BOOST_PROGRAMOPTIONS
423 IMP_EXAMPLE_HAS_BOOST_RANDOM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_RANDOM
424 IMP_EXAMPLE_HAS_BOOST_REGEX = _IMP_example.IMP_EXAMPLE_HAS_BOOST_REGEX
425 IMP_EXAMPLE_HAS_BOOST_SYSTEM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_SYSTEM
426 IMP_EXAMPLE_HAS_CGAL = _IMP_example.IMP_EXAMPLE_HAS_CGAL
427 IMP_EXAMPLE_HAS_HDF5 = _IMP_example.IMP_EXAMPLE_HAS_HDF5
428 IMP_EXAMPLE_HAS_NUMPY = _IMP_example.IMP_EXAMPLE_HAS_NUMPY
429 IMP_EXAMPLE_HAS_RMF = _IMP_example.IMP_EXAMPLE_HAS_RMF
430 IMP_EXAMPLE_HAS_PYTHON_IHM = _IMP_example.IMP_EXAMPLE_HAS_PYTHON_IHM
431 IMP_EXAMPLE_HAS_EXAMPLEDEPENDENCY = _IMP_example.IMP_EXAMPLE_HAS_EXAMPLEDEPENDENCY
432 IMPEXAMPLE_SHOW_WARNINGS = _IMP_example.IMPEXAMPLE_SHOW_WARNINGS
433 
434 _object_types.append("ExampleRestraint")
435 
436 
437 def _object_cast_to_ExampleRestraint(o):
438  """_object_cast_to_ExampleRestraint(Object o) -> ExampleRestraint"""
439  return _IMP_example._object_cast_to_ExampleRestraint(o)
440 
441 def ExampleDecorators(l=[]):
442  return [ExampleDecorator(x) for x in l]
443 _plural_types.append("ExampleDecorators")
444 
445 
446 _value_types.append("ExampleDecorator")
447 
448 
449 _object_types.append("ExampleUnaryFunction")
450 
451 
452 def _object_cast_to_ExampleUnaryFunction(o):
453  """_object_cast_to_ExampleUnaryFunction(Object o) -> ExampleUnaryFunction"""
454  return _IMP_example._object_cast_to_ExampleUnaryFunction(o)
455 
456 _object_types.append("ExampleSingletonModifier")
457 
458 
459 def _object_cast_to_ExampleSingletonModifier(o):
460  """_object_cast_to_ExampleSingletonModifier(Object o) -> ExampleSingletonModifier"""
461  return _IMP_example._object_cast_to_ExampleSingletonModifier(o)
462 
463 _object_types.append("ExamplePairScore")
464 
465 
466 def _object_cast_to_ExamplePairScore(o):
467  """_object_cast_to_ExamplePairScore(Object o) -> ExamplePairScore"""
468  return _IMP_example._object_cast_to_ExamplePairScore(o)
469 
470 _object_types.append("ExampleSubsetFilterTable")
471 
472 
473 def _object_cast_to_ExampleSubsetFilterTable(o):
474  """_object_cast_to_ExampleSubsetFilterTable(Object o) -> ExampleSubsetFilterTable"""
475  return _IMP_example._object_cast_to_ExampleSubsetFilterTable(o)
476 
477 _object_types.append("ExampleConstraint")
478 
479 
480 def _object_cast_to_ExampleConstraint(o):
481  """_object_cast_to_ExampleConstraint(Object o) -> ExampleConstraint"""
482  return _IMP_example._object_cast_to_ExampleConstraint(o)
483 
484 _object_types.append("ExampleObject")
485 
486 
487 def _object_cast_to_ExampleObject(o):
488  """_object_cast_to_ExampleObject(Object o) -> ExampleObject"""
489  return _IMP_example._object_cast_to_ExampleObject(o)
490 
491 ExampleTemplateClass3Ds=list
492 _plural_types.append("ExampleTemplateClass3Ds")
493 _value_types.append("ExampleTemplateClass3D")
494 
495 
496 def create_model_and_particles():
497  m = IMP.Model()
500  IMP.algebra.Vector3D(10,10,10))
501  for i in range(0,100):
502  p = m.add_particle("p")
503  sc.add(p)
506  d.set_coordinates_are_optimized(True)
507  return (m, sc)
508 
509 
510 
512  """An example restraint written in Python.
513  This should be functionally equivalent to the C++ ExampleRestraint.
514  """
515  def __init__(self, m, p, k):
516  IMP.Restraint.__init__(self, m, "PythonExampleRestraint%1%")
517  self.p, self.k = p, k
518 
519  def do_add_score_and_derivatives(self, sa):
520  d = IMP.core.XYZ(self.get_model(), self.p)
521  score = .5 * self.k * d.get_z() * d.get_z()
522  if sa.get_derivative_accumulator():
523  deriv = self.k * d.get_z()
524  d.add_to_derivative(2, deriv, sa.get_derivative_accumulator())
525  sa.add_score(score)
526 
527  def do_get_inputs(self):
528  return [self.get_model().get_particle(self.p)]
529 
530 
531 
532 
534  """An example PairScore written in Python.
535  This should be functionally equivalent to the C++ ExamplePairScore.
536  """
537  def __init__(self, x0, k):
538  IMP.PairScore.__init__(self)
539  self.x0, self.k = x0, k
540 
541  def evaluate_index(self, m, pip, da):
542  d0 = IMP.core.XYZ(m, pip[0])
543  d1 = IMP.core.XYZ(m, pip[1])
544  diff = (d0.get_coordinates()
545  - d1.get_coordinates()).get_magnitude() - self.x0
546  score = .5 * self.k * diff * diff
547  if da:
548 # derivatives are requested
549  delta = d0.get_coordinates() - d1.get_coordinates()
550  udelta = delta.get_unit_vector()
551  dv = self.k * diff
552  d0.add_to_derivatives(udelta * dv, da)
553  d1.add_to_derivatives(-udelta * dv, da)
554  return score
555 
556  def do_get_inputs(self, m, pis):
557  return IMP.get_particles(m, pis)
558 
559 
560 
561 
563  """An example UnaryFunction written in Python.
564  This should be functionally equivalent to the C++ ExampleUnaryFunction.
565  """
566  def __init__(self, center, k):
567  IMP.UnaryFunction.__init__(self)
568  self.center, self.k = center, k
569 
570  def evaluate_with_derivative(self, feature):
571  return (self.evaluate(feature), self.k * (feature - self.center))
572 
573  def evaluate(self, feature):
574  return .5 * self.k * (feature - self.center) * (feature - self.center)
575 
576 
577 
578 
580  """An example Constraint written in Python.
581  This should be functionally equivalent to the C++ ExampleConstraint.
582  """
583 
584  k = None
585 
586  def __init__(self, p):
587  IMP.Constraint.__init__(self, p.get_model(), "ExampleConstraint%1%")
588  self.p = p
589  if self.k is None:
590  PythonExampleConstraint.k = IMP.IntKey("Constraint key")
591  if not p.has_attribute(self.k):
592  p.add_attribute(self.k, 0)
593 
594  def do_update_attributes(self):
595  self.p.set_value(self.k, self.p.get_value(self.k) + 1)
596 
597  def do_update_derivatives(self, da):
598  pass
599 
600  def do_get_inputs(self):
601  return [self.p]
602 
603  def do_get_outputs(self):
604  return [self.p]
605 
606 
607 
608 
610  """An example SingletonModifier written in Python.
611  This should be functionally equivalent to the C++
612  ExampleSingletonModifier.
613  """
614 
615  def __init__(self, bb):
616  IMP.SingletonModifier.__init__(self, "ExampleSingletonModifier%1%")
617  self.bb = bb
618 
619  def apply_index(self, m, pi):
620  d = IMP.core.XYZ(m, pi)
621  for i in range(3):
622 # shift the coordinate until it is in the box
623  while d.get_coordinate(i) < self.bb.get_corner(0)[i]:
624  d.set_coordinate(i,d.get_coordinate(i) + \
625  (self.bb.get_corner(1)[i] - self.bb.get_corner(0)[i]))
626  while d.get_coordinate(i) > self.bb.get_corner(1)[i]:
627  d.set_coordinate(i,d.get_coordinate(i) - \
628  (self.bb.get_corner(1)[i] - self.bb.get_corner(0)[i]))
629 
630  def do_get_inputs(self, m, pis):
631  return IMP.get_particles(m, pis)
632 
633  def do_get_outputs(self, m, pis):
634  return self.do_get_inputs(m, pis)
635 
636 
638  """Proxy of C++ IMP::example::ExampleRestraint class."""
639 
640  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
641 
642  def __init__(self, m, p, k):
643  """__init__(IMP::example::ExampleRestraint self, Model m, ParticleIndex p, double k) -> ExampleRestraint"""
644  this = _IMP_example.new_ExampleRestraint(m, p, k)
645  try:
646  self.this.append(this)
647  except __builtin__.Exception:
648  self.this = this
649 
650  def do_add_score_and_derivatives(self, sa):
651  """do_add_score_and_derivatives(ExampleRestraint self, ScoreAccumulator sa)"""
652  return _IMP_example.ExampleRestraint_do_add_score_and_derivatives(self, sa)
653 
654 
655  def do_get_inputs(self):
656  """do_get_inputs(ExampleRestraint self) -> IMP::ModelObjectsTemp"""
657  return _IMP_example.ExampleRestraint_do_get_inputs(self)
658 
659 
660  def get_version_info(self):
661  """get_version_info(ExampleRestraint self) -> VersionInfo"""
662  return _IMP_example.ExampleRestraint_get_version_info(self)
663 
664 
665  def __str__(self):
666  """__str__(ExampleRestraint self) -> std::string"""
667  return _IMP_example.ExampleRestraint___str__(self)
668 
669 
670  def __repr__(self):
671  """__repr__(ExampleRestraint self) -> std::string"""
672  return _IMP_example.ExampleRestraint___repr__(self)
673 
674 
675  @staticmethod
676  def get_from(o):
677  return _object_cast_to_ExampleRestraint(o)
678 
679 ExampleRestraint_swigregister = _IMP_example.ExampleRestraint_swigregister
680 ExampleRestraint_swigregister(ExampleRestraint)
681 
683  """Proxy of C++ IMP::example::ExampleDecorator class."""
684 
685  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
686 
687  def get_decorator_name(self):
688  """get_decorator_name(ExampleDecorator self) -> std::string"""
689  return _IMP_example.ExampleDecorator_get_decorator_name(self)
690 
691 
692  def set_decorator_name(self, nm):
693  """set_decorator_name(ExampleDecorator self, std::string nm)"""
694  return _IMP_example.ExampleDecorator_set_decorator_name(self, nm)
695 
696 
697  def __init__(self, *args):
698  """
699  __init__(IMP::example::ExampleDecorator self) -> ExampleDecorator
700  __init__(IMP::example::ExampleDecorator self, Model m, ParticleIndex id) -> ExampleDecorator
701  __init__(IMP::example::ExampleDecorator self, _ParticleAdaptor d) -> ExampleDecorator
702  """
703  this = _IMP_example.new_ExampleDecorator(*args)
704  try:
705  self.this.append(this)
706  except __builtin__.Exception:
707  self.this = this
708 
709  def get_is_setup(*args):
710  """
711  get_is_setup(Model m, ParticleIndex pi) -> bool
712  get_is_setup(_ParticleAdaptor p) -> bool
713  """
714  return _IMP_example.ExampleDecorator_get_is_setup(*args)
715 
716  get_is_setup = staticmethod(get_is_setup)
717 
718  def show(self, *args):
719  """
720  show(ExampleDecorator self, _ostream out)
721  show(ExampleDecorator self)
722  """
723  return _IMP_example.ExampleDecorator_show(self, *args)
724 
725 
726  def setup_particle(*args):
727  """
728  setup_particle(Model m, ParticleIndex pi, std::string name) -> ExampleDecorator
729  setup_particle(_ParticleAdaptor decorator, std::string name) -> ExampleDecorator
730  """
731  return _IMP_example.ExampleDecorator_setup_particle(*args)
732 
733  setup_particle = staticmethod(setup_particle)
734 
735  def add_attribute(self, *args):
736  """
737  add_attribute(ExampleDecorator self, FloatKey k, IMP::Float v, bool opt)
738  add_attribute(ExampleDecorator self, FloatKey a0, IMP::Float a1)
739  add_attribute(ExampleDecorator self, IntKey a0, IMP::Int a1)
740  add_attribute(ExampleDecorator self, StringKey a0, IMP::String a1)
741  add_attribute(ExampleDecorator self, ParticleIndexKey a0, Particle a1)
742  add_attribute(ExampleDecorator self, ObjectKey a0, Object a1)
743  """
744  return _IMP_example.ExampleDecorator_add_attribute(self, *args)
745 
746 
747  def get_value(self, *args):
748  """
749  get_value(ExampleDecorator self, FloatKey a0) -> IMP::Float
750  get_value(ExampleDecorator self, IntKey a0) -> IMP::Int
751  get_value(ExampleDecorator self, StringKey a0) -> IMP::String
752  get_value(ExampleDecorator self, ParticleIndexKey a0) -> Particle
753  get_value(ExampleDecorator self, ObjectKey a0) -> Object
754  """
755  return _IMP_example.ExampleDecorator_get_value(self, *args)
756 
757 
758  def set_value(self, *args):
759  """
760  set_value(ExampleDecorator self, FloatKey a0, IMP::Float a1)
761  set_value(ExampleDecorator self, IntKey a0, IMP::Int a1)
762  set_value(ExampleDecorator self, StringKey a0, IMP::String a1)
763  set_value(ExampleDecorator self, ParticleIndexKey a0, Particle a1)
764  set_value(ExampleDecorator self, ObjectKey a0, Object a1)
765  """
766  return _IMP_example.ExampleDecorator_set_value(self, *args)
767 
768 
769  def remove_attribute(self, *args):
770  """
771  remove_attribute(ExampleDecorator self, FloatKey a0)
772  remove_attribute(ExampleDecorator self, IntKey a0)
773  remove_attribute(ExampleDecorator self, StringKey a0)
774  remove_attribute(ExampleDecorator self, ParticleIndexKey a0)
775  remove_attribute(ExampleDecorator self, ObjectKey a0)
776  """
777  return _IMP_example.ExampleDecorator_remove_attribute(self, *args)
778 
779 
780  def has_attribute(self, *args):
781  """
782  has_attribute(ExampleDecorator self, FloatKey a0) -> bool
783  has_attribute(ExampleDecorator self, IntKey a0) -> bool
784  has_attribute(ExampleDecorator self, StringKey a0) -> bool
785  has_attribute(ExampleDecorator self, ParticleIndexKey a0) -> bool
786  has_attribute(ExampleDecorator self, ObjectKey a0) -> bool
787  """
788  return _IMP_example.ExampleDecorator_has_attribute(self, *args)
789 
790 
791  def get_derivative(self, a0):
792  """get_derivative(ExampleDecorator self, FloatKey a0) -> double"""
793  return _IMP_example.ExampleDecorator_get_derivative(self, a0)
794 
795 
796  def get_name(self):
797  """get_name(ExampleDecorator self) -> std::string"""
798  return _IMP_example.ExampleDecorator_get_name(self)
799 
800 
801  def clear_caches(self):
802  """clear_caches(ExampleDecorator self)"""
803  return _IMP_example.ExampleDecorator_clear_caches(self)
804 
805 
806  def set_name(self, a0):
807  """set_name(ExampleDecorator self, std::string a0)"""
808  return _IMP_example.ExampleDecorator_set_name(self, a0)
809 
810 
811  def set_check_level(self, a0):
812  """set_check_level(ExampleDecorator self, IMP::CheckLevel a0)"""
813  return _IMP_example.ExampleDecorator_set_check_level(self, a0)
814 
815 
816  def add_to_derivative(self, a0, a1, a2):
817  """add_to_derivative(ExampleDecorator self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
818  return _IMP_example.ExampleDecorator_add_to_derivative(self, a0, a1, a2)
819 
820 
821  def set_is_optimized(self, a0, a1):
822  """set_is_optimized(ExampleDecorator self, FloatKey a0, bool a1)"""
823  return _IMP_example.ExampleDecorator_set_is_optimized(self, a0, a1)
824 
825 
826  def get_is_optimized(self, a0):
827  """get_is_optimized(ExampleDecorator self, FloatKey a0) -> bool"""
828  return _IMP_example.ExampleDecorator_get_is_optimized(self, a0)
829 
830 
831  def get_check_level(self):
832  """get_check_level(ExampleDecorator self) -> IMP::CheckLevel"""
833  return _IMP_example.ExampleDecorator_get_check_level(self)
834 
835 
836  def __eq__(self, *args):
837  """
838  __eq__(ExampleDecorator self, ExampleDecorator o) -> bool
839  __eq__(ExampleDecorator self, Particle d) -> bool
840  """
841  return _IMP_example.ExampleDecorator___eq__(self, *args)
842 
843 
844  def __ne__(self, *args):
845  """
846  __ne__(ExampleDecorator self, ExampleDecorator o) -> bool
847  __ne__(ExampleDecorator self, Particle d) -> bool
848  """
849  return _IMP_example.ExampleDecorator___ne__(self, *args)
850 
851 
852  def __le__(self, *args):
853  """
854  __le__(ExampleDecorator self, ExampleDecorator o) -> bool
855  __le__(ExampleDecorator self, Particle d) -> bool
856  """
857  return _IMP_example.ExampleDecorator___le__(self, *args)
858 
859 
860  def __lt__(self, *args):
861  """
862  __lt__(ExampleDecorator self, ExampleDecorator o) -> bool
863  __lt__(ExampleDecorator self, Particle d) -> bool
864  """
865  return _IMP_example.ExampleDecorator___lt__(self, *args)
866 
867 
868  def __ge__(self, *args):
869  """
870  __ge__(ExampleDecorator self, ExampleDecorator o) -> bool
871  __ge__(ExampleDecorator self, Particle d) -> bool
872  """
873  return _IMP_example.ExampleDecorator___ge__(self, *args)
874 
875 
876  def __gt__(self, *args):
877  """
878  __gt__(ExampleDecorator self, ExampleDecorator o) -> bool
879  __gt__(ExampleDecorator self, Particle d) -> bool
880  """
881  return _IMP_example.ExampleDecorator___gt__(self, *args)
882 
883 
884  def __hash__(self):
885  """__hash__(ExampleDecorator self) -> std::size_t"""
886  return _IMP_example.ExampleDecorator___hash__(self)
887 
888 
889  def __str__(self):
890  """__str__(ExampleDecorator self) -> std::string"""
891  return _IMP_example.ExampleDecorator___str__(self)
892 
893 
894  def __repr__(self):
895  """__repr__(ExampleDecorator self) -> std::string"""
896  return _IMP_example.ExampleDecorator___repr__(self)
897 
898  __swig_destroy__ = _IMP_example.delete_ExampleDecorator
899  __del__ = lambda self: None
900 ExampleDecorator_swigregister = _IMP_example.ExampleDecorator_swigregister
901 ExampleDecorator_swigregister(ExampleDecorator)
902 
903 def ExampleDecorator_get_is_setup(*args):
904  """
905  get_is_setup(Model m, ParticleIndex pi) -> bool
906  ExampleDecorator_get_is_setup(_ParticleAdaptor p) -> bool
907  """
908  return _IMP_example.ExampleDecorator_get_is_setup(*args)
909 
910 def ExampleDecorator_setup_particle(*args):
911  """
912  setup_particle(Model m, ParticleIndex pi, std::string name) -> ExampleDecorator
913  ExampleDecorator_setup_particle(_ParticleAdaptor decorator, std::string name) -> ExampleDecorator
914  """
915  return _IMP_example.ExampleDecorator_setup_particle(*args)
916 
917 
918 def __lshift__(out, n):
919  """__lshift__(_ostream out, ExampleDecorator n) -> _ostream"""
920  return _IMP_example.__lshift__(out, n)
922  """Proxy of C++ IMP::example::ExampleUnaryFunction class."""
923 
924  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
925 
926  def __init__(self, center, k):
927  """__init__(IMP::example::ExampleUnaryFunction self, IMP::Float center, IMP::Float k) -> ExampleUnaryFunction"""
928  this = _IMP_example.new_ExampleUnaryFunction(center, k)
929  try:
930  self.this.append(this)
931  except __builtin__.Exception:
932  self.this = this
933 
934  def get_version_info(self):
935  """get_version_info(ExampleUnaryFunction self) -> VersionInfo"""
936  return _IMP_example.ExampleUnaryFunction_get_version_info(self)
937 
938 
939  def __str__(self):
940  """__str__(ExampleUnaryFunction self) -> std::string"""
941  return _IMP_example.ExampleUnaryFunction___str__(self)
942 
943 
944  def __repr__(self):
945  """__repr__(ExampleUnaryFunction self) -> std::string"""
946  return _IMP_example.ExampleUnaryFunction___repr__(self)
947 
948 
949  @staticmethod
950  def get_from(o):
951  return _object_cast_to_ExampleUnaryFunction(o)
952 
953 ExampleUnaryFunction_swigregister = _IMP_example.ExampleUnaryFunction_swigregister
954 ExampleUnaryFunction_swigregister(ExampleUnaryFunction)
955 
957  """Proxy of C++ IMP::example::ExampleObject class."""
958 
959  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
960 
961  def __init__(self, data):
962  """__init__(IMP::example::ExampleObject self, IMP::Floats const & data) -> ExampleObject"""
963  this = _IMP_example.new_ExampleObject(data)
964  try:
965  self.this.append(this)
966  except __builtin__.Exception:
967  self.this = this
968 
969  def get_data(self, i):
970  """get_data(ExampleObject self, unsigned int i) -> double"""
971  return _IMP_example.ExampleObject_get_data(self, i)
972 
973 
974  def get_version_info(self):
975  """get_version_info(ExampleObject self) -> VersionInfo"""
976  return _IMP_example.ExampleObject_get_version_info(self)
977 
978 
979  def __str__(self):
980  """__str__(ExampleObject self) -> std::string"""
981  return _IMP_example.ExampleObject___str__(self)
982 
983 
984  def __repr__(self):
985  """__repr__(ExampleObject self) -> std::string"""
986  return _IMP_example.ExampleObject___repr__(self)
987 
988 
989  @staticmethod
990  def get_from(o):
991  return _object_cast_to_ExampleObject(o)
992 
993 ExampleObject_swigregister = _IMP_example.ExampleObject_swigregister
994 ExampleObject_swigregister(ExampleObject)
995 
997  """Proxy of C++ IMP::example::ExampleSingletonModifier class."""
998 
999  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1000 
1001  def __init__(self, bb):
1002  """__init__(IMP::example::ExampleSingletonModifier self, BoundingBox3D bb) -> ExampleSingletonModifier"""
1003  this = _IMP_example.new_ExampleSingletonModifier(bb)
1004  try:
1005  self.this.append(this)
1006  except __builtin__.Exception:
1007  self.this = this
1008 
1009  def do_get_inputs(self, m, pis):
1010  """do_get_inputs(ExampleSingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1011  return _IMP_example.ExampleSingletonModifier_do_get_inputs(self, m, pis)
1012 
1013 
1014  def do_get_outputs(self, m, pis):
1015  """do_get_outputs(ExampleSingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1016  return _IMP_example.ExampleSingletonModifier_do_get_outputs(self, m, pis)
1017 
1018 
1019  def get_version_info(self):
1020  """get_version_info(ExampleSingletonModifier self) -> VersionInfo"""
1021  return _IMP_example.ExampleSingletonModifier_get_version_info(self)
1022 
1023 
1024  def __str__(self):
1025  """__str__(ExampleSingletonModifier self) -> std::string"""
1026  return _IMP_example.ExampleSingletonModifier___str__(self)
1027 
1028 
1029  def __repr__(self):
1030  """__repr__(ExampleSingletonModifier self) -> std::string"""
1031  return _IMP_example.ExampleSingletonModifier___repr__(self)
1032 
1033 
1034  @staticmethod
1035  def get_from(o):
1036  return _object_cast_to_ExampleSingletonModifier(o)
1037 
1038 ExampleSingletonModifier_swigregister = _IMP_example.ExampleSingletonModifier_swigregister
1039 ExampleSingletonModifier_swigregister(ExampleSingletonModifier)
1040 
1042  """Proxy of C++ IMP::example::ExamplePairScore class."""
1043 
1044  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1045 
1046  def __init__(self, x0, k):
1047  """__init__(IMP::example::ExamplePairScore self, double x0, double k) -> ExamplePairScore"""
1048  this = _IMP_example.new_ExamplePairScore(x0, k)
1049  try:
1050  self.this.append(this)
1051  except __builtin__.Exception:
1052  self.this = this
1053 
1054  def do_get_inputs(self, m, pis):
1055  """do_get_inputs(ExamplePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1056  return _IMP_example.ExamplePairScore_do_get_inputs(self, m, pis)
1057 
1058 
1059  def get_version_info(self):
1060  """get_version_info(ExamplePairScore self) -> VersionInfo"""
1061  return _IMP_example.ExamplePairScore_get_version_info(self)
1062 
1063 
1064  def __str__(self):
1065  """__str__(ExamplePairScore self) -> std::string"""
1066  return _IMP_example.ExamplePairScore___str__(self)
1067 
1068 
1069  def __repr__(self):
1070  """__repr__(ExamplePairScore self) -> std::string"""
1071  return _IMP_example.ExamplePairScore___repr__(self)
1072 
1073 
1074  @staticmethod
1075  def get_from(o):
1076  return _object_cast_to_ExamplePairScore(o)
1077 
1078 ExamplePairScore_swigregister = _IMP_example.ExamplePairScore_swigregister
1079 ExamplePairScore_swigregister(ExamplePairScore)
1080 
1082  """Proxy of C++ IMP::example::ExampleSubsetFilterTable class."""
1083 
1084  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1085 
1086  def __init__(self, max_diff, pt):
1087  """__init__(IMP::example::ExampleSubsetFilterTable self, unsigned int max_diff, IMP::ParticlesTemp const & pt) -> ExampleSubsetFilterTable"""
1088  this = _IMP_example.new_ExampleSubsetFilterTable(max_diff, pt)
1089  try:
1090  self.this.append(this)
1091  except __builtin__.Exception:
1092  self.this = this
1093 
1094  def get_version_info(self):
1095  """get_version_info(ExampleSubsetFilterTable self) -> VersionInfo"""
1096  return _IMP_example.ExampleSubsetFilterTable_get_version_info(self)
1097 
1098 
1099  def __str__(self):
1100  """__str__(ExampleSubsetFilterTable self) -> std::string"""
1101  return _IMP_example.ExampleSubsetFilterTable___str__(self)
1102 
1103 
1104  def __repr__(self):
1105  """__repr__(ExampleSubsetFilterTable self) -> std::string"""
1106  return _IMP_example.ExampleSubsetFilterTable___repr__(self)
1107 
1108 
1109  @staticmethod
1110  def get_from(o):
1111  return _object_cast_to_ExampleSubsetFilterTable(o)
1112 
1113 ExampleSubsetFilterTable_swigregister = _IMP_example.ExampleSubsetFilterTable_swigregister
1114 ExampleSubsetFilterTable_swigregister(ExampleSubsetFilterTable)
1115 
1117  """Proxy of C++ IMP::example::ExampleConstraint class."""
1118 
1119  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1120 
1121  def __init__(self, p):
1122  """__init__(IMP::example::ExampleConstraint self, Particle p) -> ExampleConstraint"""
1123  this = _IMP_example.new_ExampleConstraint(p)
1124  try:
1125  self.this.append(this)
1126  except __builtin__.Exception:
1127  self.this = this
1128 
1129  def do_get_inputs(self):
1130  """do_get_inputs(ExampleConstraint self) -> IMP::ModelObjectsTemp"""
1131  return _IMP_example.ExampleConstraint_do_get_inputs(self)
1132 
1133 
1134  def do_get_outputs(self):
1135  """do_get_outputs(ExampleConstraint self) -> IMP::ModelObjectsTemp"""
1136  return _IMP_example.ExampleConstraint_do_get_outputs(self)
1137 
1138 
1139  def get_key():
1140  """get_key() -> IntKey"""
1141  return _IMP_example.ExampleConstraint_get_key()
1142 
1143  get_key = staticmethod(get_key)
1144 
1145  def get_version_info(self):
1146  """get_version_info(ExampleConstraint self) -> VersionInfo"""
1147  return _IMP_example.ExampleConstraint_get_version_info(self)
1148 
1149 
1150  def __str__(self):
1151  """__str__(ExampleConstraint self) -> std::string"""
1152  return _IMP_example.ExampleConstraint___str__(self)
1153 
1154 
1155  def __repr__(self):
1156  """__repr__(ExampleConstraint self) -> std::string"""
1157  return _IMP_example.ExampleConstraint___repr__(self)
1158 
1159 
1160  @staticmethod
1161  def get_from(o):
1162  return _object_cast_to_ExampleConstraint(o)
1163 
1164 ExampleConstraint_swigregister = _IMP_example.ExampleConstraint_swigregister
1165 ExampleConstraint_swigregister(ExampleConstraint)
1166 
1167 def ExampleConstraint_get_key():
1168  """ExampleConstraint_get_key() -> IntKey"""
1169  return _IMP_example.ExampleConstraint_get_key()
1170 
1171 
1172 def create_serial_mover(m, pis):
1173  """create_serial_mover(Model m, IMP::ParticleIndexes const & pis) -> MonteCarloMover"""
1174  return _IMP_example.create_serial_mover(m, pis)
1175 
1176 def optimize_balls(*args):
1177  """
1178  optimize_balls(Model m, IMP::ParticleIndexes const & pis, IMP::RestraintsTemp const & rs, IMP::PairPredicates const & excluded, IMP::OptimizerStates const & opt_states, IMP::LogLevel ll)
1179  optimize_balls(Model m, IMP::ParticleIndexes const & pis, IMP::RestraintsTemp const & rs, IMP::PairPredicates const & excluded, IMP::OptimizerStates const & opt_states)
1180  optimize_balls(Model m, IMP::ParticleIndexes const & pis, IMP::RestraintsTemp const & rs, IMP::PairPredicates const & excluded)
1181  optimize_balls(Model m, IMP::ParticleIndexes const & pis, IMP::RestraintsTemp const & rs)
1182  optimize_balls(Model m, IMP::ParticleIndexes const & pis)
1183  """
1184  return _IMP_example.optimize_balls(*args)
1185 
1186 def optimize_assembly(*args):
1187  """
1188  optimize_assembly(Model m, IMP::ParticleIndexes const & components, IMP::RestraintsTemp const & interactions, IMP::RestraintsTemp const & other_restraints, BoundingBox3D bb, PairScore ev, double cutoff, IMP::PairPredicates const & excluded)
1189  optimize_assembly(Model m, IMP::ParticleIndexes const & components, IMP::RestraintsTemp const & interactions, IMP::RestraintsTemp const & other_restraints, BoundingBox3D bb, PairScore ev, double cutoff)
1190  """
1191  return _IMP_example.optimize_assembly(*args)
1192 
1193 def get_number_of_incidences(psa, psb, point_distance):
1194  """get_number_of_incidences(IMP::ParticlesTemp const & psa, IMP::ParticlesTemp const & psb, double point_distance) -> unsigned int"""
1195  return _IMP_example.get_number_of_incidences(psa, psb, point_distance)
1196 
1197 def create_chain_restraint(m, ps, length_factor, k, name):
1198  """create_chain_restraint(Model m, IMP::ParticleIndexes const & ps, double length_factor, double k, std::string name) -> Restraint"""
1199  return _IMP_example.create_chain_restraint(m, ps, length_factor, k, name)
1200 
1201 def create_excluded_volume(m, ps, k, name):
1202  """create_excluded_volume(Model m, IMP::ParticleIndexes const & ps, double k, std::string name) -> Restraint"""
1203  return _IMP_example.create_excluded_volume(m, ps, k, name)
1204 class ExampleTemplateClass3D(object):
1205  """Proxy of C++ IMP::example::ExampleTemplateClassD<(3)> class."""
1206 
1207  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1208 
1209  def __init__(self, *args):
1210  """
1211  __init__(IMP::example::ExampleTemplateClassD<(3)> self) -> ExampleTemplateClass3D
1212  __init__(IMP::example::ExampleTemplateClassD<(3)> self, Vector3D a, Vector3D b) -> ExampleTemplateClass3D
1213  """
1214  this = _IMP_example.new_ExampleTemplateClass3D(*args)
1215  try:
1216  self.this.append(this)
1217  except __builtin__.Exception:
1218  self.this = this
1219 
1220  def get_point(self, i):
1221  """get_point(ExampleTemplateClass3D self, unsigned int i) -> Vector3D"""
1222  return _IMP_example.ExampleTemplateClass3D_get_point(self, i)
1223 
1224 
1225  def show(self, *args):
1226  """
1227  show(ExampleTemplateClass3D self, _ostream out)
1228  show(ExampleTemplateClass3D self)
1229  """
1230  return _IMP_example.ExampleTemplateClass3D_show(self, *args)
1231 
1232 
1233  def __str__(self):
1234  """__str__(ExampleTemplateClass3D self) -> std::string"""
1235  return _IMP_example.ExampleTemplateClass3D___str__(self)
1236 
1237 
1238  def __repr__(self):
1239  """__repr__(ExampleTemplateClass3D self) -> std::string"""
1240  return _IMP_example.ExampleTemplateClass3D___repr__(self)
1241 
1242  __swig_destroy__ = _IMP_example.delete_ExampleTemplateClass3D
1243  __del__ = lambda self: None
1244 ExampleTemplateClass3D_swigregister = _IMP_example.ExampleTemplateClass3D_swigregister
1245 ExampleTemplateClass3D_swigregister(ExampleTemplateClass3D)
1246 
1247 
1248 def get_module_version():
1249  """get_module_version() -> std::string const"""
1250  return _IMP_example.get_module_version()
1251 
1252 def get_example_path(fname):
1253  """get_example_path(std::string fname) -> std::string"""
1254  return _IMP_example.get_example_path(fname)
1255 
1256 def get_data_path(fname):
1257  """get_data_path(std::string fname) -> std::string"""
1258  return _IMP_example.get_data_path(fname)
1259 
1260 from . import _version_check
1261 _version_check.check_version(get_module_version())
1262 __version__ = get_module_version()
1263 
1264 
1265 
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:37
virtual double evaluate(double feature) const
Calculate score with respect to the given feature.
Definition: UnaryFunction.h:33
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.
virtual void do_add_score_and_derivatives(ScoreAccumulator sa) const
A restraint should override this to compute the score and derivatives.
Make CGAL functionality available to IMP.
A line segment templated on the dimension.
ParticlesTemp get_particles(Model *m, const ParticleIndexes &ps)
virtual void clear_caches()
Definition: Object.h:227
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.
core::MonteCarloMover * create_serial_mover(Model *m, const ParticleIndexes &pis)
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:72
An example simple object which is reference counted.
Definition: ExampleObject.h:29
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:106
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.
void optimize_balls(Model *m, const ParticleIndexes &pis, const RestraintsTemp &rs=RestraintsTemp(), const PairPredicates &excluded=PairPredicates(), const OptimizerStates &opt_states=OptimizerStates(), LogLevel ll=DEFAULT)
Restrain a particle to be in the x,y plane.
void optimize_assembly(Model *m, const ParticleIndexes &components, const RestraintsTemp &interactions, const RestraintsTemp &other_restraints, const algebra::BoundingBox3D &bb, PairScore *ev, double cutoff, const PairPredicates &excluded=PairPredicates())
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:118
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
virtual VersionInfo get_version_info() const
Get information about the module and version of the object.
Definition: Object.h:173
virtual DerivativePair evaluate_with_derivative(double feature) const
Calculate score and derivative with respect to the given feature.
Definition: UnaryFunction.h:48
VectorD< 3 > Vector3D
Definition: VectorD.h:395
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:40
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:25
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.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:54