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