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