IMP logo
IMP Reference Guide  2.9.0
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-2018 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_GPERFTOOLS = _IMP_example.IMP_KERNEL_HAS_GPERFTOOLS
239 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
240 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
241 IMPKERNEL_SHOW_WARNINGS = _IMP_example.IMPKERNEL_SHOW_WARNINGS
242 
243 import sys
244 class _DirectorObjects(object):
245  """@internal Simple class to keep references to director objects
246  to prevent premature deletion."""
247  def __init__(self):
248  self._objects = []
249  def register(self, obj):
250  """Take a reference to a director object; will only work for
251  refcounted C++ classes"""
252  if hasattr(obj, 'get_ref_count'):
253  self._objects.append(obj)
254  def cleanup(self):
255  """Only drop our reference and allow cleanup by Python if no other
256  Python references exist (we hold 3 references: one in self._objects,
257  one in x, and one in the argument list for getrefcount) *and* no
258  other C++ references exist (the Python object always holds one)"""
259  objs = [x for x in self._objects if sys.getrefcount(x) > 3 \
260  or x.get_ref_count() > 1]
261 # Do in two steps so the references are kept until the end of the
262 # function (deleting references may trigger a fresh call to this method)
263  self._objects = objs
264  def get_object_count(self):
265  """Get number of director objects (useful for testing only)"""
266  return len(self._objects)
267 _director_objects = _DirectorObjects()
268 
269 class _ostream(object):
270  """Proxy of C++ std::ostream class."""
271 
272  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
273 
274  def __init__(self, *args, **kwargs):
275  raise AttributeError("No constructor defined")
276  __repr__ = _swig_repr
277 
278  def write(self, osa_buf):
279  """write(_ostream self, char const * osa_buf)"""
280  return _IMP_example._ostream_write(self, osa_buf)
281 
282 _ostream_swigregister = _IMP_example._ostream_swigregister
283 _ostream_swigregister(_ostream)
284 
285 IMP_COMPILER_HAS_OVERRIDE = _IMP_example.IMP_COMPILER_HAS_OVERRIDE
286 IMP_COMPILER_HAS_FINAL = _IMP_example.IMP_COMPILER_HAS_FINAL
287 IMP_HAS_NOEXCEPT = _IMP_example.IMP_HAS_NOEXCEPT
288 IMP_C_OPEN_BINARY = _IMP_example.IMP_C_OPEN_BINARY
289 import IMP
290 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CGAL_HAS_BOOST_FILESYSTEM
291 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
292 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_example.IMP_CGAL_HAS_BOOST_RANDOM
293 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_example.IMP_CGAL_HAS_BOOST_SYSTEM
294 IMPCGAL_SHOW_WARNINGS = _IMP_example.IMPCGAL_SHOW_WARNINGS
295 import IMP.cgal
296 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_example.IMP_ALGEBRA_HAS_IMP_CGAL
297 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
298 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
299 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_RANDOM
300 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_SYSTEM
301 IMP_ALGEBRA_HAS_CGAL = _IMP_example.IMP_ALGEBRA_HAS_CGAL
302 IMP_ALGEBRA_HAS_ANN = _IMP_example.IMP_ALGEBRA_HAS_ANN
303 IMPALGEBRA_SHOW_WARNINGS = _IMP_example.IMPALGEBRA_SHOW_WARNINGS
304 import IMP.algebra
305 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_example.IMP_DISPLAY_HAS_IMP_CGAL
306 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
307 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
308 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_example.IMP_DISPLAY_HAS_BOOST_RANDOM
309 IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_example.IMP_DISPLAY_HAS_BOOST_SYSTEM
310 IMP_DISPLAY_HAS_CGAL = _IMP_example.IMP_DISPLAY_HAS_CGAL
311 IMPDISPLAY_SHOW_WARNINGS = _IMP_example.IMPDISPLAY_SHOW_WARNINGS
312 import IMP.display
313 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_example.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
314 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
315 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
316 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
317 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
318 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_example.IMP_SCORE_FUNCTOR_HAS_CGAL
319 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_example.IMP_SCORE_FUNCTOR_HAS_HDF5
320 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_example.IMPSCOREFUNCTOR_SHOW_WARNINGS
321 import IMP.score_functor
322 IMP_STATISTICS_HAS_IMP_CGAL = _IMP_example.IMP_STATISTICS_HAS_IMP_CGAL
323 IMP_STATISTICS_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_STATISTICS_HAS_BOOST_FILESYSTEM
324 IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS
325 IMP_STATISTICS_HAS_BOOST_RANDOM = _IMP_example.IMP_STATISTICS_HAS_BOOST_RANDOM
326 IMP_STATISTICS_HAS_BOOST_SYSTEM = _IMP_example.IMP_STATISTICS_HAS_BOOST_SYSTEM
327 IMP_STATISTICS_HAS_CGAL = _IMP_example.IMP_STATISTICS_HAS_CGAL
328 IMPSTATISTICS_SHOW_WARNINGS = _IMP_example.IMPSTATISTICS_SHOW_WARNINGS
329 import IMP.statistics
330 IMP_CORE_HAS_IMP_CGAL = _IMP_example.IMP_CORE_HAS_IMP_CGAL
331 IMP_CORE_HAS_IMP_KERNEL = _IMP_example.IMP_CORE_HAS_IMP_KERNEL
332 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CORE_HAS_BOOST_FILESYSTEM
333 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
334 IMP_CORE_HAS_BOOST_RANDOM = _IMP_example.IMP_CORE_HAS_BOOST_RANDOM
335 IMP_CORE_HAS_BOOST_SYSTEM = _IMP_example.IMP_CORE_HAS_BOOST_SYSTEM
336 IMP_CORE_HAS_CGAL = _IMP_example.IMP_CORE_HAS_CGAL
337 IMP_CORE_HAS_HDF5 = _IMP_example.IMP_CORE_HAS_HDF5
338 IMPCORE_SHOW_WARNINGS = _IMP_example.IMPCORE_SHOW_WARNINGS
339 import IMP.core
340 IMP_CONTAINER_HAS_IMP_ALGEBRA = _IMP_example.IMP_CONTAINER_HAS_IMP_ALGEBRA
341 IMP_CONTAINER_HAS_IMP_CGAL = _IMP_example.IMP_CONTAINER_HAS_IMP_CGAL
342 IMP_CONTAINER_HAS_IMP_DISPLAY = _IMP_example.IMP_CONTAINER_HAS_IMP_DISPLAY
343 IMP_CONTAINER_HAS_IMP_KERNEL = _IMP_example.IMP_CONTAINER_HAS_IMP_KERNEL
344 IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR
345 IMP_CONTAINER_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CONTAINER_HAS_BOOST_FILESYSTEM
346 IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS
347 IMP_CONTAINER_HAS_BOOST_RANDOM = _IMP_example.IMP_CONTAINER_HAS_BOOST_RANDOM
348 IMP_CONTAINER_HAS_BOOST_SYSTEM = _IMP_example.IMP_CONTAINER_HAS_BOOST_SYSTEM
349 IMP_CONTAINER_HAS_CGAL = _IMP_example.IMP_CONTAINER_HAS_CGAL
350 IMP_CONTAINER_HAS_HDF5 = _IMP_example.IMP_CONTAINER_HAS_HDF5
351 IMP_CONTAINER_HAS_PYTHON_IHM = _IMP_example.IMP_CONTAINER_HAS_PYTHON_IHM
352 IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_example.IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP
353 IMP_CONTAINER_HAS_ROBIN_MAP = _IMP_example.IMP_CONTAINER_HAS_ROBIN_MAP
354 IMPCONTAINER_SHOW_WARNINGS = _IMP_example.IMPCONTAINER_SHOW_WARNINGS
355 import IMP.container
356 IMP_ATOM_HAS_IMP_CGAL = _IMP_example.IMP_ATOM_HAS_IMP_CGAL
357 IMP_ATOM_HAS_IMP_KERNEL = _IMP_example.IMP_ATOM_HAS_IMP_KERNEL
358 IMP_ATOM_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR
359 IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS
360 IMP_ATOM_HAS_BOOST_RANDOM = _IMP_example.IMP_ATOM_HAS_BOOST_RANDOM
361 IMP_ATOM_HAS_BOOST_REGEX = _IMP_example.IMP_ATOM_HAS_BOOST_REGEX
362 IMP_ATOM_HAS_BOOST_SYSTEM = _IMP_example.IMP_ATOM_HAS_BOOST_SYSTEM
363 IMP_ATOM_HAS_CGAL = _IMP_example.IMP_ATOM_HAS_CGAL
364 IMP_ATOM_HAS_HDF5 = _IMP_example.IMP_ATOM_HAS_HDF5
365 IMP_ATOM_HAS_PYTHON_IHM = _IMP_example.IMP_ATOM_HAS_PYTHON_IHM
366 IMPATOM_SHOW_WARNINGS = _IMP_example.IMPATOM_SHOW_WARNINGS
367 IMP_ATOM_TYPE_INDEX = _IMP_example.IMP_ATOM_TYPE_INDEX
368 IMP_RESIDUE_TYPE_INDEX = _IMP_example.IMP_RESIDUE_TYPE_INDEX
369 IMP_HIERARCHY_TYPE_INDEX = _IMP_example.IMP_HIERARCHY_TYPE_INDEX
370 IMP_CHAIN_TYPE_INDEX = _IMP_example.IMP_CHAIN_TYPE_INDEX
371 import IMP.atom
372 IMP_RMF_HAS_IMP_CGAL = _IMP_example.IMP_RMF_HAS_IMP_CGAL
373 IMP_RMF_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_RMF_HAS_IMP_SCORE_FUNCTOR
374 IMP_RMF_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_RMF_HAS_BOOST_FILESYSTEM
375 IMP_RMF_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_RMF_HAS_BOOST_PROGRAMOPTIONS
376 IMP_RMF_HAS_BOOST_RANDOM = _IMP_example.IMP_RMF_HAS_BOOST_RANDOM
377 IMP_RMF_HAS_BOOST_REGEX = _IMP_example.IMP_RMF_HAS_BOOST_REGEX
378 IMP_RMF_HAS_BOOST_SYSTEM = _IMP_example.IMP_RMF_HAS_BOOST_SYSTEM
379 IMP_RMF_HAS_CGAL = _IMP_example.IMP_RMF_HAS_CGAL
380 IMP_RMF_HAS_HDF5 = _IMP_example.IMP_RMF_HAS_HDF5
381 IMP_RMF_HAS_PYTHON_IHM = _IMP_example.IMP_RMF_HAS_PYTHON_IHM
382 IMPRMF_SHOW_WARNINGS = _IMP_example.IMPRMF_SHOW_WARNINGS
383 import IMP.rmf
384 import RMF
385 IMP_DOMINO_HAS_IMP_ATOM = _IMP_example.IMP_DOMINO_HAS_IMP_ATOM
386 IMP_DOMINO_HAS_IMP_CGAL = _IMP_example.IMP_DOMINO_HAS_IMP_CGAL
387 IMP_DOMINO_HAS_IMP_KERNEL = _IMP_example.IMP_DOMINO_HAS_IMP_KERNEL
388 IMP_DOMINO_HAS_IMP_RMF = _IMP_example.IMP_DOMINO_HAS_IMP_RMF
389 IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR
390 IMP_DOMINO_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_DOMINO_HAS_BOOST_FILESYSTEM
391 IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS
392 IMP_DOMINO_HAS_BOOST_RANDOM = _IMP_example.IMP_DOMINO_HAS_BOOST_RANDOM
393 IMP_DOMINO_HAS_BOOST_REGEX = _IMP_example.IMP_DOMINO_HAS_BOOST_REGEX
394 IMP_DOMINO_HAS_BOOST_SYSTEM = _IMP_example.IMP_DOMINO_HAS_BOOST_SYSTEM
395 IMP_DOMINO_HAS_CGAL = _IMP_example.IMP_DOMINO_HAS_CGAL
396 IMP_DOMINO_HAS_HDF5 = _IMP_example.IMP_DOMINO_HAS_HDF5
397 IMP_DOMINO_HAS_RMF = _IMP_example.IMP_DOMINO_HAS_RMF
398 IMP_DOMINO_HAS_PYTHON_IHM = _IMP_example.IMP_DOMINO_HAS_PYTHON_IHM
399 IMPDOMINO_SHOW_WARNINGS = _IMP_example.IMPDOMINO_SHOW_WARNINGS
400 import RMF_HDF5
401 import IMP.domino
402 IMP_EXAMPLE_HAS_IMP_ALGEBRA = _IMP_example.IMP_EXAMPLE_HAS_IMP_ALGEBRA
403 IMP_EXAMPLE_HAS_IMP_CGAL = _IMP_example.IMP_EXAMPLE_HAS_IMP_CGAL
404 IMP_EXAMPLE_HAS_IMP_DISPLAY = _IMP_example.IMP_EXAMPLE_HAS_IMP_DISPLAY
405 IMP_EXAMPLE_HAS_IMP_KERNEL = _IMP_example.IMP_EXAMPLE_HAS_IMP_KERNEL
406 IMP_EXAMPLE_HAS_IMP_RMF = _IMP_example.IMP_EXAMPLE_HAS_IMP_RMF
407 IMP_EXAMPLE_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_EXAMPLE_HAS_IMP_SCORE_FUNCTOR
408 IMP_EXAMPLE_HAS_IMP_STATISTICS = _IMP_example.IMP_EXAMPLE_HAS_IMP_STATISTICS
409 IMP_EXAMPLE_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_FILESYSTEM
410 IMP_EXAMPLE_HAS_BOOST_GRAPH = _IMP_example.IMP_EXAMPLE_HAS_BOOST_GRAPH
411 IMP_EXAMPLE_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_EXAMPLE_HAS_BOOST_PROGRAMOPTIONS
412 IMP_EXAMPLE_HAS_BOOST_RANDOM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_RANDOM
413 IMP_EXAMPLE_HAS_BOOST_REGEX = _IMP_example.IMP_EXAMPLE_HAS_BOOST_REGEX
414 IMP_EXAMPLE_HAS_BOOST_SYSTEM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_SYSTEM
415 IMP_EXAMPLE_HAS_CGAL = _IMP_example.IMP_EXAMPLE_HAS_CGAL
416 IMP_EXAMPLE_HAS_HDF5 = _IMP_example.IMP_EXAMPLE_HAS_HDF5
417 IMP_EXAMPLE_HAS_RMF = _IMP_example.IMP_EXAMPLE_HAS_RMF
418 IMP_EXAMPLE_HAS_PYTHON_IHM = _IMP_example.IMP_EXAMPLE_HAS_PYTHON_IHM
419 IMP_EXAMPLE_HAS_EXAMPLEDEPENDENCY = _IMP_example.IMP_EXAMPLE_HAS_EXAMPLEDEPENDENCY
420 IMPEXAMPLE_SHOW_WARNINGS = _IMP_example.IMPEXAMPLE_SHOW_WARNINGS
421 
422 _object_types.append("ExampleRestraint")
423 
424 
425 def _object_cast_to_ExampleRestraint(o):
426  """_object_cast_to_ExampleRestraint(Object o) -> ExampleRestraint"""
427  return _IMP_example._object_cast_to_ExampleRestraint(o)
428 
429 def ExampleDecorators(l=[]):
430  return [ExampleDecorator(x) for x in l]
431 _plural_types.append("ExampleDecorators")
432 
433 
434 _value_types.append("ExampleDecorator")
435 
436 
437 _object_types.append("ExampleUnaryFunction")
438 
439 
440 def _object_cast_to_ExampleUnaryFunction(o):
441  """_object_cast_to_ExampleUnaryFunction(Object o) -> ExampleUnaryFunction"""
442  return _IMP_example._object_cast_to_ExampleUnaryFunction(o)
443 
444 _object_types.append("ExampleSingletonModifier")
445 
446 
447 def _object_cast_to_ExampleSingletonModifier(o):
448  """_object_cast_to_ExampleSingletonModifier(Object o) -> ExampleSingletonModifier"""
449  return _IMP_example._object_cast_to_ExampleSingletonModifier(o)
450 
451 _object_types.append("ExamplePairScore")
452 
453 
454 def _object_cast_to_ExamplePairScore(o):
455  """_object_cast_to_ExamplePairScore(Object o) -> ExamplePairScore"""
456  return _IMP_example._object_cast_to_ExamplePairScore(o)
457 
458 _object_types.append("ExampleSubsetFilterTable")
459 
460 
461 def _object_cast_to_ExampleSubsetFilterTable(o):
462  """_object_cast_to_ExampleSubsetFilterTable(Object o) -> ExampleSubsetFilterTable"""
463  return _IMP_example._object_cast_to_ExampleSubsetFilterTable(o)
464 
465 _object_types.append("ExampleConstraint")
466 
467 
468 def _object_cast_to_ExampleConstraint(o):
469  """_object_cast_to_ExampleConstraint(Object o) -> ExampleConstraint"""
470  return _IMP_example._object_cast_to_ExampleConstraint(o)
471 
472 _object_types.append("ExampleObject")
473 
474 
475 def _object_cast_to_ExampleObject(o):
476  """_object_cast_to_ExampleObject(Object o) -> ExampleObject"""
477  return _IMP_example._object_cast_to_ExampleObject(o)
478 
479 ExampleTemplateClass3Ds=list
480 _plural_types.append("ExampleTemplateClass3Ds")
481 _value_types.append("ExampleTemplateClass3D")
482 
483 
484 def create_model_and_particles():
485  m = IMP.Model()
488  IMP.algebra.Vector3D(10,10,10))
489  for i in range(0,100):
490  p = m.add_particle("p")
491  sc.add(p)
494  d.set_coordinates_are_optimized(True)
495  return (m, sc)
496 
497 
498 
500  """An example restraint written in Python.
501  This should be functionally equivalent to the C++ ExampleRestraint.
502  """
503  def __init__(self, m, p, k):
504  IMP.Restraint.__init__(self, m, "PythonExampleRestraint%1%")
505  self.p, self.k = p, k
506 
507  def do_add_score_and_derivatives(self, sa):
508  d = IMP.core.XYZ(self.get_model(), self.p)
509  score = .5 * self.k * d.get_z() * d.get_z()
510  if sa.get_derivative_accumulator():
511  deriv = self.k * d.get_z()
512  d.add_to_derivative(2, deriv, sa.get_derivative_accumulator())
513  sa.add_score(score)
514 
515  def do_get_inputs(self):
516  return [self.get_model().get_particle(self.p)]
517 
518 
519 
520 
522  """An example PairScore written in Python.
523  This should be functionally equivalent to the C++ ExamplePairScore.
524  """
525  def __init__(self, x0, k):
526  IMP.PairScore.__init__(self)
527  self.x0, self.k = x0, k
528 
529  def evaluate_index(self, m, pip, da):
530  d0 = IMP.core.XYZ(m, pip[0])
531  d1 = IMP.core.XYZ(m, pip[1])
532  diff = (d0.get_coordinates()
533  - d1.get_coordinates()).get_magnitude() - self.x0
534  score = .5 * self.k * diff * diff
535  if da:
536 # derivatives are requested
537  delta = d0.get_coordinates() - d1.get_coordinates()
538  udelta = delta.get_unit_vector()
539  dv = self.k * diff
540  d0.add_to_derivatives(udelta * dv, da)
541  d1.add_to_derivatives(-udelta * dv, da)
542  return score
543 
544  def do_get_inputs(self, m, pis):
545  return IMP.get_particles(m, pis)
546 
547 
548 
549 
551  """An example UnaryFunction written in Python.
552  This should be functionally equivalent to the C++ ExampleUnaryFunction.
553  """
554  def __init__(self, center, k):
555  IMP.UnaryFunction.__init__(self)
556  self.center, self.k = center, k
557 
558  def evaluate_with_derivative(self, feature):
559  return (self.evaluate(feature), self.k * (feature - self.center))
560 
561  def evaluate(self, feature):
562  return .5 * self.k * (feature - self.center) * (feature - self.center)
563 
564 
565 
566 
568  """An example Constraint written in Python.
569  This should be functionally equivalent to the C++ ExampleConstraint.
570  """
571 
572  k = None
573 
574  def __init__(self, p):
575  IMP.Constraint.__init__(self, p.get_model(), "ExampleConstraint%1%")
576  self.p = p
577  if self.k is None:
578  PythonExampleConstraint.k = IMP.IntKey("Constraint key")
579  if not p.has_attribute(self.k):
580  p.add_attribute(self.k, 0)
581 
582  def do_update_attributes(self):
583  self.p.set_value(self.k, self.p.get_value(self.k) + 1)
584 
585  def do_update_derivatives(self, da):
586  pass
587 
588  def do_get_inputs(self):
589  return [self.p]
590 
591  def do_get_outputs(self):
592  return [self.p]
593 
594 
595 
596 
598  """An example SingletonModifier written in Python.
599  This should be functionally equivalent to the C++
600  ExampleSingletonModifier.
601  """
602 
603  def __init__(self, bb):
604  IMP.SingletonModifier.__init__(self, "ExampleSingletonModifier%1%")
605  self.bb = bb
606 
607  def apply_index(self, m, pi):
608  d = IMP.core.XYZ(m, pi)
609  for i in range(3):
610 # shift the coordinate until it is in the box
611  while d.get_coordinate(i) < self.bb.get_corner(0)[i]:
612  d.set_coordinate(i,d.get_coordinate(i) + \
613  (self.bb.get_corner(1)[i] - self.bb.get_corner(0)[i]))
614  while d.get_coordinate(i) > self.bb.get_corner(1)[i]:
615  d.set_coordinate(i,d.get_coordinate(i) - \
616  (self.bb.get_corner(1)[i] - self.bb.get_corner(0)[i]))
617 
618  def do_get_inputs(self, m, pis):
619  return IMP.get_particles(m, pis)
620 
621  def do_get_outputs(self, m, pis):
622  return self.do_get_inputs(m, pis)
623 
624 
626  """Proxy of C++ IMP::example::ExampleRestraint class."""
627 
628  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
629 
630  def __init__(self, m, p, k):
631  """__init__(IMP::example::ExampleRestraint self, Model m, ParticleIndex p, double k) -> ExampleRestraint"""
632  this = _IMP_example.new_ExampleRestraint(m, p, k)
633  try:
634  self.this.append(this)
635  except __builtin__.Exception:
636  self.this = this
637 
638  def do_add_score_and_derivatives(self, sa):
639  """do_add_score_and_derivatives(ExampleRestraint self, ScoreAccumulator sa)"""
640  return _IMP_example.ExampleRestraint_do_add_score_and_derivatives(self, sa)
641 
642 
643  def do_get_inputs(self):
644  """do_get_inputs(ExampleRestraint self) -> IMP::ModelObjectsTemp"""
645  return _IMP_example.ExampleRestraint_do_get_inputs(self)
646 
647 
648  def get_version_info(self):
649  """get_version_info(ExampleRestraint self) -> VersionInfo"""
650  return _IMP_example.ExampleRestraint_get_version_info(self)
651 
652 
653  def __str__(self):
654  """__str__(ExampleRestraint self) -> std::string"""
655  return _IMP_example.ExampleRestraint___str__(self)
656 
657 
658  def __repr__(self):
659  """__repr__(ExampleRestraint self) -> std::string"""
660  return _IMP_example.ExampleRestraint___repr__(self)
661 
662 
663  @staticmethod
664  def get_from(o):
665  return _object_cast_to_ExampleRestraint(o)
666 
667 ExampleRestraint_swigregister = _IMP_example.ExampleRestraint_swigregister
668 ExampleRestraint_swigregister(ExampleRestraint)
669 
671  """Proxy of C++ IMP::example::ExampleDecorator class."""
672 
673  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
674 
675  def get_decorator_name(self):
676  """get_decorator_name(ExampleDecorator self) -> std::string"""
677  return _IMP_example.ExampleDecorator_get_decorator_name(self)
678 
679 
680  def set_decorator_name(self, nm):
681  """set_decorator_name(ExampleDecorator self, std::string nm)"""
682  return _IMP_example.ExampleDecorator_set_decorator_name(self, nm)
683 
684 
685  def __init__(self, *args):
686  """
687  __init__(IMP::example::ExampleDecorator self) -> ExampleDecorator
688  __init__(IMP::example::ExampleDecorator self, Model m, ParticleIndex id) -> ExampleDecorator
689  __init__(IMP::example::ExampleDecorator self, _ParticleAdaptor d) -> ExampleDecorator
690  """
691  this = _IMP_example.new_ExampleDecorator(*args)
692  try:
693  self.this.append(this)
694  except __builtin__.Exception:
695  self.this = this
696 
697  def get_is_setup(*args):
698  """
699  get_is_setup(Model m, ParticleIndex pi) -> bool
700  get_is_setup(_ParticleAdaptor p) -> bool
701  """
702  return _IMP_example.ExampleDecorator_get_is_setup(*args)
703 
704  get_is_setup = staticmethod(get_is_setup)
705 
706  def show(self, *args):
707  """
708  show(ExampleDecorator self, _ostream out)
709  show(ExampleDecorator self)
710  """
711  return _IMP_example.ExampleDecorator_show(self, *args)
712 
713 
714  def setup_particle(*args):
715  """
716  setup_particle(Model m, ParticleIndex pi, std::string name) -> ExampleDecorator
717  setup_particle(_ParticleAdaptor decorator, std::string name) -> ExampleDecorator
718  """
719  return _IMP_example.ExampleDecorator_setup_particle(*args)
720 
721  setup_particle = staticmethod(setup_particle)
722 
723  def add_attribute(self, *args):
724  """
725  add_attribute(ExampleDecorator self, FloatKey k, IMP::Float v, bool opt)
726  add_attribute(ExampleDecorator self, FloatKey a0, IMP::Float a1)
727  add_attribute(ExampleDecorator self, IntKey a0, IMP::Int a1)
728  add_attribute(ExampleDecorator self, StringKey a0, IMP::String a1)
729  add_attribute(ExampleDecorator self, ParticleIndexKey a0, Particle a1)
730  add_attribute(ExampleDecorator self, ObjectKey a0, Object a1)
731  """
732  return _IMP_example.ExampleDecorator_add_attribute(self, *args)
733 
734 
735  def get_value(self, *args):
736  """
737  get_value(ExampleDecorator self, FloatKey a0) -> IMP::Float
738  get_value(ExampleDecorator self, IntKey a0) -> IMP::Int
739  get_value(ExampleDecorator self, StringKey a0) -> IMP::String
740  get_value(ExampleDecorator self, ParticleIndexKey a0) -> Particle
741  get_value(ExampleDecorator self, ObjectKey a0) -> Object
742  """
743  return _IMP_example.ExampleDecorator_get_value(self, *args)
744 
745 
746  def set_value(self, *args):
747  """
748  set_value(ExampleDecorator self, FloatKey a0, IMP::Float a1)
749  set_value(ExampleDecorator self, IntKey a0, IMP::Int a1)
750  set_value(ExampleDecorator self, StringKey a0, IMP::String a1)
751  set_value(ExampleDecorator self, ParticleIndexKey a0, Particle a1)
752  set_value(ExampleDecorator self, ObjectKey a0, Object a1)
753  """
754  return _IMP_example.ExampleDecorator_set_value(self, *args)
755 
756 
757  def remove_attribute(self, *args):
758  """
759  remove_attribute(ExampleDecorator self, FloatKey a0)
760  remove_attribute(ExampleDecorator self, IntKey a0)
761  remove_attribute(ExampleDecorator self, StringKey a0)
762  remove_attribute(ExampleDecorator self, ParticleIndexKey a0)
763  remove_attribute(ExampleDecorator self, ObjectKey a0)
764  """
765  return _IMP_example.ExampleDecorator_remove_attribute(self, *args)
766 
767 
768  def has_attribute(self, *args):
769  """
770  has_attribute(ExampleDecorator self, FloatKey a0) -> bool
771  has_attribute(ExampleDecorator self, IntKey a0) -> bool
772  has_attribute(ExampleDecorator self, StringKey a0) -> bool
773  has_attribute(ExampleDecorator self, ParticleIndexKey a0) -> bool
774  has_attribute(ExampleDecorator self, ObjectKey a0) -> bool
775  """
776  return _IMP_example.ExampleDecorator_has_attribute(self, *args)
777 
778 
779  def get_derivative(self, a0):
780  """get_derivative(ExampleDecorator self, FloatKey a0) -> double"""
781  return _IMP_example.ExampleDecorator_get_derivative(self, a0)
782 
783 
784  def get_name(self):
785  """get_name(ExampleDecorator self) -> std::string"""
786  return _IMP_example.ExampleDecorator_get_name(self)
787 
788 
789  def clear_caches(self):
790  """clear_caches(ExampleDecorator self)"""
791  return _IMP_example.ExampleDecorator_clear_caches(self)
792 
793 
794  def set_name(self, a0):
795  """set_name(ExampleDecorator self, std::string a0)"""
796  return _IMP_example.ExampleDecorator_set_name(self, a0)
797 
798 
799  def set_check_level(self, a0):
800  """set_check_level(ExampleDecorator self, IMP::CheckLevel a0)"""
801  return _IMP_example.ExampleDecorator_set_check_level(self, a0)
802 
803 
804  def add_to_derivative(self, a0, a1, a2):
805  """add_to_derivative(ExampleDecorator self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
806  return _IMP_example.ExampleDecorator_add_to_derivative(self, a0, a1, a2)
807 
808 
809  def set_is_optimized(self, a0, a1):
810  """set_is_optimized(ExampleDecorator self, FloatKey a0, bool a1)"""
811  return _IMP_example.ExampleDecorator_set_is_optimized(self, a0, a1)
812 
813 
814  def get_is_optimized(self, a0):
815  """get_is_optimized(ExampleDecorator self, FloatKey a0) -> bool"""
816  return _IMP_example.ExampleDecorator_get_is_optimized(self, a0)
817 
818 
819  def get_check_level(self):
820  """get_check_level(ExampleDecorator self) -> IMP::CheckLevel"""
821  return _IMP_example.ExampleDecorator_get_check_level(self)
822 
823 
824  def __eq__(self, *args):
825  """
826  __eq__(ExampleDecorator self, ExampleDecorator o) -> bool
827  __eq__(ExampleDecorator self, Particle d) -> bool
828  """
829  return _IMP_example.ExampleDecorator___eq__(self, *args)
830 
831 
832  def __ne__(self, *args):
833  """
834  __ne__(ExampleDecorator self, ExampleDecorator o) -> bool
835  __ne__(ExampleDecorator self, Particle d) -> bool
836  """
837  return _IMP_example.ExampleDecorator___ne__(self, *args)
838 
839 
840  def __le__(self, *args):
841  """
842  __le__(ExampleDecorator self, ExampleDecorator o) -> bool
843  __le__(ExampleDecorator self, Particle d) -> bool
844  """
845  return _IMP_example.ExampleDecorator___le__(self, *args)
846 
847 
848  def __lt__(self, *args):
849  """
850  __lt__(ExampleDecorator self, ExampleDecorator o) -> bool
851  __lt__(ExampleDecorator self, Particle d) -> bool
852  """
853  return _IMP_example.ExampleDecorator___lt__(self, *args)
854 
855 
856  def __ge__(self, *args):
857  """
858  __ge__(ExampleDecorator self, ExampleDecorator o) -> bool
859  __ge__(ExampleDecorator self, Particle d) -> bool
860  """
861  return _IMP_example.ExampleDecorator___ge__(self, *args)
862 
863 
864  def __gt__(self, *args):
865  """
866  __gt__(ExampleDecorator self, ExampleDecorator o) -> bool
867  __gt__(ExampleDecorator self, Particle d) -> bool
868  """
869  return _IMP_example.ExampleDecorator___gt__(self, *args)
870 
871 
872  def __hash__(self):
873  """__hash__(ExampleDecorator self) -> std::size_t"""
874  return _IMP_example.ExampleDecorator___hash__(self)
875 
876 
877  def __str__(self):
878  """__str__(ExampleDecorator self) -> std::string"""
879  return _IMP_example.ExampleDecorator___str__(self)
880 
881 
882  def __repr__(self):
883  """__repr__(ExampleDecorator self) -> std::string"""
884  return _IMP_example.ExampleDecorator___repr__(self)
885 
886  __swig_destroy__ = _IMP_example.delete_ExampleDecorator
887  __del__ = lambda self: None
888 ExampleDecorator_swigregister = _IMP_example.ExampleDecorator_swigregister
889 ExampleDecorator_swigregister(ExampleDecorator)
890 
891 def ExampleDecorator_get_is_setup(*args):
892  """
893  get_is_setup(Model m, ParticleIndex pi) -> bool
894  ExampleDecorator_get_is_setup(_ParticleAdaptor p) -> bool
895  """
896  return _IMP_example.ExampleDecorator_get_is_setup(*args)
897 
898 def ExampleDecorator_setup_particle(*args):
899  """
900  setup_particle(Model m, ParticleIndex pi, std::string name) -> ExampleDecorator
901  ExampleDecorator_setup_particle(_ParticleAdaptor decorator, std::string name) -> ExampleDecorator
902  """
903  return _IMP_example.ExampleDecorator_setup_particle(*args)
904 
905 
906 def __lshift__(out, n):
907  """__lshift__(_ostream out, ExampleDecorator n) -> _ostream"""
908  return _IMP_example.__lshift__(out, n)
910  """Proxy of C++ IMP::example::ExampleUnaryFunction class."""
911 
912  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
913 
914  def __init__(self, center, k):
915  """__init__(IMP::example::ExampleUnaryFunction self, IMP::Float center, IMP::Float k) -> ExampleUnaryFunction"""
916  this = _IMP_example.new_ExampleUnaryFunction(center, k)
917  try:
918  self.this.append(this)
919  except __builtin__.Exception:
920  self.this = this
921 
922  def get_version_info(self):
923  """get_version_info(ExampleUnaryFunction self) -> VersionInfo"""
924  return _IMP_example.ExampleUnaryFunction_get_version_info(self)
925 
926 
927  def __str__(self):
928  """__str__(ExampleUnaryFunction self) -> std::string"""
929  return _IMP_example.ExampleUnaryFunction___str__(self)
930 
931 
932  def __repr__(self):
933  """__repr__(ExampleUnaryFunction self) -> std::string"""
934  return _IMP_example.ExampleUnaryFunction___repr__(self)
935 
936 
937  @staticmethod
938  def get_from(o):
939  return _object_cast_to_ExampleUnaryFunction(o)
940 
941 ExampleUnaryFunction_swigregister = _IMP_example.ExampleUnaryFunction_swigregister
942 ExampleUnaryFunction_swigregister(ExampleUnaryFunction)
943 
945  """Proxy of C++ IMP::example::ExampleObject class."""
946 
947  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
948 
949  def __init__(self, data):
950  """__init__(IMP::example::ExampleObject self, IMP::Floats const & data) -> ExampleObject"""
951  this = _IMP_example.new_ExampleObject(data)
952  try:
953  self.this.append(this)
954  except __builtin__.Exception:
955  self.this = this
956 
957  def get_data(self, i):
958  """get_data(ExampleObject self, unsigned int i) -> double"""
959  return _IMP_example.ExampleObject_get_data(self, i)
960 
961 
962  def get_version_info(self):
963  """get_version_info(ExampleObject self) -> VersionInfo"""
964  return _IMP_example.ExampleObject_get_version_info(self)
965 
966 
967  def __str__(self):
968  """__str__(ExampleObject self) -> std::string"""
969  return _IMP_example.ExampleObject___str__(self)
970 
971 
972  def __repr__(self):
973  """__repr__(ExampleObject self) -> std::string"""
974  return _IMP_example.ExampleObject___repr__(self)
975 
976 
977  @staticmethod
978  def get_from(o):
979  return _object_cast_to_ExampleObject(o)
980 
981 ExampleObject_swigregister = _IMP_example.ExampleObject_swigregister
982 ExampleObject_swigregister(ExampleObject)
983 
985  """Proxy of C++ IMP::example::ExampleSingletonModifier class."""
986 
987  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
988 
989  def __init__(self, bb):
990  """__init__(IMP::example::ExampleSingletonModifier self, BoundingBox3D bb) -> ExampleSingletonModifier"""
991  this = _IMP_example.new_ExampleSingletonModifier(bb)
992  try:
993  self.this.append(this)
994  except __builtin__.Exception:
995  self.this = this
996 
997  def do_get_inputs(self, m, pis):
998  """do_get_inputs(ExampleSingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
999  return _IMP_example.ExampleSingletonModifier_do_get_inputs(self, m, pis)
1000 
1001 
1002  def do_get_outputs(self, m, pis):
1003  """do_get_outputs(ExampleSingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1004  return _IMP_example.ExampleSingletonModifier_do_get_outputs(self, m, pis)
1005 
1006 
1007  def get_version_info(self):
1008  """get_version_info(ExampleSingletonModifier self) -> VersionInfo"""
1009  return _IMP_example.ExampleSingletonModifier_get_version_info(self)
1010 
1011 
1012  def __str__(self):
1013  """__str__(ExampleSingletonModifier self) -> std::string"""
1014  return _IMP_example.ExampleSingletonModifier___str__(self)
1015 
1016 
1017  def __repr__(self):
1018  """__repr__(ExampleSingletonModifier self) -> std::string"""
1019  return _IMP_example.ExampleSingletonModifier___repr__(self)
1020 
1021 
1022  @staticmethod
1023  def get_from(o):
1024  return _object_cast_to_ExampleSingletonModifier(o)
1025 
1026 ExampleSingletonModifier_swigregister = _IMP_example.ExampleSingletonModifier_swigregister
1027 ExampleSingletonModifier_swigregister(ExampleSingletonModifier)
1028 
1030  """Proxy of C++ IMP::example::ExamplePairScore class."""
1031 
1032  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1033 
1034  def __init__(self, x0, k):
1035  """__init__(IMP::example::ExamplePairScore self, double x0, double k) -> ExamplePairScore"""
1036  this = _IMP_example.new_ExamplePairScore(x0, k)
1037  try:
1038  self.this.append(this)
1039  except __builtin__.Exception:
1040  self.this = this
1041 
1042  def do_get_inputs(self, m, pis):
1043  """do_get_inputs(ExamplePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1044  return _IMP_example.ExamplePairScore_do_get_inputs(self, m, pis)
1045 
1046 
1047  def get_version_info(self):
1048  """get_version_info(ExamplePairScore self) -> VersionInfo"""
1049  return _IMP_example.ExamplePairScore_get_version_info(self)
1050 
1051 
1052  def __str__(self):
1053  """__str__(ExamplePairScore self) -> std::string"""
1054  return _IMP_example.ExamplePairScore___str__(self)
1055 
1056 
1057  def __repr__(self):
1058  """__repr__(ExamplePairScore self) -> std::string"""
1059  return _IMP_example.ExamplePairScore___repr__(self)
1060 
1061 
1062  @staticmethod
1063  def get_from(o):
1064  return _object_cast_to_ExamplePairScore(o)
1065 
1066 ExamplePairScore_swigregister = _IMP_example.ExamplePairScore_swigregister
1067 ExamplePairScore_swigregister(ExamplePairScore)
1068 
1070  """Proxy of C++ IMP::example::ExampleSubsetFilterTable class."""
1071 
1072  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1073 
1074  def __init__(self, max_diff, pt):
1075  """__init__(IMP::example::ExampleSubsetFilterTable self, unsigned int max_diff, IMP::ParticlesTemp const & pt) -> ExampleSubsetFilterTable"""
1076  this = _IMP_example.new_ExampleSubsetFilterTable(max_diff, pt)
1077  try:
1078  self.this.append(this)
1079  except __builtin__.Exception:
1080  self.this = this
1081 
1082  def get_version_info(self):
1083  """get_version_info(ExampleSubsetFilterTable self) -> VersionInfo"""
1084  return _IMP_example.ExampleSubsetFilterTable_get_version_info(self)
1085 
1086 
1087  def __str__(self):
1088  """__str__(ExampleSubsetFilterTable self) -> std::string"""
1089  return _IMP_example.ExampleSubsetFilterTable___str__(self)
1090 
1091 
1092  def __repr__(self):
1093  """__repr__(ExampleSubsetFilterTable self) -> std::string"""
1094  return _IMP_example.ExampleSubsetFilterTable___repr__(self)
1095 
1096 
1097  @staticmethod
1098  def get_from(o):
1099  return _object_cast_to_ExampleSubsetFilterTable(o)
1100 
1101 ExampleSubsetFilterTable_swigregister = _IMP_example.ExampleSubsetFilterTable_swigregister
1102 ExampleSubsetFilterTable_swigregister(ExampleSubsetFilterTable)
1103 
1105  """Proxy of C++ IMP::example::ExampleConstraint class."""
1106 
1107  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1108 
1109  def __init__(self, p):
1110  """__init__(IMP::example::ExampleConstraint self, Particle p) -> ExampleConstraint"""
1111  this = _IMP_example.new_ExampleConstraint(p)
1112  try:
1113  self.this.append(this)
1114  except __builtin__.Exception:
1115  self.this = this
1116 
1117  def do_get_inputs(self):
1118  """do_get_inputs(ExampleConstraint self) -> IMP::ModelObjectsTemp"""
1119  return _IMP_example.ExampleConstraint_do_get_inputs(self)
1120 
1121 
1122  def do_get_outputs(self):
1123  """do_get_outputs(ExampleConstraint self) -> IMP::ModelObjectsTemp"""
1124  return _IMP_example.ExampleConstraint_do_get_outputs(self)
1125 
1126 
1127  def get_key():
1128  """get_key() -> IntKey"""
1129  return _IMP_example.ExampleConstraint_get_key()
1130 
1131  get_key = staticmethod(get_key)
1132 
1133  def get_version_info(self):
1134  """get_version_info(ExampleConstraint self) -> VersionInfo"""
1135  return _IMP_example.ExampleConstraint_get_version_info(self)
1136 
1137 
1138  def __str__(self):
1139  """__str__(ExampleConstraint self) -> std::string"""
1140  return _IMP_example.ExampleConstraint___str__(self)
1141 
1142 
1143  def __repr__(self):
1144  """__repr__(ExampleConstraint self) -> std::string"""
1145  return _IMP_example.ExampleConstraint___repr__(self)
1146 
1147 
1148  @staticmethod
1149  def get_from(o):
1150  return _object_cast_to_ExampleConstraint(o)
1151 
1152 ExampleConstraint_swigregister = _IMP_example.ExampleConstraint_swigregister
1153 ExampleConstraint_swigregister(ExampleConstraint)
1154 
1155 def ExampleConstraint_get_key():
1156  """ExampleConstraint_get_key() -> IntKey"""
1157  return _IMP_example.ExampleConstraint_get_key()
1158 
1159 
1160 def create_serial_mover(m, pis):
1161  """create_serial_mover(Model m, IMP::ParticleIndexes const & pis) -> MonteCarloMover"""
1162  return _IMP_example.create_serial_mover(m, pis)
1163 
1164 def optimize_balls(*args):
1165  """
1166  optimize_balls(Model m, IMP::ParticleIndexes const & pis, IMP::RestraintsTemp const & rs, IMP::PairPredicates const & excluded, IMP::OptimizerStates const & opt_states, IMP::LogLevel ll)
1167  optimize_balls(Model m, IMP::ParticleIndexes const & pis, IMP::RestraintsTemp const & rs, IMP::PairPredicates const & excluded, IMP::OptimizerStates const & opt_states)
1168  optimize_balls(Model m, IMP::ParticleIndexes const & pis, IMP::RestraintsTemp const & rs, IMP::PairPredicates const & excluded)
1169  optimize_balls(Model m, IMP::ParticleIndexes const & pis, IMP::RestraintsTemp const & rs)
1170  optimize_balls(Model m, IMP::ParticleIndexes const & pis)
1171  """
1172  return _IMP_example.optimize_balls(*args)
1173 
1174 def optimize_assembly(*args):
1175  """
1176  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)
1177  optimize_assembly(Model m, IMP::ParticleIndexes const & components, IMP::RestraintsTemp const & interactions, IMP::RestraintsTemp const & other_restraints, BoundingBox3D bb, PairScore ev, double cutoff)
1178  """
1179  return _IMP_example.optimize_assembly(*args)
1180 
1181 def get_number_of_incidences(psa, psb, point_distance):
1182  """get_number_of_incidences(IMP::ParticlesTemp const & psa, IMP::ParticlesTemp const & psb, double point_distance) -> unsigned int"""
1183  return _IMP_example.get_number_of_incidences(psa, psb, point_distance)
1184 
1185 def create_chain_restraint(m, ps, length_factor, k, name):
1186  """create_chain_restraint(Model m, IMP::ParticleIndexes const & ps, double length_factor, double k, std::string name) -> Restraint"""
1187  return _IMP_example.create_chain_restraint(m, ps, length_factor, k, name)
1188 
1189 def create_excluded_volume(m, ps, k, name):
1190  """create_excluded_volume(Model m, IMP::ParticleIndexes const & ps, double k, std::string name) -> Restraint"""
1191  return _IMP_example.create_excluded_volume(m, ps, k, name)
1192 class ExampleTemplateClass3D(object):
1193  """Proxy of C++ IMP::example::ExampleTemplateClassD<(3)> class."""
1194 
1195  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1196 
1197  def __init__(self, *args):
1198  """
1199  __init__(IMP::example::ExampleTemplateClassD<(3)> self) -> ExampleTemplateClass3D
1200  __init__(IMP::example::ExampleTemplateClassD<(3)> self, Vector3D a, Vector3D b) -> ExampleTemplateClass3D
1201  """
1202  this = _IMP_example.new_ExampleTemplateClass3D(*args)
1203  try:
1204  self.this.append(this)
1205  except __builtin__.Exception:
1206  self.this = this
1207 
1208  def get_point(self, i):
1209  """get_point(ExampleTemplateClass3D self, unsigned int i) -> Vector3D"""
1210  return _IMP_example.ExampleTemplateClass3D_get_point(self, i)
1211 
1212 
1213  def show(self, *args):
1214  """
1215  show(ExampleTemplateClass3D self, _ostream out)
1216  show(ExampleTemplateClass3D self)
1217  """
1218  return _IMP_example.ExampleTemplateClass3D_show(self, *args)
1219 
1220 
1221  def __str__(self):
1222  """__str__(ExampleTemplateClass3D self) -> std::string"""
1223  return _IMP_example.ExampleTemplateClass3D___str__(self)
1224 
1225 
1226  def __repr__(self):
1227  """__repr__(ExampleTemplateClass3D self) -> std::string"""
1228  return _IMP_example.ExampleTemplateClass3D___repr__(self)
1229 
1230  __swig_destroy__ = _IMP_example.delete_ExampleTemplateClass3D
1231  __del__ = lambda self: None
1232 ExampleTemplateClass3D_swigregister = _IMP_example.ExampleTemplateClass3D_swigregister
1233 ExampleTemplateClass3D_swigregister(ExampleTemplateClass3D)
1234 
1235 
1236 def get_module_version():
1237  """get_module_version() -> std::string const"""
1238  return _IMP_example.get_module_version()
1239 
1240 def get_example_path(fname):
1241  """get_example_path(std::string fname) -> std::string"""
1242  return _IMP_example.get_example_path(fname)
1243 
1244 def get_data_path(fname):
1245  """get_data_path(std::string fname) -> std::string"""
1246  return _IMP_example.get_data_path(fname)
1247 
1248 from . import _version_check
1249 _version_check.check_version(get_module_version())
1250 __version__ = get_module_version()
1251 
1252 
1253 
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