11 from __future__
import print_function, division, absolute_import
17 from sys
import version_info
18 if version_info >= (2, 6, 0):
19 def swig_import_helper():
20 from os.path
import dirname
24 fp, pathname, description = imp.find_module(
'_IMP_modeller', [dirname(__file__)])
30 _mod = imp.load_module(
'_IMP_modeller', fp, pathname, description)
34 _IMP_modeller = swig_import_helper()
35 del swig_import_helper
40 _swig_property = property
45 def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
46 if (name ==
"thisown"):
47 return self.this.own(value)
49 if type(value).__name__ ==
'SwigPyObject':
50 self.__dict__[name] = value
52 method = class_type.__swig_setmethods__.get(name,
None)
54 return method(self, value)
56 object.__setattr__(self, name, value)
58 raise AttributeError(
"You cannot add attributes to %s" % self)
61 def _swig_setattr(self, class_type, name, value):
62 return _swig_setattr_nondynamic(self, class_type, name, value, 0)
65 def _swig_getattr_nondynamic(self, class_type, name, static=1):
66 if (name ==
"thisown"):
67 return self.this.own()
68 method = class_type.__swig_getmethods__.get(name,
None)
72 return object.__getattr__(self, name)
74 raise AttributeError(name)
76 def _swig_getattr(self, class_type, name):
77 return _swig_getattr_nondynamic(self, class_type, name, 0)
82 strthis =
"proxy of " + self.this.__repr__()
85 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
90 except AttributeError:
97 def _swig_setattr_nondynamic_method(set):
98 def set_attr(self, name, value):
99 if (name ==
"thisown"):
100 return self.this.own(value)
101 if hasattr(self, name)
or (name ==
"this"):
102 set(self, name, value)
104 raise AttributeError(
"You cannot add attributes to %s" % self)
110 weakref_proxy = weakref.proxy
112 weakref_proxy =
lambda x: x
115 class IMP_MODELLER_SwigPyIterator(object):
116 """Proxy of C++ swig::IMP_MODELLER_SwigPyIterator class"""
117 thisown = _swig_property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
'The membership flag')
119 def __init__(self, *args, **kwargs):
120 raise AttributeError(
"No constructor defined - class is abstract")
121 __repr__ = _swig_repr
122 __swig_destroy__ = _IMP_modeller.delete_IMP_MODELLER_SwigPyIterator
123 __del__ =
lambda self:
None
126 """value(IMP_MODELLER_SwigPyIterator self) -> PyObject *"""
127 return _IMP_modeller.IMP_MODELLER_SwigPyIterator_value(self)
132 incr(IMP_MODELLER_SwigPyIterator self, size_t n=1) -> IMP_MODELLER_SwigPyIterator
133 incr(IMP_MODELLER_SwigPyIterator self) -> IMP_MODELLER_SwigPyIterator
135 return _IMP_modeller.IMP_MODELLER_SwigPyIterator_incr(self, n)
140 decr(IMP_MODELLER_SwigPyIterator self, size_t n=1) -> IMP_MODELLER_SwigPyIterator
141 decr(IMP_MODELLER_SwigPyIterator self) -> IMP_MODELLER_SwigPyIterator
143 return _IMP_modeller.IMP_MODELLER_SwigPyIterator_decr(self, n)
146 def distance(self, x):
147 """distance(IMP_MODELLER_SwigPyIterator self, IMP_MODELLER_SwigPyIterator x) -> ptrdiff_t"""
148 return _IMP_modeller.IMP_MODELLER_SwigPyIterator_distance(self, x)
152 """equal(IMP_MODELLER_SwigPyIterator self, IMP_MODELLER_SwigPyIterator x) -> bool"""
153 return _IMP_modeller.IMP_MODELLER_SwigPyIterator_equal(self, x)
157 """copy(IMP_MODELLER_SwigPyIterator self) -> IMP_MODELLER_SwigPyIterator"""
158 return _IMP_modeller.IMP_MODELLER_SwigPyIterator_copy(self)
162 """next(IMP_MODELLER_SwigPyIterator self) -> PyObject *"""
163 return _IMP_modeller.IMP_MODELLER_SwigPyIterator_next(self)
167 """__next__(IMP_MODELLER_SwigPyIterator self) -> PyObject *"""
168 return _IMP_modeller.IMP_MODELLER_SwigPyIterator___next__(self)
172 """previous(IMP_MODELLER_SwigPyIterator self) -> PyObject *"""
173 return _IMP_modeller.IMP_MODELLER_SwigPyIterator_previous(self)
176 def advance(self, n):
177 """advance(IMP_MODELLER_SwigPyIterator self, ptrdiff_t n) -> IMP_MODELLER_SwigPyIterator"""
178 return _IMP_modeller.IMP_MODELLER_SwigPyIterator_advance(self, n)
182 """__eq__(IMP_MODELLER_SwigPyIterator self, IMP_MODELLER_SwigPyIterator x) -> bool"""
183 return _IMP_modeller.IMP_MODELLER_SwigPyIterator___eq__(self, x)
187 """__ne__(IMP_MODELLER_SwigPyIterator self, IMP_MODELLER_SwigPyIterator x) -> bool"""
188 return _IMP_modeller.IMP_MODELLER_SwigPyIterator___ne__(self, x)
191 def __iadd__(self, n):
192 """__iadd__(IMP_MODELLER_SwigPyIterator self, ptrdiff_t n) -> IMP_MODELLER_SwigPyIterator"""
193 return _IMP_modeller.IMP_MODELLER_SwigPyIterator___iadd__(self, n)
196 def __isub__(self, n):
197 """__isub__(IMP_MODELLER_SwigPyIterator self, ptrdiff_t n) -> IMP_MODELLER_SwigPyIterator"""
198 return _IMP_modeller.IMP_MODELLER_SwigPyIterator___isub__(self, n)
201 def __add__(self, n):
202 """__add__(IMP_MODELLER_SwigPyIterator self, ptrdiff_t n) -> IMP_MODELLER_SwigPyIterator"""
203 return _IMP_modeller.IMP_MODELLER_SwigPyIterator___add__(self, n)
206 def __sub__(self, *args):
208 __sub__(IMP_MODELLER_SwigPyIterator self, ptrdiff_t n) -> IMP_MODELLER_SwigPyIterator
209 __sub__(IMP_MODELLER_SwigPyIterator self, IMP_MODELLER_SwigPyIterator x) -> ptrdiff_t
211 return _IMP_modeller.IMP_MODELLER_SwigPyIterator___sub__(self, *args)
215 IMP_MODELLER_SwigPyIterator_swigregister = _IMP_modeller.IMP_MODELLER_SwigPyIterator_swigregister
216 IMP_MODELLER_SwigPyIterator_swigregister(IMP_MODELLER_SwigPyIterator)
225 _IMP_modeller.IMP_DEBUG_swigconstant(_IMP_modeller)
226 IMP_DEBUG = _IMP_modeller.IMP_DEBUG
228 _IMP_modeller.IMP_RELEASE_swigconstant(_IMP_modeller)
229 IMP_RELEASE = _IMP_modeller.IMP_RELEASE
231 _IMP_modeller.IMP_SILENT_swigconstant(_IMP_modeller)
232 IMP_SILENT = _IMP_modeller.IMP_SILENT
234 _IMP_modeller.IMP_PROGRESS_swigconstant(_IMP_modeller)
235 IMP_PROGRESS = _IMP_modeller.IMP_PROGRESS
237 _IMP_modeller.IMP_TERSE_swigconstant(_IMP_modeller)
238 IMP_TERSE = _IMP_modeller.IMP_TERSE
240 _IMP_modeller.IMP_VERBOSE_swigconstant(_IMP_modeller)
241 IMP_VERBOSE = _IMP_modeller.IMP_VERBOSE
243 _IMP_modeller.IMP_MEMORY_swigconstant(_IMP_modeller)
244 IMP_MEMORY = _IMP_modeller.IMP_MEMORY
246 _IMP_modeller.IMP_NONE_swigconstant(_IMP_modeller)
247 IMP_NONE = _IMP_modeller.IMP_NONE
249 _IMP_modeller.IMP_USAGE_swigconstant(_IMP_modeller)
250 IMP_USAGE = _IMP_modeller.IMP_USAGE
252 _IMP_modeller.IMP_INTERNAL_swigconstant(_IMP_modeller)
253 IMP_INTERNAL = _IMP_modeller.IMP_INTERNAL
255 _IMP_modeller.IMP_KERNEL_HAS_LOG4CXX_swigconstant(_IMP_modeller)
256 IMP_KERNEL_HAS_LOG4CXX = _IMP_modeller.IMP_KERNEL_HAS_LOG4CXX
258 _IMP_modeller.IMP_COMPILER_HAS_DEBUG_VECTOR_swigconstant(_IMP_modeller)
259 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_modeller.IMP_COMPILER_HAS_DEBUG_VECTOR
261 _IMP_modeller.IMP_COMPILER_HAS_RANDOM_SHUFFLE_swigconstant(_IMP_modeller)
262 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_modeller.IMP_COMPILER_HAS_RANDOM_SHUFFLE
264 _IMP_modeller.IMP_COMPILER_HAS_THREE_WAY_swigconstant(_IMP_modeller)
265 IMP_COMPILER_HAS_THREE_WAY = _IMP_modeller.IMP_COMPILER_HAS_THREE_WAY
267 _IMP_modeller.IMP_KERNEL_HAS_BOOST_RANDOM_swigconstant(_IMP_modeller)
268 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_modeller.IMP_KERNEL_HAS_BOOST_RANDOM
270 _IMP_modeller.IMP_KERNEL_HAS_NUMPY_swigconstant(_IMP_modeller)
271 IMP_KERNEL_HAS_NUMPY = _IMP_modeller.IMP_KERNEL_HAS_NUMPY
273 _IMP_modeller.IMP_KERNEL_HAS_GPERFTOOLS_swigconstant(_IMP_modeller)
274 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_modeller.IMP_KERNEL_HAS_GPERFTOOLS
276 _IMP_modeller.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER_swigconstant(_IMP_modeller)
277 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_modeller.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
279 _IMP_modeller.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER_swigconstant(_IMP_modeller)
280 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_modeller.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
282 _IMP_modeller.IMPKERNEL_SHOW_WARNINGS_swigconstant(_IMP_modeller)
283 IMPKERNEL_SHOW_WARNINGS = _IMP_modeller.IMPKERNEL_SHOW_WARNINGS
286 class _DirectorObjects(object):
287 """@internal Simple class to keep references to director objects
288 to prevent premature deletion."""
291 def register(self, obj):
292 """Take a reference to a director object; will only work for
293 refcounted C++ classes"""
294 if hasattr(obj,
'get_ref_count'):
295 self._objects.append(obj)
297 """Only drop our reference and allow cleanup by Python if no other
298 Python references exist (we hold 3 references: one in self._objects,
299 one in x, and one in the argument list for getrefcount) *and* no
300 other C++ references exist (the Python object always holds one)"""
301 objs = [x
for x
in self._objects
if sys.getrefcount(x) > 3 \
302 or x.get_ref_count() > 1]
306 def get_object_count(self):
307 """Get number of director objects (useful for testing only)"""
308 return len(self._objects)
309 _director_objects = _DirectorObjects()
311 class _ostream(object):
312 """Proxy of C++ std::ostream class"""
313 thisown = _swig_property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
'The membership flag')
315 def __init__(self, *args, **kwargs):
316 raise AttributeError(
"No constructor defined")
317 __repr__ = _swig_repr
319 def write(self, osa_buf):
320 """write(_ostream self, char const * osa_buf)"""
321 return _IMP_modeller._ostream_write(self, osa_buf)
323 _ostream_swigregister = _IMP_modeller._ostream_swigregister
324 _ostream_swigregister(_ostream)
327 _IMP_modeller.IMP_HAS_NOEXCEPT_swigconstant(_IMP_modeller)
328 IMP_HAS_NOEXCEPT = _IMP_modeller.IMP_HAS_NOEXCEPT
330 _IMP_modeller.IMP_C_OPEN_BINARY_swigconstant(_IMP_modeller)
331 IMP_C_OPEN_BINARY = _IMP_modeller.IMP_C_OPEN_BINARY
334 _IMP_modeller.IMP_CGAL_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_modeller)
335 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_modeller.IMP_CGAL_HAS_BOOST_FILESYSTEM
337 _IMP_modeller.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_modeller)
338 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_modeller.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
340 _IMP_modeller.IMP_CGAL_HAS_BOOST_RANDOM_swigconstant(_IMP_modeller)
341 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_modeller.IMP_CGAL_HAS_BOOST_RANDOM
343 _IMP_modeller.IMP_CGAL_HAS_BOOST_SERIALIZATION_swigconstant(_IMP_modeller)
344 IMP_CGAL_HAS_BOOST_SERIALIZATION = _IMP_modeller.IMP_CGAL_HAS_BOOST_SERIALIZATION
346 _IMP_modeller.IMP_CGAL_HAS_BOOST_SYSTEM_swigconstant(_IMP_modeller)
347 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_modeller.IMP_CGAL_HAS_BOOST_SYSTEM
349 _IMP_modeller.IMP_CGAL_HAS_NUMPY_swigconstant(_IMP_modeller)
350 IMP_CGAL_HAS_NUMPY = _IMP_modeller.IMP_CGAL_HAS_NUMPY
352 _IMP_modeller.IMPCGAL_SHOW_WARNINGS_swigconstant(_IMP_modeller)
353 IMPCGAL_SHOW_WARNINGS = _IMP_modeller.IMPCGAL_SHOW_WARNINGS
356 _IMP_modeller.IMP_ALGEBRA_HAS_IMP_CGAL_swigconstant(_IMP_modeller)
357 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_modeller.IMP_ALGEBRA_HAS_IMP_CGAL
359 _IMP_modeller.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_modeller)
360 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_modeller.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
362 _IMP_modeller.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_modeller)
363 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_modeller.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
365 _IMP_modeller.IMP_ALGEBRA_HAS_BOOST_RANDOM_swigconstant(_IMP_modeller)
366 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_modeller.IMP_ALGEBRA_HAS_BOOST_RANDOM
368 _IMP_modeller.IMP_ALGEBRA_HAS_BOOST_SERIALIZATION_swigconstant(_IMP_modeller)
369 IMP_ALGEBRA_HAS_BOOST_SERIALIZATION = _IMP_modeller.IMP_ALGEBRA_HAS_BOOST_SERIALIZATION
371 _IMP_modeller.IMP_ALGEBRA_HAS_BOOST_SYSTEM_swigconstant(_IMP_modeller)
372 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_modeller.IMP_ALGEBRA_HAS_BOOST_SYSTEM
374 _IMP_modeller.IMP_ALGEBRA_HAS_CGAL_swigconstant(_IMP_modeller)
375 IMP_ALGEBRA_HAS_CGAL = _IMP_modeller.IMP_ALGEBRA_HAS_CGAL
377 _IMP_modeller.IMP_ALGEBRA_HAS_NUMPY_swigconstant(_IMP_modeller)
378 IMP_ALGEBRA_HAS_NUMPY = _IMP_modeller.IMP_ALGEBRA_HAS_NUMPY
380 _IMP_modeller.IMP_ALGEBRA_HAS_ANN_swigconstant(_IMP_modeller)
381 IMP_ALGEBRA_HAS_ANN = _IMP_modeller.IMP_ALGEBRA_HAS_ANN
383 _IMP_modeller.IMPALGEBRA_SHOW_WARNINGS_swigconstant(_IMP_modeller)
384 IMPALGEBRA_SHOW_WARNINGS = _IMP_modeller.IMPALGEBRA_SHOW_WARNINGS
387 _IMP_modeller.IMP_DISPLAY_HAS_IMP_CGAL_swigconstant(_IMP_modeller)
388 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_modeller.IMP_DISPLAY_HAS_IMP_CGAL
390 _IMP_modeller.IMP_DISPLAY_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_modeller)
391 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_modeller.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
393 _IMP_modeller.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_modeller)
394 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_modeller.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
396 _IMP_modeller.IMP_DISPLAY_HAS_BOOST_RANDOM_swigconstant(_IMP_modeller)
397 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_modeller.IMP_DISPLAY_HAS_BOOST_RANDOM
399 _IMP_modeller.IMP_DISPLAY_HAS_BOOST_SERIALIZATION_swigconstant(_IMP_modeller)
400 IMP_DISPLAY_HAS_BOOST_SERIALIZATION = _IMP_modeller.IMP_DISPLAY_HAS_BOOST_SERIALIZATION
402 _IMP_modeller.IMP_DISPLAY_HAS_BOOST_SYSTEM_swigconstant(_IMP_modeller)
403 IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_modeller.IMP_DISPLAY_HAS_BOOST_SYSTEM
405 _IMP_modeller.IMP_DISPLAY_HAS_CGAL_swigconstant(_IMP_modeller)
406 IMP_DISPLAY_HAS_CGAL = _IMP_modeller.IMP_DISPLAY_HAS_CGAL
408 _IMP_modeller.IMP_DISPLAY_HAS_NUMPY_swigconstant(_IMP_modeller)
409 IMP_DISPLAY_HAS_NUMPY = _IMP_modeller.IMP_DISPLAY_HAS_NUMPY
411 _IMP_modeller.IMPDISPLAY_SHOW_WARNINGS_swigconstant(_IMP_modeller)
412 IMPDISPLAY_SHOW_WARNINGS = _IMP_modeller.IMPDISPLAY_SHOW_WARNINGS
415 _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL_swigconstant(_IMP_modeller)
416 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
418 _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_modeller)
419 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
421 _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_modeller)
422 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
424 _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM_swigconstant(_IMP_modeller)
425 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
427 _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_BOOST_SERIALIZATION_swigconstant(_IMP_modeller)
428 IMP_SCORE_FUNCTOR_HAS_BOOST_SERIALIZATION = _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_BOOST_SERIALIZATION
430 _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM_swigconstant(_IMP_modeller)
431 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
433 _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_CGAL_swigconstant(_IMP_modeller)
434 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_CGAL
436 _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_HDF5_swigconstant(_IMP_modeller)
437 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_HDF5
439 _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_NUMPY_swigconstant(_IMP_modeller)
440 IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_modeller.IMP_SCORE_FUNCTOR_HAS_NUMPY
442 _IMP_modeller.IMPSCOREFUNCTOR_SHOW_WARNINGS_swigconstant(_IMP_modeller)
443 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_modeller.IMPSCOREFUNCTOR_SHOW_WARNINGS
446 _IMP_modeller.IMP_CORE_HAS_IMP_CGAL_swigconstant(_IMP_modeller)
447 IMP_CORE_HAS_IMP_CGAL = _IMP_modeller.IMP_CORE_HAS_IMP_CGAL
449 _IMP_modeller.IMP_CORE_HAS_IMP_KERNEL_swigconstant(_IMP_modeller)
450 IMP_CORE_HAS_IMP_KERNEL = _IMP_modeller.IMP_CORE_HAS_IMP_KERNEL
452 _IMP_modeller.IMP_CORE_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_modeller)
453 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_modeller.IMP_CORE_HAS_BOOST_FILESYSTEM
455 _IMP_modeller.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_modeller)
456 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_modeller.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
458 _IMP_modeller.IMP_CORE_HAS_BOOST_RANDOM_swigconstant(_IMP_modeller)
459 IMP_CORE_HAS_BOOST_RANDOM = _IMP_modeller.IMP_CORE_HAS_BOOST_RANDOM
461 _IMP_modeller.IMP_CORE_HAS_BOOST_SERIALIZATION_swigconstant(_IMP_modeller)
462 IMP_CORE_HAS_BOOST_SERIALIZATION = _IMP_modeller.IMP_CORE_HAS_BOOST_SERIALIZATION
464 _IMP_modeller.IMP_CORE_HAS_BOOST_SYSTEM_swigconstant(_IMP_modeller)
465 IMP_CORE_HAS_BOOST_SYSTEM = _IMP_modeller.IMP_CORE_HAS_BOOST_SYSTEM
467 _IMP_modeller.IMP_CORE_HAS_CGAL_swigconstant(_IMP_modeller)
468 IMP_CORE_HAS_CGAL = _IMP_modeller.IMP_CORE_HAS_CGAL
470 _IMP_modeller.IMP_CORE_HAS_HDF5_swigconstant(_IMP_modeller)
471 IMP_CORE_HAS_HDF5 = _IMP_modeller.IMP_CORE_HAS_HDF5
473 _IMP_modeller.IMP_CORE_HAS_NUMPY_swigconstant(_IMP_modeller)
474 IMP_CORE_HAS_NUMPY = _IMP_modeller.IMP_CORE_HAS_NUMPY
476 _IMP_modeller.IMPCORE_SHOW_WARNINGS_swigconstant(_IMP_modeller)
477 IMPCORE_SHOW_WARNINGS = _IMP_modeller.IMPCORE_SHOW_WARNINGS
480 _IMP_modeller.IMP_MODELLER_HAS_IMP_ALGEBRA_swigconstant(_IMP_modeller)
481 IMP_MODELLER_HAS_IMP_ALGEBRA = _IMP_modeller.IMP_MODELLER_HAS_IMP_ALGEBRA
483 _IMP_modeller.IMP_MODELLER_HAS_IMP_CGAL_swigconstant(_IMP_modeller)
484 IMP_MODELLER_HAS_IMP_CGAL = _IMP_modeller.IMP_MODELLER_HAS_IMP_CGAL
486 _IMP_modeller.IMP_MODELLER_HAS_IMP_DISPLAY_swigconstant(_IMP_modeller)
487 IMP_MODELLER_HAS_IMP_DISPLAY = _IMP_modeller.IMP_MODELLER_HAS_IMP_DISPLAY
489 _IMP_modeller.IMP_MODELLER_HAS_IMP_KERNEL_swigconstant(_IMP_modeller)
490 IMP_MODELLER_HAS_IMP_KERNEL = _IMP_modeller.IMP_MODELLER_HAS_IMP_KERNEL
492 _IMP_modeller.IMP_MODELLER_HAS_IMP_SCORE_FUNCTOR_swigconstant(_IMP_modeller)
493 IMP_MODELLER_HAS_IMP_SCORE_FUNCTOR = _IMP_modeller.IMP_MODELLER_HAS_IMP_SCORE_FUNCTOR
495 _IMP_modeller.IMP_MODELLER_HAS_BOOST_FILESYSTEM_swigconstant(_IMP_modeller)
496 IMP_MODELLER_HAS_BOOST_FILESYSTEM = _IMP_modeller.IMP_MODELLER_HAS_BOOST_FILESYSTEM
498 _IMP_modeller.IMP_MODELLER_HAS_BOOST_PROGRAMOPTIONS_swigconstant(_IMP_modeller)
499 IMP_MODELLER_HAS_BOOST_PROGRAMOPTIONS = _IMP_modeller.IMP_MODELLER_HAS_BOOST_PROGRAMOPTIONS
501 _IMP_modeller.IMP_MODELLER_HAS_BOOST_RANDOM_swigconstant(_IMP_modeller)
502 IMP_MODELLER_HAS_BOOST_RANDOM = _IMP_modeller.IMP_MODELLER_HAS_BOOST_RANDOM
504 _IMP_modeller.IMP_MODELLER_HAS_BOOST_SERIALIZATION_swigconstant(_IMP_modeller)
505 IMP_MODELLER_HAS_BOOST_SERIALIZATION = _IMP_modeller.IMP_MODELLER_HAS_BOOST_SERIALIZATION
507 _IMP_modeller.IMP_MODELLER_HAS_BOOST_SYSTEM_swigconstant(_IMP_modeller)
508 IMP_MODELLER_HAS_BOOST_SYSTEM = _IMP_modeller.IMP_MODELLER_HAS_BOOST_SYSTEM
510 _IMP_modeller.IMP_MODELLER_HAS_CGAL_swigconstant(_IMP_modeller)
511 IMP_MODELLER_HAS_CGAL = _IMP_modeller.IMP_MODELLER_HAS_CGAL
513 _IMP_modeller.IMP_MODELLER_HAS_HDF5_swigconstant(_IMP_modeller)
514 IMP_MODELLER_HAS_HDF5 = _IMP_modeller.IMP_MODELLER_HAS_HDF5
516 _IMP_modeller.IMP_MODELLER_HAS_NUMPY_swigconstant(_IMP_modeller)
517 IMP_MODELLER_HAS_NUMPY = _IMP_modeller.IMP_MODELLER_HAS_NUMPY
519 _IMP_modeller.IMP_MODELLER_HAS_PYTHON_IHM_swigconstant(_IMP_modeller)
520 IMP_MODELLER_HAS_PYTHON_IHM = _IMP_modeller.IMP_MODELLER_HAS_PYTHON_IHM
522 _IMP_modeller.IMPMODELLER_SHOW_WARNINGS_swigconstant(_IMP_modeller)
523 IMPMODELLER_SHOW_WARNINGS = _IMP_modeller.IMPMODELLER_SHOW_WARNINGS
534 import modeller.scripts
535 import modeller.optimizers
539 if not hasattr(modeller.terms,
'EnergyTerm'):
540 modeller.terms.EnergyTerm = modeller.terms.energy_term
541 modeller.Selection = modeller.selection
544 class _TempDir(object):
545 """Make a temporary directory that is deleted when the object is."""
548 self.tmpdir = tempfile.mkdtemp()
551 shutil.rmtree(self.tmpdir, ignore_errors=
True)
555 """A Modeller restraint which evaluates an IMP scoring function.
556 This can be used to incorporate IMP Restraints into an existing
557 comparative modeling pipeline, or to use Modeller optimizers or
561 _physical_type = modeller.physical.absposition
563 def __init__(self, particles, scoring_function=None):
565 @param particles A list of the IMP atoms (as Particle objects),
566 same order as the Modeller atoms.
567 @param scoring_function An IMP::ScoringFunction object that will
568 be incorporated into the Modeller score (molpdf).
569 @note since Modeller, unlike IMP, is sensitive to the ordering
570 of atoms, it usually makes sense to create the model in
571 Modeller and then use ModelLoader to load it into IMP,
572 since that will preserve the Modeller atom ordering in IMP.
574 modeller.terms.EnergyTerm.__init__(self)
575 self._particles = particles
577 self._sf = scoring_function
579 self._sf = particles[0].get_model()
581 def eval(self, mdl, deriv, indats):
582 atoms = self.indices_to_atoms(mdl, indats)
583 _copy_modeller_coords_to_imp(atoms, self._particles)
584 if len(self._particles) == 0:
587 score = self._sf.evaluate(deriv)
589 dvx = [0.] * len(indats)
590 dvy = [0.] * len(indats)
591 dvz = [0.] * len(indats)
592 _get_imp_derivs(self._particles, dvx, dvy, dvz)
593 return (score, dvx, dvy, dvz)
599 """An IMP restraint using all defined Modeller restraints.
600 This is useful if you want to use Modeller restraints with an IMP
601 optimizer, or in combination with IMP restraints.
603 @note Currently only the coordinates of the atoms are translated
604 between Modeller and IMP; thus, a Modeller restraint which
605 uses any other attribute (e.g. charge) will not react if
606 this attribute is changed by IMP.
609 def __init__(self, model, modeller_model, particles):
611 @param model The IMP Model object.
612 @param modeller_model The Modeller model object.
613 @param particles A list of the IMP atoms (as Particle objects),
614 in the same order as the Modeller atoms.
615 @note since Modeller, unlike IMP, is sensitive to the ordering
616 of atoms, it usually makes sense to create the model in
617 Modeller and then use ModelLoader to load it into IMP,
618 since that will preserve the Modeller atom ordering in IMP.
621 if hasattr(x,
'get_particle'):
622 return x.get_particle()
625 IMP.Restraint.__init__(self, model,
"ModellerRestraints %1%")
626 self._modeller_model = modeller_model
627 self._particles = [get_particle(x)
for x
in particles]
630 atoms = self._modeller_model.atoms
631 sel = modeller.Selection(self._modeller_model)
632 _copy_imp_coords_to_modeller(self._particles, atoms)
633 energies = sel.energy()
635 _add_modeller_derivs_to_imp(atoms, self._particles, accum)
641 def do_show(self, fh):
642 fh.write(
"ModellerRestraints")
644 return self._particles
647 def _copy_imp_coords_to_modeller(particles, atoms):
648 """Copy atom coordinates from IMP to Modeller"""
652 for (num, at)
in enumerate(atoms):
653 at.x = particles[num].get_value(xkey)
654 at.y = particles[num].get_value(ykey)
655 at.z = particles[num].get_value(zkey)
658 def _copy_modeller_coords_to_imp(atoms, particles):
659 """Copy atom coordinates from Modeller to IMP"""
663 for (num, at)
in enumerate(atoms):
664 particles[num].set_value(xkey, at.x)
665 particles[num].set_value(ykey, at.y)
666 particles[num].set_value(zkey, at.z)
669 def _add_modeller_derivs_to_imp(atoms, particles, accum):
670 """Add atom derivatives from Modeller to IMP"""
671 for (num, at)
in enumerate(atoms):
673 xyz.add_to_derivative(0, at.dvx, accum)
674 xyz.add_to_derivative(1, at.dvy, accum)
675 xyz.add_to_derivative(2, at.dvz, accum)
678 def _get_imp_derivs(particles, dvx, dvy, dvz):
679 """Move atom derivatives from IMP to Modeller"""
683 for idx
in range(0, len(dvx)):
684 dvx[idx] = particles[idx].get_derivative(xkey)
685 dvy[idx] = particles[idx].get_derivative(ykey)
686 dvz[idx] = particles[idx].get_derivative(zkey)
690 def _HarmonicLowerBoundGenerator(parameters, modalities):
691 (mean, stdev) = parameters
695 def _HarmonicUpperBoundGenerator(parameters, modalities):
696 (mean, stdev) = parameters
700 def _HarmonicGenerator(parameters, modalities):
701 (mean, stdev) = parameters
705 def _CosineGenerator(parameters, modalities):
706 (phase, force_constant) = parameters
707 (periodicity,) = modalities
710 def _LinearGenerator(parameters, modalities):
711 (scale,) = parameters
714 def _SplineGenerator(parameters, modalities):
715 (open, low, high, delta, lowderiv, highderiv) = parameters[:6]
717 for v
in parameters[6:]:
725 _unary_func_generators = {
726 1: _HarmonicLowerBoundGenerator,
727 2: _HarmonicUpperBoundGenerator,
728 3: _HarmonicGenerator,
731 10: _SplineGenerator,
735 def _DistanceRestraintGenerator(form, modalities, atoms, parameters):
736 unary_func_gen = _unary_func_generators[form]
738 unary_func_gen(parameters, modalities),
741 def _AngleRestraintGenerator(form, modalities, atoms, parameters):
742 unary_func_gen = _unary_func_generators[form]
744 unary_func_gen(parameters, modalities),
745 atoms[0], atoms[1], atoms[2])
747 def _MultiBinormalGenerator(form, modalities, atoms, parameters):
748 nterms = modalities[0]
749 if len(parameters) != nterms * 6:
750 raise ValueError(
"Incorrect number of parameters (%d) for multiple "
751 "binormal restraint - expecting %d (%d terms * 6)" \
752 % (len(parameters), nterms * 6, nterms))
754 atoms[:4], atoms[4:8])
755 for i
in range(nterms):
757 t.set_weight(parameters[i])
758 t.set_means((parameters[nterms + i * 2],
759 parameters[nterms + i * 2 + 1]))
760 t.set_standard_deviations((parameters[nterms * 3 + i * 2],
761 parameters[nterms * 3 + i * 2 + 1]))
762 t.set_correlation(parameters[nterms * 5 + i])
766 def _DihedralRestraintGenerator(form, modalities, atoms, parameters):
768 return _MultiBinormalGenerator(form, modalities, atoms, parameters)
769 unary_func_gen = _unary_func_generators[form]
771 unary_func_gen(parameters, modalities),
772 atoms[0], atoms[1], atoms[2], atoms[3])
774 def _get_protein_atom_particles(protein):
775 """Given a protein particle, get the flattened list of all child atoms"""
777 for ichain
in range(protein.get_number_of_children()):
778 chain = protein.get_child(ichain)
779 for ires
in range(chain.get_number_of_children()):
780 residue = chain.get_child(ires)
781 for iatom
in range(residue.get_number_of_children()):
782 atom = residue.get_child(iatom)
783 atom_particles.append(atom.get_particle())
784 return atom_particles
786 def _load_restraints_line(line, atom_particles):
787 """Parse a single Modeller restraints file line and return the
788 corresponding IMP restraint."""
791 if typ ==
'MODELLER5':
794 raise NotImplementedError(
"Only 'R' lines currently read from " + \
795 "Modeller restraints files")
796 form = int(spl.pop(0))
797 modalities = [int(spl.pop(0))]
798 features = [int(spl.pop(0))]
801 natoms = [int(spl.pop(0))]
802 nparam = int(spl.pop(0))
803 nfeat = int(spl.pop(0))
804 for i
in range(nfeat - 1):
805 modalities.append(int(spl.pop(0)))
806 features.append(int(spl.pop(0)))
807 natoms.append(int(spl.pop(0)))
808 atoms = [int(spl.pop(0))
for x
in range(natoms[0])]
809 for i
in range(len(atoms)):
810 atoms[i] = atom_particles[atoms[i] - 1]
811 parameters = [float(spl.pop(0))
for x
in range(nparam)]
812 restraint_generators = {
813 1 : _DistanceRestraintGenerator,
814 2 : _AngleRestraintGenerator,
815 3 : _DihedralRestraintGenerator,
816 4 : _DihedralRestraintGenerator,
818 restraint_gen = restraint_generators[features[0]]
819 return restraint_gen(form, modalities, atoms, parameters)
822 def _load_entire_restraints_file(filename, protein):
823 """Yield a set of IMP restraints from a Modeller restraints file."""
824 atoms = _get_protein_atom_particles(protein)
825 with open(filename,
'r') as fh:
828 rsr = _load_restraints_line(line, atoms)
831 except Exception
as err:
832 print(
"Cannot read restraints file line:\n" + line)
836 def _copy_residue(r, model):
837 """Copy residue information from modeller to imp"""
842 p.set_name(str(
"residue "+r.num));
846 def _copy_atom(a, model):
847 """Copy atom information from modeller"""
853 if hasattr(a,
'charge'):
855 if hasattr(a,
'type'):
857 ap.set_input_index(a.index)
860 def _copy_chain(c, model):
861 """Copy chain information from modeller"""
868 def _get_forcefield(submodel):
880 """Add radii to the hierarchy using the Modeller radius library, radii.lib.
881 Each radius is scaled by the given scale (Modeller usually scales radii
882 by a factor of 0.82). submodel specifies the topology submodel, which is
883 the column in radii.lib to use."""
887 with open(filename)
as fh:
889 if line.startswith(
'#'):
continue
892 radii[spl[0]] = float(spl[submodel])
893 atoms = IMP.atom.get_by_type(hierarchy, IMP.atom.ATOM_TYPE)
898 radius = radii[ct] * scale
906 """Read a Modeller model into IMP. After creating this object, the atoms
907 in the Modeller model can be loaded into IMP using the load_atoms()
908 method, then optionally any Modeller static restraints can be read in
909 with load_static_restraints() or load_static_restraints_file().
911 This class can also be used to read Modeller alignment structures;
912 however, only load_atoms() will be useful in such a case (since
913 alignment structures don't have restraints or other information).
919 @param modeller_model The Modeller model or alignment structure
922 self._modeller_model = modeller_model
925 """Construct an IMP::atom::Hierarchy that contains the same atoms as
926 the Modeller model or alignment structure.
928 IMP atoms created from a Modeller model will be given charges and
929 CHARMM types, extracted from the model. Alignment structures don't
930 contain this information, so the IMP atoms won't either.
932 @param model The IMP::Model object in which the hierarchy will be
933 created. The highest level hierarchy node is a PROTEIN.
934 @return the newly-created root IMP::atom::Hierarchy.
939 for chain
in self._modeller_model.chains:
944 for residue
in chain.residues:
945 rp = _copy_residue(residue, model)
948 for atom
in residue.atoms:
949 ap = _copy_atom(atom, model)
952 self._atoms[atom.index] = ap
954 self._modeller_hierarchy = hpp
957 def _get_nonbonded_list(self, atoms, pair_filter, edat, distance):
962 if pair_filter
is None:
964 if edat.excl_local[0]:
965 pair_filter.set_bonds(list(self.
load_bonds()))
966 if edat.excl_local[1]:
968 if edat.excl_local[2]:
970 nbl.add_pair_filter(pair_filter)
974 """Load the Modeller bond topology into the IMP model. Each bond is
975 represented in IMP as an IMP::atom::Bond, with no defined length
976 or stiffness. These bonds are primarily useful as input to
977 IMP::atom::StereochemistryPairFilter, to exclude bond interactions
978 from the nonbonded list. Typically the contribution to the scoring
979 function from the bonds is included in the Modeller static restraints
980 (use load_static_restraints() or load_static_restraints_file() to
981 load these). If you want to regenerate the stereochemistry in IMP,
982 do not use these functions (as then stereochemistry scoring terms
983 and exclusions would be double-counted) and instead use the
984 IMP::atom::CHARMMTopology class.
986 You must call load_atoms() prior to using this function.
987 @see load_angles(), load_dihedrals(), load_impropers()
988 @return A generator listing all of the bonds.
990 if not hasattr(self,
'_modeller_hierarchy'):
991 raise ValueError(
"Call load_atoms() first.")
992 for (maa, mab)
in self._modeller_model.bonds:
993 pa = self._atoms[maa.index]
994 pb = self._atoms[mab.index]
1004 IMP.atom.Bond.SINGLE).get_particle()
1007 """Load the Modeller angle topology into the IMP model.
1008 See load_bonds() for more details."""
1009 return self._internal_load_angles(self._modeller_model.angles,
1013 """Load the Modeller dihedral topology into the IMP model.
1014 See load_bonds() for more details."""
1015 return self._internal_load_angles(self._modeller_model.dihedrals,
1019 """Load the Modeller improper topology into the IMP model.
1020 See load_bonds() for more details."""
1021 return self._internal_load_angles(self._modeller_model.impropers,
1024 def _internal_load_angles(self, angles, angle_class):
1025 if not hasattr(self,
'_modeller_hierarchy'):
1026 raise ValueError(
"Call load_atoms() first.")
1027 for modeller_atoms
in angles:
1028 imp_particles = [self._atoms[x.index]
for x
in modeller_atoms]
1030 a = angle_class.setup_particle(p,
1032 yield a.get_particle()
1035 """Convert a Modeller static restraints file into equivalent
1036 IMP::Restraints. load_atoms() must have been called first to read
1037 in the atoms that the restraints will act upon.
1038 @param filename Name of the Modeller restraints file. The restraints
1039 in this file are assumed to act upon the model read in by
1040 load_atoms(); no checking is done to enforce this.
1041 @return A Python generator of the newly-created IMP::Restraint
1044 if not hasattr(self,
'_modeller_hierarchy'):
1045 raise ValueError(
"Call load_atoms() first.")
1046 return _load_entire_restraints_file(filename, self._modeller_hierarchy)
1050 """Convert the current set of Modeller static restraints into equivalent
1051 IMP::Restraints. load_atoms() must have been called first to read
1052 in the atoms that the restraints will act upon.
1053 @return A Python generator of the newly-created IMP::Restraint
1056 class _RestraintGenerator(object):
1057 """Simple generator wrapper"""
1060 def __iter__(self, *args, **keys):
1062 def close(self, *args, **keys):
1063 return self._gen.close(*args, **keys)
1065 return next(self._gen)
1067 def send(self, *args, **keys):
1068 return self._gen.send(*args, **keys)
1069 def throw(self, *args, **keys):
1070 return self._gen.throw(*args, **keys)
1073 rsrfile = os.path.join(t.tmpdir,
'restraints.rsr')
1074 self._modeller_model.restraints.write(file=rsrfile)
1077 wrap = _RestraintGenerator(gen)
1083 """Convert Modeller dynamic restraints into IMP::Restraint objects.
1085 For each currently active Modeller dynamic restraint
1086 (e.g. soft-sphere, electrostatics) an equivalent IMP::Restraint
1088 load_atoms() must have been called first to read
1089 in the atoms that the restraints will act upon.
1091 If pair_filter is given, it is an IMP::PairFilter object to exclude
1092 pairs from the nonbonded lists used by the dynamic restraints.
1093 Otherwise, an IMP::atom::StereochemistryPairFilter object is created
1094 to exclude Modeller bonds, angles and dihedrals, as specified by
1095 edat.excl_local. (Note that this calls load_bonds(), load_angles()
1096 and load_dihedrals(), so will create duplicate lists of bonds if
1097 those methods are called manually as well.)
1099 @note Currently only soft-sphere, electrostatic and Lennard-Jones
1100 restraints are loaded.
1101 @return A Python generator of the newly-created IMP::Restraint
1104 if not hasattr(self,
'_modeller_hierarchy'):
1105 raise ValueError(
"Call load_atoms() first.")
1106 edat = self._modeller_model.env.edat
1107 libs = self._modeller_model.env.libs
1109 m = atoms[0].get_model()
1112 if edat.dynamic_sphere:
1115 nbl = self._get_nonbonded_list(atoms, pair_filter, edat, 0.)
1118 libs.topology.submodel, edat.radii_factor)
1125 if edat.dynamic_lennard
or edat.dynamic_coulomb:
1127 d = max(edat.contact_shell - 3.0, 0.0)
1128 nbl = self._get_nonbonded_list(atoms, pair_filter, edat, d)
1129 ff = _get_forcefield(libs.topology.submodel)
1130 ff.add_radii(self._modeller_hierarchy)
1132 if edat.dynamic_lennard:
1133 ff.add_well_depths(self._modeller_hierarchy)
1135 edat.lennard_jones_switch[1])
1139 if edat.dynamic_coulomb:
1141 edat.coulomb_switch[1])
1143 ps.set_relative_dielectric(edat.relative_dielectric)
1149 """get_module_version() -> std::string const"""
1150 return _IMP_modeller.get_module_version()
1153 """get_example_path(std::string fname) -> std::string"""
1154 return _IMP_modeller.get_example_path(fname)
1157 """get_data_path(std::string fname) -> std::string"""
1158 return _IMP_modeller.get_data_path(fname)
1160 from .
import _version_check
static CHARMMAtom setup_particle(Model *m, ParticleIndex pi, String charmm_type)
Create a decorator with the passed CHARMM type.
static Charged setup_particle(Model *m, ParticleIndex pi, Float charge)
Lower bound harmonic function (non-zero when feature < mean)
def load_static_restraints
Convert the current set of Modeller static restraints into equivalent IMP::Restraints.
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
def load_bonds
Load the Modeller bond topology into the IMP model.
A Modeller restraint which evaluates an IMP scoring function.
Coulomb (electrostatic) score between a pair of particles.
static Atom setup_particle(Model *m, ParticleIndex pi, Atom other)
Various classes to hold sets of particles.
Upper bound harmonic function (non-zero when feature > mean)
static XYZR setup_particle(Model *m, ParticleIndex pi)
A decorator for a particle which has bonds.
def load_impropers
Load the Modeller improper topology into the IMP model.
Make CGAL functionality available to IMP.
virtual double unprotected_evaluate(DerivativeAccumulator *da) const
Return the unweighted score for the restraint.
std::string get_module_version()
Return the version of this module, as a string.
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.
Dihedral restraint between four particles.
def load_static_restraints_file
Convert a Modeller static restraints file into equivalent IMP::Restraints.
A score on the distance between the surfaces of two spheres.
Return all close unordered pairs of particles taken from the SingletonContainer.
static Residue setup_particle(Model *m, ParticleIndex pi, ResidueType t, int index, int insertion_code)
A single binormal term in a MultipleBinormalRestraint.
def load_dynamic_restraints
Convert Modeller dynamic restraints into IMP::Restraint objects.
Distance restraint between two particles.
static XYZ setup_particle(Model *m, ParticleIndex pi)
Composable functors to implement scores via compile-time composition.
An IMP restraint using all defined Modeller restraints.
static bool get_is_setup(const IMP::ParticleAdaptor &p)
CHARMM force field parameters.
Bond create_bond(Bonded a, Bonded b, Bond o)
Connect the two wrapped particles by a custom bond.
def load_dihedrals
Load the Modeller dihedral topology into the IMP model.
static Float get_k_from_standard_deviation(Float sd, Float t=297.15)
Return the k to use for a given Gaussian standard deviation.
Angle restraint between three particles.
static Hierarchy setup_particle(Model *m, ParticleIndex pi, ParticleIndexesAdaptor children=ParticleIndexesAdaptor())
Create a Hierarchy of level t by adding the needed attributes.
ParticleIndexPairs get_indexes(const ParticlePairsTemp &ps)
Get the indexes from a list of particle pairs.
Lennard-Jones score between a pair of particles.
A particle that describes an angle between three particles.
The standard decorator for manipulating molecular structures.
Store a list of ParticleIndexes.
static Bonded setup_particle(Model *m, ParticleIndex pi)
def load_atoms
Construct an IMP::atom::Hierarchy that contains the same atoms as the Modeller model or alignment str...
Version and module information for Objects.
A decorator for a particle with x,y,z coordinates.
Modeller-style multiple binormal (phi/psi) restraint.
def add_soft_sphere_radii
Add radii to the hierarchy using the Modeller radius library, radii.lib.
A particle that describes a dihedral angle between four particles.
def load_angles
Load the Modeller angle topology into the IMP model.
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...
static bool get_is_setup(const IMP::ParticleAdaptor &p)
virtual VersionInfo get_version_info() const
Get information about the module and version of the object.
A filter that excludes bonds, angles and dihedrals.
Read a Modeller model into IMP.
Class to handle individual particles of a Model object.
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.
Smooth interaction scores by switching the derivatives (force switch).
Output IMP model data in various file formats.
Functionality for loading, creating, manipulating and scoring atomic structures.
static Chain setup_particle(Model *m, ParticleIndex pi, std::string id)
Hierarchies get_leaves(const Selection &h)
Applies a PairScore to each Pair in a list.
virtual ModelObjectsTemp do_get_inputs() const =0
Closed cubic spline function.
A decorator for an atom that has a defined CHARMM type.
A restraint is a term in an IMP ScoringFunction.
Harmonic function (symmetric about the mean)
A decorator for a particle with x,y,z coordinates and a radius.