IMP logo
IMP Reference Guide  2.5.0
The Integrative Modeling Platform
example/__init__.py
1 # This file was automatically generated by SWIG (http://www.swig.org).
2 # Version 3.0.5
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-2015 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
16 if version_info >= (2, 6, 0):
17  def swig_import_helper():
18  from os.path import dirname
19  import imp
20  fp = None
21  try:
22  fp, pathname, description = imp.find_module('_IMP_example', [dirname(__file__)])
23  except ImportError:
24  import _IMP_example
25  return _IMP_example
26  if fp is not None:
27  try:
28  _mod = imp.load_module('_IMP_example', fp, pathname, description)
29  finally:
30  fp.close()
31  return _mod
32  _IMP_example = swig_import_helper()
33  del swig_import_helper
34 else:
35  import _IMP_example
36 del version_info
37 try:
38  _swig_property = property
39 except NameError:
40  pass # Python < 2.2 doesn't have 'property'.
41 
42 
43 def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
44  if (name == "thisown"):
45  return self.this.own(value)
46  if (name == "this"):
47  if type(value).__name__ == 'SwigPyObject':
48  self.__dict__[name] = value
49  return
50  method = class_type.__swig_setmethods__.get(name, None)
51  if method:
52  return method(self, value)
53  if (not static):
54  object.__setattr__(self, name, value)
55  else:
56  raise AttributeError("You cannot add attributes to %s" % self)
57 
58 
59 def _swig_setattr(self, class_type, name, value):
60  return _swig_setattr_nondynamic(self, class_type, name, value, 0)
61 
62 
63 def _swig_getattr_nondynamic(self, class_type, name, static=1):
64  if (name == "thisown"):
65  return self.this.own()
66  method = class_type.__swig_getmethods__.get(name, None)
67  if method:
68  return method(self)
69  if (not static):
70  return object.__getattr__(self, name)
71  else:
72  raise AttributeError(name)
73 
74 def _swig_getattr(self, class_type, name):
75  return _swig_getattr_nondynamic(self, class_type, name, 0)
76 
77 
78 def _swig_repr(self):
79  try:
80  strthis = "proxy of " + self.this.__repr__()
81  except:
82  strthis = ""
83  return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
84 
85 try:
86  _object = object
87  _newclass = 1
88 except AttributeError:
89  class _object:
90  pass
91  _newclass = 0
92 
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:
110  weakref_proxy = lambda x: x
111 
112 
113 class IMP_EXAMPLE_SwigPyIterator(object):
114  """Proxy of C++ swig::IMP_EXAMPLE_SwigPyIterator class"""
115  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
116 
117  def __init__(self, *args, **kwargs):
118  raise AttributeError("No constructor defined - class is abstract")
119  __repr__ = _swig_repr
120  __swig_destroy__ = _IMP_example.delete_IMP_EXAMPLE_SwigPyIterator
121  __del__ = lambda self: None
122 
123  def value(self):
124  """value(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
125  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_value(self)
126 
127 
128  def incr(self, n=1):
129  """
130  incr(IMP_EXAMPLE_SwigPyIterator self, size_t n=1) -> IMP_EXAMPLE_SwigPyIterator
131  incr(IMP_EXAMPLE_SwigPyIterator self) -> IMP_EXAMPLE_SwigPyIterator
132  """
133  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_incr(self, n)
134 
135 
136  def decr(self, n=1):
137  """
138  decr(IMP_EXAMPLE_SwigPyIterator self, size_t n=1) -> IMP_EXAMPLE_SwigPyIterator
139  decr(IMP_EXAMPLE_SwigPyIterator self) -> IMP_EXAMPLE_SwigPyIterator
140  """
141  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_decr(self, n)
142 
143 
144  def distance(self, x):
145  """distance(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> ptrdiff_t"""
146  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_distance(self, x)
147 
148 
149  def equal(self, x):
150  """equal(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
151  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_equal(self, x)
152 
153 
154  def copy(self):
155  """copy(IMP_EXAMPLE_SwigPyIterator self) -> IMP_EXAMPLE_SwigPyIterator"""
156  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_copy(self)
157 
158 
159  def next(self):
160  """next(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
161  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_next(self)
162 
163 
164  def __next__(self):
165  """__next__(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
166  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___next__(self)
167 
168 
169  def previous(self):
170  """previous(IMP_EXAMPLE_SwigPyIterator self) -> PyObject *"""
171  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_previous(self)
172 
173 
174  def advance(self, n):
175  """advance(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
176  return _IMP_example.IMP_EXAMPLE_SwigPyIterator_advance(self, n)
177 
178 
179  def __eq__(self, x):
180  """__eq__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
181  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___eq__(self, x)
182 
183 
184  def __ne__(self, x):
185  """__ne__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> bool"""
186  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___ne__(self, x)
187 
188 
189  def __iadd__(self, n):
190  """__iadd__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
191  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___iadd__(self, n)
192 
193 
194  def __isub__(self, n):
195  """__isub__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
196  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___isub__(self, n)
197 
198 
199  def __add__(self, n):
200  """__add__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator"""
201  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___add__(self, n)
202 
203 
204  def __sub__(self, *args):
205  """
206  __sub__(IMP_EXAMPLE_SwigPyIterator self, ptrdiff_t n) -> IMP_EXAMPLE_SwigPyIterator
207  __sub__(IMP_EXAMPLE_SwigPyIterator self, IMP_EXAMPLE_SwigPyIterator x) -> ptrdiff_t
208  """
209  return _IMP_example.IMP_EXAMPLE_SwigPyIterator___sub__(self, *args)
210 
211  def __iter__(self):
212  return self
213 IMP_EXAMPLE_SwigPyIterator_swigregister = _IMP_example.IMP_EXAMPLE_SwigPyIterator_swigregister
214 IMP_EXAMPLE_SwigPyIterator_swigregister(IMP_EXAMPLE_SwigPyIterator)
215 
216 _value_types=[]
217 _object_types=[]
218 _raii_types=[]
219 _plural_types=[]
220 
221 
222 _IMP_example.IMP_DEBUG_swigconstant(_IMP_example)
223 IMP_DEBUG = _IMP_example.IMP_DEBUG
224 
225 _IMP_example.IMP_RELEASE_swigconstant(_IMP_example)
226 IMP_RELEASE = _IMP_example.IMP_RELEASE
227 
228 _IMP_example.IMP_SILENT_swigconstant(_IMP_example)
229 IMP_SILENT = _IMP_example.IMP_SILENT
230 
231 _IMP_example.IMP_PROGRESS_swigconstant(_IMP_example)
232 IMP_PROGRESS = _IMP_example.IMP_PROGRESS
233 
234 _IMP_example.IMP_TERSE_swigconstant(_IMP_example)
235 IMP_TERSE = _IMP_example.IMP_TERSE
236 
237 _IMP_example.IMP_VERBOSE_swigconstant(_IMP_example)
238 IMP_VERBOSE = _IMP_example.IMP_VERBOSE
239 
240 _IMP_example.IMP_MEMORY_swigconstant(_IMP_example)
241 IMP_MEMORY = _IMP_example.IMP_MEMORY
242 
243 _IMP_example.IMP_NONE_swigconstant(_IMP_example)
244 IMP_NONE = _IMP_example.IMP_NONE
245 
246 _IMP_example.IMP_USAGE_swigconstant(_IMP_example)
247 IMP_USAGE = _IMP_example.IMP_USAGE
248 
249 _IMP_example.IMP_INTERNAL_swigconstant(_IMP_example)
250 IMP_INTERNAL = _IMP_example.IMP_INTERNAL
251 
252 _IMP_example.IMP_KERNEL_HAS_LOG4CXX_swigconstant(_IMP_example)
253 IMP_KERNEL_HAS_LOG4CXX = _IMP_example.IMP_KERNEL_HAS_LOG4CXX
254 
255 _IMP_example.IMP_COMPILER_HAS_AUTO_swigconstant(_IMP_example)
256 IMP_COMPILER_HAS_AUTO = _IMP_example.IMP_COMPILER_HAS_AUTO
257 
258 _IMP_example.IMP_COMPILER_HAS_DEBUG_VECTOR_swigconstant(_IMP_example)
259 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_example.IMP_COMPILER_HAS_DEBUG_VECTOR
260 
261 _IMP_example.IMP_KERNEL_HAS_BOOST_RANDOM_swigconstant(_IMP_example)
262 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_example.IMP_KERNEL_HAS_BOOST_RANDOM
263 
264 _IMP_example.IMP_KERNEL_HAS_GPERFTOOLS_swigconstant(_IMP_example)
265 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_example.IMP_KERNEL_HAS_GPERFTOOLS
266 
267 _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER_swigconstant(_IMP_example)
268 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
269 
270 _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER_swigconstant(_IMP_example)
271 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_example.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
272 
273 _IMP_example.IMPKERNEL_SHOW_WARNINGS_swigconstant(_IMP_example)
274 IMPKERNEL_SHOW_WARNINGS = _IMP_example.IMPKERNEL_SHOW_WARNINGS
275 import sys
276 class _DirectorObjects(object):
277  """@internal Simple class to keep references to director objects
278  to prevent premature deletion."""
279  def __init__(self):
280  self._objects = []
281  def register(self, obj):
282  """Take a reference to a director object; will only work for
283  refcounted C++ classes"""
284  if hasattr(obj, 'get_ref_count'):
285  self._objects.append(obj)
286  def cleanup(self):
287  """Only drop our reference and allow cleanup by Python if no other
288  Python references exist (we hold 3 references: one in self._objects,
289  one in x, and one in the argument list for getrefcount) *and* no
290  other C++ references exist (the Python object always holds one)"""
291  objs = [x for x in self._objects if sys.getrefcount(x) > 3 \
292  or x.get_ref_count() > 1]
293  # Do in two steps so the references are kept until the end of the
294  # function (deleting references may trigger a fresh call to this method)
295  self._objects = objs
296  def get_object_count(self):
297  """Get number of director objects (useful for testing only)"""
298  return len(self._objects)
299 _director_objects = _DirectorObjects()
300 
301 class _ostream(object):
302  """Proxy of C++ std::ostream class"""
303  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
304 
305  def __init__(self, *args, **kwargs):
306  raise AttributeError("No constructor defined")
307  __repr__ = _swig_repr
308 
309  def write(self, osa_buf):
310  """write(_ostream self, char const * osa_buf)"""
311  return _IMP_example._ostream_write(self, osa_buf)
312 
313 _ostream_swigregister = _IMP_example._ostream_swigregister
314 _ostream_swigregister(_ostream)
315 
316 
317 _IMP_example.IMP_COMPILER_HAS_OVERRIDE_swigconstant(_IMP_example)
318 IMP_COMPILER_HAS_OVERRIDE = _IMP_example.IMP_COMPILER_HAS_OVERRIDE
319 
320 _IMP_example.IMP_COMPILER_HAS_FINAL_swigconstant(_IMP_example)
321 IMP_COMPILER_HAS_FINAL = _IMP_example.IMP_COMPILER_HAS_FINAL
322 
323 _IMP_example.IMP_HAS_NOEXCEPT_swigconstant(_IMP_example)
324 IMP_HAS_NOEXCEPT = _IMP_example.IMP_HAS_NOEXCEPT
325 import IMP
326 
327 _IMP_example.IMP_CGAL_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_example)
328 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CGAL_HAS_BOOST_FILESYSTEM
329 
330 _IMP_example.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_example)
331 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
332 
333 _IMP_example.IMP_CGAL_HAS_BOOST_RANDOM_swigconstant(_IMP_example)
334 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_example.IMP_CGAL_HAS_BOOST_RANDOM
335 
336 _IMP_example.IMP_CGAL_HAS_BOOST_SYSTEM_swigconstant(_IMP_example)
337 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_example.IMP_CGAL_HAS_BOOST_SYSTEM
338 
339 _IMP_example.IMPCGAL_SHOW_WARNINGS_swigconstant(_IMP_example)
340 IMPCGAL_SHOW_WARNINGS = _IMP_example.IMPCGAL_SHOW_WARNINGS
341 import IMP.cgal
342 
343 _IMP_example.IMP_ALGEBRA_HAS_IMP_CGAL_swigconstant(_IMP_example)
344 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_example.IMP_ALGEBRA_HAS_IMP_CGAL
345 
346 _IMP_example.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_example)
347 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
348 
349 _IMP_example.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_example)
350 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
351 
352 _IMP_example.IMP_ALGEBRA_HAS_BOOST_RANDOM_swigconstant(_IMP_example)
353 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_RANDOM
354 
355 _IMP_example.IMP_ALGEBRA_HAS_BOOST_SYSTEM_swigconstant(_IMP_example)
356 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_example.IMP_ALGEBRA_HAS_BOOST_SYSTEM
357 
358 _IMP_example.IMP_ALGEBRA_HAS_CGAL_swigconstant(_IMP_example)
359 IMP_ALGEBRA_HAS_CGAL = _IMP_example.IMP_ALGEBRA_HAS_CGAL
360 
361 _IMP_example.IMP_ALGEBRA_HAS_ANN_swigconstant(_IMP_example)
362 IMP_ALGEBRA_HAS_ANN = _IMP_example.IMP_ALGEBRA_HAS_ANN
363 
364 _IMP_example.IMPALGEBRA_SHOW_WARNINGS_swigconstant(_IMP_example)
365 IMPALGEBRA_SHOW_WARNINGS = _IMP_example.IMPALGEBRA_SHOW_WARNINGS
366 import IMP.algebra
367 
368 _IMP_example.IMP_DISPLAY_HAS_IMP_CGAL_swigconstant(_IMP_example)
369 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_example.IMP_DISPLAY_HAS_IMP_CGAL
370 
371 _IMP_example.IMP_DISPLAY_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_example)
372 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
373 
374 _IMP_example.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_example)
375 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
376 
377 _IMP_example.IMP_DISPLAY_HAS_BOOST_RANDOM_swigconstant(_IMP_example)
378 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_example.IMP_DISPLAY_HAS_BOOST_RANDOM
379 
380 _IMP_example.IMP_DISPLAY_HAS_BOOST_SYSTEM_swigconstant(_IMP_example)
381 IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_example.IMP_DISPLAY_HAS_BOOST_SYSTEM
382 
383 _IMP_example.IMP_DISPLAY_HAS_CGAL_swigconstant(_IMP_example)
384 IMP_DISPLAY_HAS_CGAL = _IMP_example.IMP_DISPLAY_HAS_CGAL
385 
386 _IMP_example.IMPDISPLAY_SHOW_WARNINGS_swigconstant(_IMP_example)
387 IMPDISPLAY_SHOW_WARNINGS = _IMP_example.IMPDISPLAY_SHOW_WARNINGS
388 import IMP.display
389 
390 _IMP_example.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL_swigconstant(_IMP_example)
391 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_example.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
392 
393 _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_example)
394 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
395 
396 _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_example)
397 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
398 
399 _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM_swigconstant(_IMP_example)
400 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
401 
402 _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM_swigconstant(_IMP_example)
403 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_example.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
404 
405 _IMP_example.IMP_SCORE_FUNCTOR_HAS_CGAL_swigconstant(_IMP_example)
406 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_example.IMP_SCORE_FUNCTOR_HAS_CGAL
407 
408 _IMP_example.IMP_SCORE_FUNCTOR_HAS_HDF5_swigconstant(_IMP_example)
409 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_example.IMP_SCORE_FUNCTOR_HAS_HDF5
410 
411 _IMP_example.IMPSCOREFUNCTOR_SHOW_WARNINGS_swigconstant(_IMP_example)
412 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_example.IMPSCOREFUNCTOR_SHOW_WARNINGS
413 import IMP.score_functor
414 
415 _IMP_example.IMP_STATISTICS_HAS_IMP_CGAL_swigconstant(_IMP_example)
416 IMP_STATISTICS_HAS_IMP_CGAL = _IMP_example.IMP_STATISTICS_HAS_IMP_CGAL
417 
418 _IMP_example.IMP_STATISTICS_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_example)
419 IMP_STATISTICS_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_STATISTICS_HAS_BOOST_FILESYSTEM
420 
421 _IMP_example.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_example)
422 IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS
423 
424 _IMP_example.IMP_STATISTICS_HAS_BOOST_RANDOM_swigconstant(_IMP_example)
425 IMP_STATISTICS_HAS_BOOST_RANDOM = _IMP_example.IMP_STATISTICS_HAS_BOOST_RANDOM
426 
427 _IMP_example.IMP_STATISTICS_HAS_BOOST_SYSTEM_swigconstant(_IMP_example)
428 IMP_STATISTICS_HAS_BOOST_SYSTEM = _IMP_example.IMP_STATISTICS_HAS_BOOST_SYSTEM
429 
430 _IMP_example.IMP_STATISTICS_HAS_CGAL_swigconstant(_IMP_example)
431 IMP_STATISTICS_HAS_CGAL = _IMP_example.IMP_STATISTICS_HAS_CGAL
432 
433 _IMP_example.IMPSTATISTICS_SHOW_WARNINGS_swigconstant(_IMP_example)
434 IMPSTATISTICS_SHOW_WARNINGS = _IMP_example.IMPSTATISTICS_SHOW_WARNINGS
435 import IMP.statistics
436 
437 _IMP_example.IMP_CORE_HAS_IMP_CGAL_swigconstant(_IMP_example)
438 IMP_CORE_HAS_IMP_CGAL = _IMP_example.IMP_CORE_HAS_IMP_CGAL
439 
440 _IMP_example.IMP_CORE_HAS_IMP_KERNEL_swigconstant(_IMP_example)
441 IMP_CORE_HAS_IMP_KERNEL = _IMP_example.IMP_CORE_HAS_IMP_KERNEL
442 
443 _IMP_example.IMP_CORE_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_example)
444 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CORE_HAS_BOOST_FILESYSTEM
445 
446 _IMP_example.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_example)
447 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
448 
449 _IMP_example.IMP_CORE_HAS_BOOST_RANDOM_swigconstant(_IMP_example)
450 IMP_CORE_HAS_BOOST_RANDOM = _IMP_example.IMP_CORE_HAS_BOOST_RANDOM
451 
452 _IMP_example.IMP_CORE_HAS_BOOST_SYSTEM_swigconstant(_IMP_example)
453 IMP_CORE_HAS_BOOST_SYSTEM = _IMP_example.IMP_CORE_HAS_BOOST_SYSTEM
454 
455 _IMP_example.IMP_CORE_HAS_CGAL_swigconstant(_IMP_example)
456 IMP_CORE_HAS_CGAL = _IMP_example.IMP_CORE_HAS_CGAL
457 
458 _IMP_example.IMP_CORE_HAS_HDF5_swigconstant(_IMP_example)
459 IMP_CORE_HAS_HDF5 = _IMP_example.IMP_CORE_HAS_HDF5
460 
461 _IMP_example.IMPCORE_SHOW_WARNINGS_swigconstant(_IMP_example)
462 IMPCORE_SHOW_WARNINGS = _IMP_example.IMPCORE_SHOW_WARNINGS
463 import IMP.core
464 
465 _IMP_example.IMP_CONTAINER_HAS_IMP_ALGEBRA_swigconstant(_IMP_example)
466 IMP_CONTAINER_HAS_IMP_ALGEBRA = _IMP_example.IMP_CONTAINER_HAS_IMP_ALGEBRA
467 
468 _IMP_example.IMP_CONTAINER_HAS_IMP_CGAL_swigconstant(_IMP_example)
469 IMP_CONTAINER_HAS_IMP_CGAL = _IMP_example.IMP_CONTAINER_HAS_IMP_CGAL
470 
471 _IMP_example.IMP_CONTAINER_HAS_IMP_DISPLAY_swigconstant(_IMP_example)
472 IMP_CONTAINER_HAS_IMP_DISPLAY = _IMP_example.IMP_CONTAINER_HAS_IMP_DISPLAY
473 
474 _IMP_example.IMP_CONTAINER_HAS_IMP_KERNEL_swigconstant(_IMP_example)
475 IMP_CONTAINER_HAS_IMP_KERNEL = _IMP_example.IMP_CONTAINER_HAS_IMP_KERNEL
476 
477 _IMP_example.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR_swigconstant(_IMP_example)
478 IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR
479 
480 _IMP_example.IMP_CONTAINER_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_example)
481 IMP_CONTAINER_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_CONTAINER_HAS_BOOST_FILESYSTEM
482 
483 _IMP_example.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_example)
484 IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS
485 
486 _IMP_example.IMP_CONTAINER_HAS_BOOST_RANDOM_swigconstant(_IMP_example)
487 IMP_CONTAINER_HAS_BOOST_RANDOM = _IMP_example.IMP_CONTAINER_HAS_BOOST_RANDOM
488 
489 _IMP_example.IMP_CONTAINER_HAS_BOOST_SYSTEM_swigconstant(_IMP_example)
490 IMP_CONTAINER_HAS_BOOST_SYSTEM = _IMP_example.IMP_CONTAINER_HAS_BOOST_SYSTEM
491 
492 _IMP_example.IMP_CONTAINER_HAS_CGAL_swigconstant(_IMP_example)
493 IMP_CONTAINER_HAS_CGAL = _IMP_example.IMP_CONTAINER_HAS_CGAL
494 
495 _IMP_example.IMP_CONTAINER_HAS_HDF5_swigconstant(_IMP_example)
496 IMP_CONTAINER_HAS_HDF5 = _IMP_example.IMP_CONTAINER_HAS_HDF5
497 
498 _IMP_example.IMPCONTAINER_SHOW_WARNINGS_swigconstant(_IMP_example)
499 IMPCONTAINER_SHOW_WARNINGS = _IMP_example.IMPCONTAINER_SHOW_WARNINGS
500 import IMP.container
501 
502 _IMP_example.IMP_ATOM_HAS_IMP_CGAL_swigconstant(_IMP_example)
503 IMP_ATOM_HAS_IMP_CGAL = _IMP_example.IMP_ATOM_HAS_IMP_CGAL
504 
505 _IMP_example.IMP_ATOM_HAS_IMP_KERNEL_swigconstant(_IMP_example)
506 IMP_ATOM_HAS_IMP_KERNEL = _IMP_example.IMP_ATOM_HAS_IMP_KERNEL
507 
508 _IMP_example.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR_swigconstant(_IMP_example)
509 IMP_ATOM_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR
510 
511 _IMP_example.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_example)
512 IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS
513 
514 _IMP_example.IMP_ATOM_HAS_BOOST_RANDOM_swigconstant(_IMP_example)
515 IMP_ATOM_HAS_BOOST_RANDOM = _IMP_example.IMP_ATOM_HAS_BOOST_RANDOM
516 
517 _IMP_example.IMP_ATOM_HAS_BOOST_REGEX_swigconstant(_IMP_example)
518 IMP_ATOM_HAS_BOOST_REGEX = _IMP_example.IMP_ATOM_HAS_BOOST_REGEX
519 
520 _IMP_example.IMP_ATOM_HAS_BOOST_SYSTEM_swigconstant(_IMP_example)
521 IMP_ATOM_HAS_BOOST_SYSTEM = _IMP_example.IMP_ATOM_HAS_BOOST_SYSTEM
522 
523 _IMP_example.IMP_ATOM_HAS_CGAL_swigconstant(_IMP_example)
524 IMP_ATOM_HAS_CGAL = _IMP_example.IMP_ATOM_HAS_CGAL
525 
526 _IMP_example.IMP_ATOM_HAS_HDF5_swigconstant(_IMP_example)
527 IMP_ATOM_HAS_HDF5 = _IMP_example.IMP_ATOM_HAS_HDF5
528 
529 _IMP_example.IMPATOM_SHOW_WARNINGS_swigconstant(_IMP_example)
530 IMPATOM_SHOW_WARNINGS = _IMP_example.IMPATOM_SHOW_WARNINGS
531 
532 _IMP_example.IMP_ATOM_TYPE_INDEX_swigconstant(_IMP_example)
533 IMP_ATOM_TYPE_INDEX = _IMP_example.IMP_ATOM_TYPE_INDEX
534 
535 _IMP_example.IMP_RESIDUE_TYPE_INDEX_swigconstant(_IMP_example)
536 IMP_RESIDUE_TYPE_INDEX = _IMP_example.IMP_RESIDUE_TYPE_INDEX
537 
538 _IMP_example.IMP_HIERARCHY_TYPE_INDEX_swigconstant(_IMP_example)
539 IMP_HIERARCHY_TYPE_INDEX = _IMP_example.IMP_HIERARCHY_TYPE_INDEX
540 import IMP.atom
541 
542 _IMP_example.IMP_RMF_HAS_IMP_CGAL_swigconstant(_IMP_example)
543 IMP_RMF_HAS_IMP_CGAL = _IMP_example.IMP_RMF_HAS_IMP_CGAL
544 
545 _IMP_example.IMP_RMF_HAS_IMP_SCORE_FUNCTOR_swigconstant(_IMP_example)
546 IMP_RMF_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_RMF_HAS_IMP_SCORE_FUNCTOR
547 
548 _IMP_example.IMP_RMF_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_example)
549 IMP_RMF_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_RMF_HAS_BOOST_FILESYSTEM
550 
551 _IMP_example.IMP_RMF_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_example)
552 IMP_RMF_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_RMF_HAS_BOOST_PROGRAMOPTIONS
553 
554 _IMP_example.IMP_RMF_HAS_BOOST_RANDOM_swigconstant(_IMP_example)
555 IMP_RMF_HAS_BOOST_RANDOM = _IMP_example.IMP_RMF_HAS_BOOST_RANDOM
556 
557 _IMP_example.IMP_RMF_HAS_BOOST_REGEX_swigconstant(_IMP_example)
558 IMP_RMF_HAS_BOOST_REGEX = _IMP_example.IMP_RMF_HAS_BOOST_REGEX
559 
560 _IMP_example.IMP_RMF_HAS_BOOST_SYSTEM_swigconstant(_IMP_example)
561 IMP_RMF_HAS_BOOST_SYSTEM = _IMP_example.IMP_RMF_HAS_BOOST_SYSTEM
562 
563 _IMP_example.IMP_RMF_HAS_CGAL_swigconstant(_IMP_example)
564 IMP_RMF_HAS_CGAL = _IMP_example.IMP_RMF_HAS_CGAL
565 
566 _IMP_example.IMP_RMF_HAS_HDF5_swigconstant(_IMP_example)
567 IMP_RMF_HAS_HDF5 = _IMP_example.IMP_RMF_HAS_HDF5
568 
569 _IMP_example.IMPRMF_SHOW_WARNINGS_swigconstant(_IMP_example)
570 IMPRMF_SHOW_WARNINGS = _IMP_example.IMPRMF_SHOW_WARNINGS
571 import IMP.rmf
572 import RMF
573 
574 _IMP_example.IMP_DOMINO_HAS_IMP_ATOM_swigconstant(_IMP_example)
575 IMP_DOMINO_HAS_IMP_ATOM = _IMP_example.IMP_DOMINO_HAS_IMP_ATOM
576 
577 _IMP_example.IMP_DOMINO_HAS_IMP_CGAL_swigconstant(_IMP_example)
578 IMP_DOMINO_HAS_IMP_CGAL = _IMP_example.IMP_DOMINO_HAS_IMP_CGAL
579 
580 _IMP_example.IMP_DOMINO_HAS_IMP_KERNEL_swigconstant(_IMP_example)
581 IMP_DOMINO_HAS_IMP_KERNEL = _IMP_example.IMP_DOMINO_HAS_IMP_KERNEL
582 
583 _IMP_example.IMP_DOMINO_HAS_IMP_RMF_swigconstant(_IMP_example)
584 IMP_DOMINO_HAS_IMP_RMF = _IMP_example.IMP_DOMINO_HAS_IMP_RMF
585 
586 _IMP_example.IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR_swigconstant(_IMP_example)
587 IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_DOMINO_HAS_IMP_SCORE_FUNCTOR
588 
589 _IMP_example.IMP_DOMINO_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_example)
590 IMP_DOMINO_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_DOMINO_HAS_BOOST_FILESYSTEM
591 
592 _IMP_example.IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_example)
593 IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_DOMINO_HAS_BOOST_PROGRAMOPTIONS
594 
595 _IMP_example.IMP_DOMINO_HAS_BOOST_RANDOM_swigconstant(_IMP_example)
596 IMP_DOMINO_HAS_BOOST_RANDOM = _IMP_example.IMP_DOMINO_HAS_BOOST_RANDOM
597 
598 _IMP_example.IMP_DOMINO_HAS_BOOST_REGEX_swigconstant(_IMP_example)
599 IMP_DOMINO_HAS_BOOST_REGEX = _IMP_example.IMP_DOMINO_HAS_BOOST_REGEX
600 
601 _IMP_example.IMP_DOMINO_HAS_BOOST_SYSTEM_swigconstant(_IMP_example)
602 IMP_DOMINO_HAS_BOOST_SYSTEM = _IMP_example.IMP_DOMINO_HAS_BOOST_SYSTEM
603 
604 _IMP_example.IMP_DOMINO_HAS_CGAL_swigconstant(_IMP_example)
605 IMP_DOMINO_HAS_CGAL = _IMP_example.IMP_DOMINO_HAS_CGAL
606 
607 _IMP_example.IMP_DOMINO_HAS_HDF5_swigconstant(_IMP_example)
608 IMP_DOMINO_HAS_HDF5 = _IMP_example.IMP_DOMINO_HAS_HDF5
609 
610 _IMP_example.IMP_DOMINO_HAS_RMF_swigconstant(_IMP_example)
611 IMP_DOMINO_HAS_RMF = _IMP_example.IMP_DOMINO_HAS_RMF
612 
613 _IMP_example.IMPDOMINO_SHOW_WARNINGS_swigconstant(_IMP_example)
614 IMPDOMINO_SHOW_WARNINGS = _IMP_example.IMPDOMINO_SHOW_WARNINGS
615 import RMF_HDF5
616 import IMP.domino
617 
618 _IMP_example.IMP_EXAMPLE_HAS_IMP_ALGEBRA_swigconstant(_IMP_example)
619 IMP_EXAMPLE_HAS_IMP_ALGEBRA = _IMP_example.IMP_EXAMPLE_HAS_IMP_ALGEBRA
620 
621 _IMP_example.IMP_EXAMPLE_HAS_IMP_CGAL_swigconstant(_IMP_example)
622 IMP_EXAMPLE_HAS_IMP_CGAL = _IMP_example.IMP_EXAMPLE_HAS_IMP_CGAL
623 
624 _IMP_example.IMP_EXAMPLE_HAS_IMP_DISPLAY_swigconstant(_IMP_example)
625 IMP_EXAMPLE_HAS_IMP_DISPLAY = _IMP_example.IMP_EXAMPLE_HAS_IMP_DISPLAY
626 
627 _IMP_example.IMP_EXAMPLE_HAS_IMP_KERNEL_swigconstant(_IMP_example)
628 IMP_EXAMPLE_HAS_IMP_KERNEL = _IMP_example.IMP_EXAMPLE_HAS_IMP_KERNEL
629 
630 _IMP_example.IMP_EXAMPLE_HAS_IMP_RMF_swigconstant(_IMP_example)
631 IMP_EXAMPLE_HAS_IMP_RMF = _IMP_example.IMP_EXAMPLE_HAS_IMP_RMF
632 
633 _IMP_example.IMP_EXAMPLE_HAS_IMP_SCORE_FUNCTOR_swigconstant(_IMP_example)
634 IMP_EXAMPLE_HAS_IMP_SCORE_FUNCTOR = _IMP_example.IMP_EXAMPLE_HAS_IMP_SCORE_FUNCTOR
635 
636 _IMP_example.IMP_EXAMPLE_HAS_IMP_STATISTICS_swigconstant(_IMP_example)
637 IMP_EXAMPLE_HAS_IMP_STATISTICS = _IMP_example.IMP_EXAMPLE_HAS_IMP_STATISTICS
638 
639 _IMP_example.IMP_EXAMPLE_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_example)
640 IMP_EXAMPLE_HAS_BOOST_FILESYSTEM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_FILESYSTEM
641 
642 _IMP_example.IMP_EXAMPLE_HAS_BOOST_GRAPH_swigconstant(_IMP_example)
643 IMP_EXAMPLE_HAS_BOOST_GRAPH = _IMP_example.IMP_EXAMPLE_HAS_BOOST_GRAPH
644 
645 _IMP_example.IMP_EXAMPLE_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_example)
646 IMP_EXAMPLE_HAS_BOOST_PROGRAMOPTIONS = _IMP_example.IMP_EXAMPLE_HAS_BOOST_PROGRAMOPTIONS
647 
648 _IMP_example.IMP_EXAMPLE_HAS_BOOST_RANDOM_swigconstant(_IMP_example)
649 IMP_EXAMPLE_HAS_BOOST_RANDOM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_RANDOM
650 
651 _IMP_example.IMP_EXAMPLE_HAS_BOOST_REGEX_swigconstant(_IMP_example)
652 IMP_EXAMPLE_HAS_BOOST_REGEX = _IMP_example.IMP_EXAMPLE_HAS_BOOST_REGEX
653 
654 _IMP_example.IMP_EXAMPLE_HAS_BOOST_SYSTEM_swigconstant(_IMP_example)
655 IMP_EXAMPLE_HAS_BOOST_SYSTEM = _IMP_example.IMP_EXAMPLE_HAS_BOOST_SYSTEM
656 
657 _IMP_example.IMP_EXAMPLE_HAS_CGAL_swigconstant(_IMP_example)
658 IMP_EXAMPLE_HAS_CGAL = _IMP_example.IMP_EXAMPLE_HAS_CGAL
659 
660 _IMP_example.IMP_EXAMPLE_HAS_HDF5_swigconstant(_IMP_example)
661 IMP_EXAMPLE_HAS_HDF5 = _IMP_example.IMP_EXAMPLE_HAS_HDF5
662 
663 _IMP_example.IMP_EXAMPLE_HAS_RMF_swigconstant(_IMP_example)
664 IMP_EXAMPLE_HAS_RMF = _IMP_example.IMP_EXAMPLE_HAS_RMF
665 
666 _IMP_example.IMP_EXAMPLE_HAS_EXAMPLEDEPENDENCY_swigconstant(_IMP_example)
667 IMP_EXAMPLE_HAS_EXAMPLEDEPENDENCY = _IMP_example.IMP_EXAMPLE_HAS_EXAMPLEDEPENDENCY
668 
669 _IMP_example.IMPEXAMPLE_SHOW_WARNINGS_swigconstant(_IMP_example)
670 IMPEXAMPLE_SHOW_WARNINGS = _IMP_example.IMPEXAMPLE_SHOW_WARNINGS
671 _object_types.append("ExampleRestraint")
672 
673 
674 def _object_cast_to_ExampleRestraint(o):
675  """_object_cast_to_ExampleRestraint(Object o) -> ExampleRestraint"""
676  return _IMP_example._object_cast_to_ExampleRestraint(o)
677 def ExampleDecorators(l=[]):
678  return [ExampleDecorator(x) for x in l]
679 _plural_types.append("ExampleDecorators")
680 
681 _value_types.append("ExampleDecorator")
682 
683 _object_types.append("ExampleUnaryFunction")
684 
685 
686 def _object_cast_to_ExampleUnaryFunction(o):
687  """_object_cast_to_ExampleUnaryFunction(Object o) -> ExampleUnaryFunction"""
688  return _IMP_example._object_cast_to_ExampleUnaryFunction(o)
689 _object_types.append("ExampleSingletonModifier")
690 
691 
692 def _object_cast_to_ExampleSingletonModifier(o):
693  """_object_cast_to_ExampleSingletonModifier(Object o) -> ExampleSingletonModifier"""
694  return _IMP_example._object_cast_to_ExampleSingletonModifier(o)
695 _object_types.append("ExamplePairScore")
696 
697 
698 def _object_cast_to_ExamplePairScore(o):
699  """_object_cast_to_ExamplePairScore(Object o) -> ExamplePairScore"""
700  return _IMP_example._object_cast_to_ExamplePairScore(o)
701 _object_types.append("ExampleSubsetFilterTable")
702 
703 
704 def _object_cast_to_ExampleSubsetFilterTable(o):
705  """_object_cast_to_ExampleSubsetFilterTable(Object o) -> ExampleSubsetFilterTable"""
706  return _IMP_example._object_cast_to_ExampleSubsetFilterTable(o)
707 _object_types.append("ExampleConstraint")
708 
709 
710 def _object_cast_to_ExampleConstraint(o):
711  """_object_cast_to_ExampleConstraint(Object o) -> ExampleConstraint"""
712  return _IMP_example._object_cast_to_ExampleConstraint(o)
713 _object_types.append("ExampleObject")
714 
715 
716 def _object_cast_to_ExampleObject(o):
717  """_object_cast_to_ExampleObject(Object o) -> ExampleObject"""
718  return _IMP_example._object_cast_to_ExampleObject(o)
719 ExampleTemplateClass3Ds=list
720 _plural_types.append("ExampleTemplateClass3Ds")
721 _value_types.append("ExampleTemplateClass3D")
722 
723 def create_model_and_particles():
724  m = IMP.Model()
727  IMP.algebra.Vector3D(10,10,10))
728  for i in range(0,100):
729  p = m.add_particle("p")
730  sc.add(p)
733  d.set_coordinates_are_optimized(True)
734  return (m, sc)
735 
737  """An example restraint written in Python.
738  This should be functionally equivalent to the C++ ExampleRestraint.
739  """
740  def __init__(self, m, p, k):
741  IMP.Restraint.__init__(self, m, "PythonExampleRestraint%1%")
742  self.p, self.k = p, k
743 
744  def do_add_score_and_derivatives(self, sa):
745  d = IMP.core.XYZ(self.get_model(), self.p)
746  score = .5 * self.k * d.get_z() * d.get_z()
747  if sa.get_derivative_accumulator():
748  deriv = self.k * d.get_z()
749  d.add_to_derivative(2, deriv, sa.get_derivative_accumulator())
750  sa.add_score(score)
751 
752  def do_get_inputs(self):
753  return [self.get_model().get_particle(self.p)]
754 
755 
757  """An example PairScore written in Python.
758  This should be functionally equivalent to the C++ ExamplePairScore.
759  """
760  def __init__(self, x0, k):
761  IMP.PairScore.__init__(self)
762  self.x0, self.k = x0, k
763 
764  def evaluate_index(self, m, pip, da):
765  d0 = IMP.core.XYZ(m, pip[0])
766  d1 = IMP.core.XYZ(m, pip[1])
767  diff = (d0.get_coordinates()
768  - d1.get_coordinates()).get_magnitude() - self.x0
769  score = .5 * self.k * diff * diff
770  if da:
771  # derivatives are requested
772  delta = d0.get_coordinates() - d1.get_coordinates()
773  udelta = delta.get_unit_vector()
774  dv = self.k * diff
775  d0.add_to_derivatives(udelta * dv, da)
776  d1.add_to_derivatives(-udelta * dv, da)
777  return score
778 
779  def do_get_inputs(self, m, pis):
780  return IMP.get_particles(m, pis)
781 
782 
784  """An example UnaryFunction written in Python.
785  This should be functionally equivalent to the C++ ExampleUnaryFunction.
786  """
787  def __init__(self, center, k):
788  IMP.UnaryFunction.__init__(self)
789  self.center, self.k = center, k
790 
791  def evaluate_with_derivative(self, feature):
792  return (self.evaluate(feature), self.k * (feature - self.center))
793 
794  def evaluate(self, feature):
795  return .5 * self.k * (feature - self.center) * (feature - self.center)
796 
797 
799  """An example Constraint written in Python.
800  This should be functionally equivalent to the C++ ExampleConstraint.
801  """
802 
803  k = None
804 
805  def __init__(self, p):
806  IMP.Constraint.__init__(self, p.get_model(), "ExampleConstraint%1%")
807  self.p = p
808  if self.k is None:
809  PythonExampleConstraint.k = IMP.IntKey("Constraint key")
810  if not p.has_attribute(self.k):
811  p.add_attribute(self.k, 0)
812 
813  def do_update_attributes(self):
814  self.p.set_value(self.k, self.p.get_value(self.k) + 1)
815 
816  def do_update_derivatives(self, da):
817  pass
818 
819  def do_get_inputs(self):
820  return [self.p]
821 
822  def do_get_outputs(self):
823  return [self.p]
824 
825 
827  """An example SingletonModifier written in Python.
828  This should be functionally equivalent to the C++
829  ExampleSingletonModifier.
830  """
831 
832  def __init__(self, bb):
833  IMP.SingletonModifier.__init__(self, "ExampleSingletonModifier%1%")
834  self.bb = bb
835 
836  def apply_index(self, m, pi):
837  d = IMP.core.XYZ(m, pi)
838  for i in range(3):
839  # shift the coordinate until it is in the box
840  while d.get_coordinate(i) < self.bb.get_corner(0)[i]:
841  d.set_coordinate(i,d.get_coordinate(i) + \
842  (self.bb.get_corner(1)[i] - self.bb.get_corner(0)[i]))
843  while d.get_coordinate(i) > self.bb.get_corner(1)[i]:
844  d.set_coordinate(i,d.get_coordinate(i) - \
845  (self.bb.get_corner(1)[i] - self.bb.get_corner(0)[i]))
846 
847  def do_get_inputs(self, m, pis):
848  return IMP.get_particles(m, pis)
849 
850  def do_get_outputs(self, m, pis):
851  return self.do_get_inputs(m, pis)
852 
853 
855  """Proxy of C++ IMP::example::ExampleRestraint class"""
856  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
857 
858  def __init__(self, m, p, k):
859  """__init__(IMP::example::ExampleRestraint self, Model m, ParticleIndex p, double k) -> ExampleRestraint"""
860  this = _IMP_example.new_ExampleRestraint(m, p, k)
861  try:
862  self.this.append(this)
863  except:
864  self.this = this
865 
866  def do_add_score_and_derivatives(self, sa):
867  """do_add_score_and_derivatives(ExampleRestraint self, ScoreAccumulator sa)"""
868  return _IMP_example.ExampleRestraint_do_add_score_and_derivatives(self, sa)
869 
870 
871  def do_get_inputs(self):
872  """do_get_inputs(ExampleRestraint self) -> IMP::ModelObjectsTemp"""
873  return _IMP_example.ExampleRestraint_do_get_inputs(self)
874 
875 
876  def get_version_info(self):
877  """get_version_info(ExampleRestraint self) -> VersionInfo"""
878  return _IMP_example.ExampleRestraint_get_version_info(self)
879 
880 
881  def __str__(self):
882  """__str__(ExampleRestraint self) -> std::string"""
883  return _IMP_example.ExampleRestraint___str__(self)
884 
885 
886  def __repr__(self):
887  """__repr__(ExampleRestraint self) -> std::string"""
888  return _IMP_example.ExampleRestraint___repr__(self)
889 
890  def get_from(o):
891  return _object_cast_to_ExampleRestraint(o)
892  get_from = staticmethod(get_from)
893 
894 ExampleRestraint_swigregister = _IMP_example.ExampleRestraint_swigregister
895 ExampleRestraint_swigregister(ExampleRestraint)
896 
898  """Proxy of C++ IMP::example::ExampleDecorator class"""
899  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
900 
901  def get_decorator_name(self):
902  """get_decorator_name(ExampleDecorator self) -> std::string"""
903  return _IMP_example.ExampleDecorator_get_decorator_name(self)
904 
905 
906  def set_decorator_name(self, nm):
907  """set_decorator_name(ExampleDecorator self, std::string nm)"""
908  return _IMP_example.ExampleDecorator_set_decorator_name(self, nm)
909 
910 
911  def __init__(self, *args):
912  """
913  __init__(IMP::example::ExampleDecorator self) -> ExampleDecorator
914  __init__(IMP::example::ExampleDecorator self, Model m, ParticleIndex id) -> ExampleDecorator
915  __init__(IMP::example::ExampleDecorator self, _ParticleAdaptor d) -> ExampleDecorator
916  """
917  this = _IMP_example.new_ExampleDecorator(*args)
918  try:
919  self.this.append(this)
920  except:
921  self.this = this
922 
923  def get_is_setup(*args):
924  """
925  get_is_setup(Model m, ParticleIndex pi) -> bool
926  get_is_setup(_ParticleAdaptor p) -> bool
927  """
928  return _IMP_example.ExampleDecorator_get_is_setup(*args)
929 
930  get_is_setup = staticmethod(get_is_setup)
931 
932  def show(self, *args):
933  """
934  show(ExampleDecorator self, _ostream out)
935  show(ExampleDecorator self)
936  """
937  return _IMP_example.ExampleDecorator_show(self, *args)
938 
939 
940  def setup_particle(*args):
941  """
942  setup_particle(Model m, ParticleIndex pi, std::string name) -> ExampleDecorator
943  setup_particle(_ParticleAdaptor decorator, std::string name) -> ExampleDecorator
944  """
945  return _IMP_example.ExampleDecorator_setup_particle(*args)
946 
947  setup_particle = staticmethod(setup_particle)
948 
949  def add_attribute(self, *args):
950  """
951  add_attribute(ExampleDecorator self, FloatKey k, IMP::Float v, bool opt)
952  add_attribute(ExampleDecorator self, FloatKey a0, IMP::Float a1)
953  add_attribute(ExampleDecorator self, IntKey a0, IMP::Int a1)
954  add_attribute(ExampleDecorator self, StringKey a0, IMP::String a1)
955  add_attribute(ExampleDecorator self, ParticleIndexKey a0, Particle a1)
956  add_attribute(ExampleDecorator self, ObjectKey a0, Object a1)
957  """
958  return _IMP_example.ExampleDecorator_add_attribute(self, *args)
959 
960 
961  def get_value(self, *args):
962  """
963  get_value(ExampleDecorator self, FloatKey a0) -> IMP::Float
964  get_value(ExampleDecorator self, IntKey a0) -> IMP::Int
965  get_value(ExampleDecorator self, StringKey a0) -> IMP::String
966  get_value(ExampleDecorator self, ParticleIndexKey a0) -> Particle
967  get_value(ExampleDecorator self, ObjectKey a0) -> Object
968  """
969  return _IMP_example.ExampleDecorator_get_value(self, *args)
970 
971 
972  def set_value(self, *args):
973  """
974  set_value(ExampleDecorator self, FloatKey a0, IMP::Float a1)
975  set_value(ExampleDecorator self, IntKey a0, IMP::Int a1)
976  set_value(ExampleDecorator self, StringKey a0, IMP::String a1)
977  set_value(ExampleDecorator self, ParticleIndexKey a0, Particle a1)
978  set_value(ExampleDecorator self, ObjectKey a0, Object a1)
979  """
980  return _IMP_example.ExampleDecorator_set_value(self, *args)
981 
982 
983  def remove_attribute(self, *args):
984  """
985  remove_attribute(ExampleDecorator self, FloatKey a0)
986  remove_attribute(ExampleDecorator self, IntKey a0)
987  remove_attribute(ExampleDecorator self, StringKey a0)
988  remove_attribute(ExampleDecorator self, ParticleIndexKey a0)
989  remove_attribute(ExampleDecorator self, ObjectKey a0)
990  """
991  return _IMP_example.ExampleDecorator_remove_attribute(self, *args)
992 
993 
994  def has_attribute(self, *args):
995  """
996  has_attribute(ExampleDecorator self, FloatKey a0) -> bool
997  has_attribute(ExampleDecorator self, IntKey a0) -> bool
998  has_attribute(ExampleDecorator self, StringKey a0) -> bool
999  has_attribute(ExampleDecorator self, ParticleIndexKey a0) -> bool
1000  has_attribute(ExampleDecorator self, ObjectKey a0) -> bool
1001  """
1002  return _IMP_example.ExampleDecorator_has_attribute(self, *args)
1003 
1004 
1005  def get_derivative(self, a0):
1006  """get_derivative(ExampleDecorator self, FloatKey a0) -> double"""
1007  return _IMP_example.ExampleDecorator_get_derivative(self, a0)
1008 
1009 
1010  def get_name(self):
1011  """get_name(ExampleDecorator self) -> std::string"""
1012  return _IMP_example.ExampleDecorator_get_name(self)
1013 
1014 
1015  def clear_caches(self):
1016  """clear_caches(ExampleDecorator self)"""
1017  return _IMP_example.ExampleDecorator_clear_caches(self)
1018 
1019 
1020  def set_name(self, a0):
1021  """set_name(ExampleDecorator self, std::string a0)"""
1022  return _IMP_example.ExampleDecorator_set_name(self, a0)
1023 
1024 
1025  def set_check_level(self, a0):
1026  """set_check_level(ExampleDecorator self, IMP::CheckLevel a0)"""
1027  return _IMP_example.ExampleDecorator_set_check_level(self, a0)
1028 
1029 
1030  def add_to_derivative(self, a0, a1, a2):
1031  """add_to_derivative(ExampleDecorator self, FloatKey a0, double a1, DerivativeAccumulator a2)"""
1032  return _IMP_example.ExampleDecorator_add_to_derivative(self, a0, a1, a2)
1033 
1034 
1035  def set_is_optimized(self, a0, a1):
1036  """set_is_optimized(ExampleDecorator self, FloatKey a0, bool a1)"""
1037  return _IMP_example.ExampleDecorator_set_is_optimized(self, a0, a1)
1038 
1039 
1040  def get_is_optimized(self, a0):
1041  """get_is_optimized(ExampleDecorator self, FloatKey a0) -> bool"""
1042  return _IMP_example.ExampleDecorator_get_is_optimized(self, a0)
1043 
1044 
1045  def get_check_level(self):
1046  """get_check_level(ExampleDecorator self) -> IMP::CheckLevel"""
1047  return _IMP_example.ExampleDecorator_get_check_level(self)
1048 
1049 
1050  def __eq__(self, *args):
1051  """
1052  __eq__(ExampleDecorator self, ExampleDecorator o) -> bool
1053  __eq__(ExampleDecorator self, Particle d) -> bool
1054  """
1055  return _IMP_example.ExampleDecorator___eq__(self, *args)
1056 
1057 
1058  def __ne__(self, *args):
1059  """
1060  __ne__(ExampleDecorator self, ExampleDecorator o) -> bool
1061  __ne__(ExampleDecorator self, Particle d) -> bool
1062  """
1063  return _IMP_example.ExampleDecorator___ne__(self, *args)
1064 
1065 
1066  def __le__(self, *args):
1067  """
1068  __le__(ExampleDecorator self, ExampleDecorator o) -> bool
1069  __le__(ExampleDecorator self, Particle d) -> bool
1070  """
1071  return _IMP_example.ExampleDecorator___le__(self, *args)
1072 
1073 
1074  def __lt__(self, *args):
1075  """
1076  __lt__(ExampleDecorator self, ExampleDecorator o) -> bool
1077  __lt__(ExampleDecorator self, Particle d) -> bool
1078  """
1079  return _IMP_example.ExampleDecorator___lt__(self, *args)
1080 
1081 
1082  def __ge__(self, *args):
1083  """
1084  __ge__(ExampleDecorator self, ExampleDecorator o) -> bool
1085  __ge__(ExampleDecorator self, Particle d) -> bool
1086  """
1087  return _IMP_example.ExampleDecorator___ge__(self, *args)
1088 
1089 
1090  def __gt__(self, *args):
1091  """
1092  __gt__(ExampleDecorator self, ExampleDecorator o) -> bool
1093  __gt__(ExampleDecorator self, Particle d) -> bool
1094  """
1095  return _IMP_example.ExampleDecorator___gt__(self, *args)
1096 
1097 
1098  def __hash__(self):
1099  """__hash__(ExampleDecorator self) -> std::size_t"""
1100  return _IMP_example.ExampleDecorator___hash__(self)
1101 
1102 
1103  def __str__(self):
1104  """__str__(ExampleDecorator self) -> std::string"""
1105  return _IMP_example.ExampleDecorator___str__(self)
1106 
1107 
1108  def __repr__(self):
1109  """__repr__(ExampleDecorator self) -> std::string"""
1110  return _IMP_example.ExampleDecorator___repr__(self)
1111 
1112  __swig_destroy__ = _IMP_example.delete_ExampleDecorator
1113  __del__ = lambda self: None
1114 ExampleDecorator_swigregister = _IMP_example.ExampleDecorator_swigregister
1115 ExampleDecorator_swigregister(ExampleDecorator)
1116 
1117 def ExampleDecorator_get_is_setup(*args):
1118  """
1119  get_is_setup(Model m, ParticleIndex pi) -> bool
1120  ExampleDecorator_get_is_setup(_ParticleAdaptor p) -> bool
1121  """
1122  return _IMP_example.ExampleDecorator_get_is_setup(*args)
1123 
1124 def ExampleDecorator_setup_particle(*args):
1125  """
1126  setup_particle(Model m, ParticleIndex pi, std::string name) -> ExampleDecorator
1127  ExampleDecorator_setup_particle(_ParticleAdaptor decorator, std::string name) -> ExampleDecorator
1128  """
1129  return _IMP_example.ExampleDecorator_setup_particle(*args)
1130 
1131 
1132 def __lshift__(out, n):
1133  """__lshift__(_ostream out, ExampleDecorator n) -> _ostream"""
1134  return _IMP_example.__lshift__(out, n)
1136  """Proxy of C++ IMP::example::ExampleUnaryFunction class"""
1137  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1138 
1139  def __init__(self, center, k):
1140  """__init__(IMP::example::ExampleUnaryFunction self, IMP::Float center, IMP::Float k) -> ExampleUnaryFunction"""
1141  this = _IMP_example.new_ExampleUnaryFunction(center, k)
1142  try:
1143  self.this.append(this)
1144  except:
1145  self.this = this
1146 
1147  def get_version_info(self):
1148  """get_version_info(ExampleUnaryFunction self) -> VersionInfo"""
1149  return _IMP_example.ExampleUnaryFunction_get_version_info(self)
1150 
1151 
1152  def __str__(self):
1153  """__str__(ExampleUnaryFunction self) -> std::string"""
1154  return _IMP_example.ExampleUnaryFunction___str__(self)
1155 
1156 
1157  def __repr__(self):
1158  """__repr__(ExampleUnaryFunction self) -> std::string"""
1159  return _IMP_example.ExampleUnaryFunction___repr__(self)
1160 
1161  def get_from(o):
1162  return _object_cast_to_ExampleUnaryFunction(o)
1163  get_from = staticmethod(get_from)
1164 
1165 ExampleUnaryFunction_swigregister = _IMP_example.ExampleUnaryFunction_swigregister
1166 ExampleUnaryFunction_swigregister(ExampleUnaryFunction)
1167 
1168 class ExampleObject(IMP.Object):
1169  """Proxy of C++ IMP::example::ExampleObject class"""
1170  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1171 
1172  def __init__(self, data):
1173  """__init__(IMP::example::ExampleObject self, IMP::Floats const & data) -> ExampleObject"""
1174  this = _IMP_example.new_ExampleObject(data)
1175  try:
1176  self.this.append(this)
1177  except:
1178  self.this = this
1179 
1180  def get_data(self, i):
1181  """get_data(ExampleObject self, unsigned int i) -> double"""
1182  return _IMP_example.ExampleObject_get_data(self, i)
1183 
1184 
1185  def get_version_info(self):
1186  """get_version_info(ExampleObject self) -> VersionInfo"""
1187  return _IMP_example.ExampleObject_get_version_info(self)
1188 
1189 
1190  def __str__(self):
1191  """__str__(ExampleObject self) -> std::string"""
1192  return _IMP_example.ExampleObject___str__(self)
1193 
1194 
1195  def __repr__(self):
1196  """__repr__(ExampleObject self) -> std::string"""
1197  return _IMP_example.ExampleObject___repr__(self)
1198 
1199  def get_from(o):
1200  return _object_cast_to_ExampleObject(o)
1201  get_from = staticmethod(get_from)
1202 
1203 ExampleObject_swigregister = _IMP_example.ExampleObject_swigregister
1204 ExampleObject_swigregister(ExampleObject)
1205 
1207  """Proxy of C++ IMP::example::ExampleSingletonModifier class"""
1208  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1209 
1210  def __init__(self, bb):
1211  """__init__(IMP::example::ExampleSingletonModifier self, BoundingBox3D bb) -> ExampleSingletonModifier"""
1212  this = _IMP_example.new_ExampleSingletonModifier(bb)
1213  try:
1214  self.this.append(this)
1215  except:
1216  self.this = this
1217 
1218  def do_get_inputs(self, m, pis):
1219  """do_get_inputs(ExampleSingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1220  return _IMP_example.ExampleSingletonModifier_do_get_inputs(self, m, pis)
1221 
1222 
1223  def do_get_outputs(self, m, pis):
1224  """do_get_outputs(ExampleSingletonModifier self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1225  return _IMP_example.ExampleSingletonModifier_do_get_outputs(self, m, pis)
1226 
1227 
1228  def get_version_info(self):
1229  """get_version_info(ExampleSingletonModifier self) -> VersionInfo"""
1230  return _IMP_example.ExampleSingletonModifier_get_version_info(self)
1231 
1232 
1233  def __str__(self):
1234  """__str__(ExampleSingletonModifier self) -> std::string"""
1235  return _IMP_example.ExampleSingletonModifier___str__(self)
1236 
1237 
1238  def __repr__(self):
1239  """__repr__(ExampleSingletonModifier self) -> std::string"""
1240  return _IMP_example.ExampleSingletonModifier___repr__(self)
1241 
1242  def get_from(o):
1243  return _object_cast_to_ExampleSingletonModifier(o)
1244  get_from = staticmethod(get_from)
1245 
1246 ExampleSingletonModifier_swigregister = _IMP_example.ExampleSingletonModifier_swigregister
1247 ExampleSingletonModifier_swigregister(ExampleSingletonModifier)
1248 
1250  """Proxy of C++ IMP::example::ExamplePairScore class"""
1251  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1252 
1253  def __init__(self, x0, k):
1254  """__init__(IMP::example::ExamplePairScore self, double x0, double k) -> ExamplePairScore"""
1255  this = _IMP_example.new_ExamplePairScore(x0, k)
1256  try:
1257  self.this.append(this)
1258  except:
1259  self.this = this
1260 
1261  def do_get_inputs(self, m, pis):
1262  """do_get_inputs(ExamplePairScore self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
1263  return _IMP_example.ExamplePairScore_do_get_inputs(self, m, pis)
1264 
1265 
1266  def get_version_info(self):
1267  """get_version_info(ExamplePairScore self) -> VersionInfo"""
1268  return _IMP_example.ExamplePairScore_get_version_info(self)
1269 
1270 
1271  def __str__(self):
1272  """__str__(ExamplePairScore self) -> std::string"""
1273  return _IMP_example.ExamplePairScore___str__(self)
1274 
1275 
1276  def __repr__(self):
1277  """__repr__(ExamplePairScore self) -> std::string"""
1278  return _IMP_example.ExamplePairScore___repr__(self)
1279 
1280  def get_from(o):
1281  return _object_cast_to_ExamplePairScore(o)
1282  get_from = staticmethod(get_from)
1283 
1284 ExamplePairScore_swigregister = _IMP_example.ExamplePairScore_swigregister
1285 ExamplePairScore_swigregister(ExamplePairScore)
1286 
1288  """Proxy of C++ IMP::example::ExampleSubsetFilterTable class"""
1289  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1290 
1291  def __init__(self, max_diff, pt):
1292  """__init__(IMP::example::ExampleSubsetFilterTable self, unsigned int max_diff, IMP::ParticlesTemp const & pt) -> ExampleSubsetFilterTable"""
1293  this = _IMP_example.new_ExampleSubsetFilterTable(max_diff, pt)
1294  try:
1295  self.this.append(this)
1296  except:
1297  self.this = this
1298 
1299  def get_version_info(self):
1300  """get_version_info(ExampleSubsetFilterTable self) -> VersionInfo"""
1301  return _IMP_example.ExampleSubsetFilterTable_get_version_info(self)
1302 
1303 
1304  def __str__(self):
1305  """__str__(ExampleSubsetFilterTable self) -> std::string"""
1306  return _IMP_example.ExampleSubsetFilterTable___str__(self)
1307 
1308 
1309  def __repr__(self):
1310  """__repr__(ExampleSubsetFilterTable self) -> std::string"""
1311  return _IMP_example.ExampleSubsetFilterTable___repr__(self)
1312 
1313  def get_from(o):
1314  return _object_cast_to_ExampleSubsetFilterTable(o)
1315  get_from = staticmethod(get_from)
1316 
1317 ExampleSubsetFilterTable_swigregister = _IMP_example.ExampleSubsetFilterTable_swigregister
1318 ExampleSubsetFilterTable_swigregister(ExampleSubsetFilterTable)
1319 
1321  """Proxy of C++ IMP::example::ExampleConstraint class"""
1322  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1323 
1324  def __init__(self, p):
1325  """__init__(IMP::example::ExampleConstraint self, Particle p) -> ExampleConstraint"""
1326  this = _IMP_example.new_ExampleConstraint(p)
1327  try:
1328  self.this.append(this)
1329  except:
1330  self.this = this
1331 
1332  def do_get_inputs(self):
1333  """do_get_inputs(ExampleConstraint self) -> IMP::ModelObjectsTemp"""
1334  return _IMP_example.ExampleConstraint_do_get_inputs(self)
1335 
1336 
1337  def do_get_outputs(self):
1338  """do_get_outputs(ExampleConstraint self) -> IMP::ModelObjectsTemp"""
1339  return _IMP_example.ExampleConstraint_do_get_outputs(self)
1340 
1341 
1342  def get_key():
1343  """get_key() -> IntKey"""
1344  return _IMP_example.ExampleConstraint_get_key()
1345 
1346  get_key = staticmethod(get_key)
1347 
1348  def get_version_info(self):
1349  """get_version_info(ExampleConstraint self) -> VersionInfo"""
1350  return _IMP_example.ExampleConstraint_get_version_info(self)
1351 
1352 
1353  def __str__(self):
1354  """__str__(ExampleConstraint self) -> std::string"""
1355  return _IMP_example.ExampleConstraint___str__(self)
1356 
1357 
1358  def __repr__(self):
1359  """__repr__(ExampleConstraint self) -> std::string"""
1360  return _IMP_example.ExampleConstraint___repr__(self)
1361 
1362  def get_from(o):
1363  return _object_cast_to_ExampleConstraint(o)
1364  get_from = staticmethod(get_from)
1365 
1366 ExampleConstraint_swigregister = _IMP_example.ExampleConstraint_swigregister
1367 ExampleConstraint_swigregister(ExampleConstraint)
1368 
1369 def ExampleConstraint_get_key():
1370  """ExampleConstraint_get_key() -> IntKey"""
1371  return _IMP_example.ExampleConstraint_get_key()
1372 
1373 
1374 def create_serial_mover(ps):
1375  """create_serial_mover(IMP::ParticlesTemp const & ps) -> MonteCarloMover"""
1376  return _IMP_example.create_serial_mover(ps)
1377 
1378 def optimize_balls(*args):
1379  """
1380  optimize_balls(IMP::ParticlesTemp const & ps, IMP::RestraintsTemp const & rs, IMP::PairPredicates const & excluded, IMP::OptimizerStates const & opt_states, IMP::LogLevel ll)
1381  optimize_balls(IMP::ParticlesTemp const & ps, IMP::RestraintsTemp const & rs, IMP::PairPredicates const & excluded, IMP::OptimizerStates const & opt_states)
1382  optimize_balls(IMP::ParticlesTemp const & ps, IMP::RestraintsTemp const & rs, IMP::PairPredicates const & excluded)
1383  optimize_balls(IMP::ParticlesTemp const & ps, IMP::RestraintsTemp const & rs)
1384  optimize_balls(IMP::ParticlesTemp const & ps)
1385  """
1386  return _IMP_example.optimize_balls(*args)
1387 
1388 def optimize_assembly(*args):
1389  """
1390  optimize_assembly(Model m, IMP::ParticlesTemp const & components, IMP::RestraintsTemp const & interactions, IMP::RestraintsTemp const & other_restraints, BoundingBox3D bb, PairScore ev, double cutoff, IMP::PairPredicates const & excluded)
1391  optimize_assembly(Model m, IMP::ParticlesTemp const & components, IMP::RestraintsTemp const & interactions, IMP::RestraintsTemp const & other_restraints, BoundingBox3D bb, PairScore ev, double cutoff)
1392  """
1393  return _IMP_example.optimize_assembly(*args)
1394 
1395 def get_number_of_incidences(psa, psb, point_distance):
1396  """get_number_of_incidences(IMP::ParticlesTemp const & psa, IMP::ParticlesTemp const & psb, double point_distance) -> unsigned int"""
1397  return _IMP_example.get_number_of_incidences(psa, psb, point_distance)
1398 
1399 def create_chain_restraint(ps, length_factor, k, name):
1400  """create_chain_restraint(IMP::ParticlesTemp const & ps, double length_factor, double k, std::string name) -> Restraint"""
1401  return _IMP_example.create_chain_restraint(ps, length_factor, k, name)
1402 
1403 def create_excluded_volume(ps, k, name):
1404  """create_excluded_volume(IMP::ParticlesTemp const & ps, double k, std::string name) -> Restraint"""
1405  return _IMP_example.create_excluded_volume(ps, k, name)
1406 class ExampleTemplateClass3D(object):
1407  """Proxy of C++ IMP::example::ExampleTemplateClassD<(3)> class"""
1408  thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1409 
1410  def __init__(self, *args):
1411  """
1412  __init__(IMP::example::ExampleTemplateClassD<(3)> self) -> ExampleTemplateClass3D
1413  __init__(IMP::example::ExampleTemplateClassD<(3)> self, Vector3D a, Vector3D b) -> ExampleTemplateClass3D
1414  """
1415  this = _IMP_example.new_ExampleTemplateClass3D(*args)
1416  try:
1417  self.this.append(this)
1418  except:
1419  self.this = this
1420 
1421  def get_point(self, i):
1422  """get_point(ExampleTemplateClass3D self, unsigned int i) -> Vector3D"""
1423  return _IMP_example.ExampleTemplateClass3D_get_point(self, i)
1424 
1425 
1426  def show(self, *args):
1427  """
1428  show(ExampleTemplateClass3D self, _ostream out)
1429  show(ExampleTemplateClass3D self)
1430  """
1431  return _IMP_example.ExampleTemplateClass3D_show(self, *args)
1432 
1433 
1434  def __str__(self):
1435  """__str__(ExampleTemplateClass3D self) -> std::string"""
1436  return _IMP_example.ExampleTemplateClass3D___str__(self)
1437 
1438 
1439  def __repr__(self):
1440  """__repr__(ExampleTemplateClass3D self) -> std::string"""
1441  return _IMP_example.ExampleTemplateClass3D___repr__(self)
1442 
1443  __swig_destroy__ = _IMP_example.delete_ExampleTemplateClass3D
1444  __del__ = lambda self: None
1445 ExampleTemplateClass3D_swigregister = _IMP_example.ExampleTemplateClass3D_swigregister
1446 ExampleTemplateClass3D_swigregister(ExampleTemplateClass3D)
1447 
1448 
1449 def get_module_version():
1450  """get_module_version() -> std::string const"""
1451  return _IMP_example.get_module_version()
1452 
1453 def get_example_path(fname):
1454  """get_example_path(std::string fname) -> std::string"""
1455  return _IMP_example.get_example_path(fname)
1456 
1457 def get_data_path(fname):
1458  """get_data_path(std::string fname) -> std::string"""
1459  return _IMP_example.get_data_path(fname)
1460 from . import _version_check
1461 _version_check.check_version(get_module_version())
1462 __version__ = get_module_version()
1463 
1464 
1465 
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:38
virtual void apply_index(Model *m, ParticleIndex v) const
virtual double evaluate(double feature) const
Calculate score with respect to the given feature.
Definition: UnaryFunction.h:33
core::MonteCarloMover * create_serial_mover(const ParticlesTemp &ps)
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.
void optimize_assembly(Model *m, const ParticlesTemp &components, const RestraintsTemp &interactions, const RestraintsTemp &other_restraints, const algebra::BoundingBox3D &bb, PairScore *ev, double cutoff, const PairPredicates &excluded=PairPredicates())
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
Composable functors to implement scores via compile-time composition.
Restraint * create_chain_restraint(const ParticlesTemp &ps, double length_factor, double k, std::string name)
Vector3D get_random_vector_in(const Cylinder3D &c)
Generate a random vector in a cylinder with uniform density.
void optimize_balls(const ParticlesTemp &ps, const RestraintsTemp &rs=RestraintsTemp(), const PairPredicates &excluded=PairPredicates(), const OptimizerStates &opt_states=OptimizerStates(), LogLevel ll=DEFAULT)
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.
Restraint * create_excluded_volume(const ParticlesTemp &ps, double k, std::string name)
virtual ModelObjectsTemp do_get_inputs(Model *m, const ParticleIndexes &pis) const =0
Restrain a particle to be in the x,y plane.
A decorator for a particle with x,y,z coordinates.
Definition: XYZ.h:30
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 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.
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:52