11 from __future__
import print_function, division, absolute_import
15 from sys
import version_info
as _swig_python_version_info
19 import builtins
as __builtin__
25 strthis =
"proxy of " + self.this.__repr__()
26 except __builtin__.Exception:
28 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
31 def _swig_setattr_nondynamic_instance_variable(set):
32 def set_instance_attr(self, name, value):
34 set(self, name, value)
35 elif name ==
"thisown":
37 elif hasattr(self, name)
and isinstance(getattr(type(self), name), property):
38 set(self, name, value)
40 raise AttributeError(
"You cannot add instance attributes to %s" % self)
41 return set_instance_attr
44 def _swig_setattr_nondynamic_class_variable(set):
45 def set_class_attr(cls, name, value):
46 if hasattr(cls, name)
and not isinstance(getattr(cls, name), property):
49 raise AttributeError(
"You cannot add class attributes to %s" % cls)
53 def _swig_add_metaclass(metaclass):
54 """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
56 return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
60 class _SwigNonDynamicMeta(type):
61 """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
62 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
67 class IMP_EM_SwigPyIterator(object):
68 r"""Proxy of C++ swig::IMP_EM_SwigPyIterator class."""
70 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
72 def __init__(self, *args, **kwargs):
73 raise AttributeError(
"No constructor defined - class is abstract")
75 __swig_destroy__ = _IMP_em.delete_IMP_EM_SwigPyIterator
78 r"""value(IMP_EM_SwigPyIterator self) -> PyObject *"""
79 return _IMP_em.IMP_EM_SwigPyIterator_value(self)
82 r"""incr(IMP_EM_SwigPyIterator self, size_t n=1) -> IMP_EM_SwigPyIterator"""
83 return _IMP_em.IMP_EM_SwigPyIterator_incr(self, n)
86 r"""decr(IMP_EM_SwigPyIterator self, size_t n=1) -> IMP_EM_SwigPyIterator"""
87 return _IMP_em.IMP_EM_SwigPyIterator_decr(self, n)
89 def distance(self, x):
90 r"""distance(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> ptrdiff_t"""
91 return _IMP_em.IMP_EM_SwigPyIterator_distance(self, x)
94 r"""equal(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> bool"""
95 return _IMP_em.IMP_EM_SwigPyIterator_equal(self, x)
98 r"""copy(IMP_EM_SwigPyIterator self) -> IMP_EM_SwigPyIterator"""
99 return _IMP_em.IMP_EM_SwigPyIterator_copy(self)
102 r"""next(IMP_EM_SwigPyIterator self) -> PyObject *"""
103 return _IMP_em.IMP_EM_SwigPyIterator_next(self)
106 r"""__next__(IMP_EM_SwigPyIterator self) -> PyObject *"""
107 return _IMP_em.IMP_EM_SwigPyIterator___next__(self)
110 r"""previous(IMP_EM_SwigPyIterator self) -> PyObject *"""
111 return _IMP_em.IMP_EM_SwigPyIterator_previous(self)
113 def advance(self, n):
114 r"""advance(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator"""
115 return _IMP_em.IMP_EM_SwigPyIterator_advance(self, n)
118 r"""__eq__(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> bool"""
119 return _IMP_em.IMP_EM_SwigPyIterator___eq__(self, x)
122 r"""__ne__(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> bool"""
123 return _IMP_em.IMP_EM_SwigPyIterator___ne__(self, x)
125 def __iadd__(self, n):
126 r"""__iadd__(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator"""
127 return _IMP_em.IMP_EM_SwigPyIterator___iadd__(self, n)
129 def __isub__(self, n):
130 r"""__isub__(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator"""
131 return _IMP_em.IMP_EM_SwigPyIterator___isub__(self, n)
133 def __add__(self, n):
134 r"""__add__(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator"""
135 return _IMP_em.IMP_EM_SwigPyIterator___add__(self, n)
137 def __sub__(self, *args):
139 __sub__(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator
140 __sub__(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> ptrdiff_t
142 return _IMP_em.IMP_EM_SwigPyIterator___sub__(self, *args)
147 _IMP_em.IMP_EM_SwigPyIterator_swigregister(IMP_EM_SwigPyIterator)
154 IMP_DEBUG = _IMP_em.IMP_DEBUG
156 IMP_RELEASE = _IMP_em.IMP_RELEASE
158 IMP_SILENT = _IMP_em.IMP_SILENT
160 IMP_PROGRESS = _IMP_em.IMP_PROGRESS
162 IMP_TERSE = _IMP_em.IMP_TERSE
164 IMP_VERBOSE = _IMP_em.IMP_VERBOSE
166 IMP_MEMORY = _IMP_em.IMP_MEMORY
168 IMP_NONE = _IMP_em.IMP_NONE
170 IMP_USAGE = _IMP_em.IMP_USAGE
172 IMP_INTERNAL = _IMP_em.IMP_INTERNAL
174 IMP_KERNEL_HAS_LOG4CXX = _IMP_em.IMP_KERNEL_HAS_LOG4CXX
176 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_em.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
178 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_em.IMP_COMPILER_HAS_DEBUG_VECTOR
180 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_em.IMP_COMPILER_HAS_RANDOM_SHUFFLE
182 IMP_COMPILER_HAS_THREE_WAY = _IMP_em.IMP_COMPILER_HAS_THREE_WAY
184 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_em.IMP_KERNEL_HAS_BOOST_RANDOM
186 IMP_KERNEL_HAS_NUMPY = _IMP_em.IMP_KERNEL_HAS_NUMPY
188 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_em.IMP_KERNEL_HAS_GPERFTOOLS
190 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_em.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
192 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_em.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
194 IMPKERNEL_SHOW_WARNINGS = _IMP_em.IMPKERNEL_SHOW_WARNINGS
198 class _DirectorObjects(object):
199 """@internal Simple class to keep references to director objects
200 to prevent premature deletion."""
203 def register(self, obj):
204 """Take a reference to a director object; will only work for
205 refcounted C++ classes"""
206 if hasattr(obj,
'get_ref_count'):
207 self._objects.append(obj)
209 """Only drop our reference and allow cleanup by Python if no other
210 Python references exist (we hold 3 references: one in self._objects,
211 one in x, and one in the argument list for getrefcount) *and* no
212 other C++ references exist (the Python object always holds one)"""
213 objs = [x
for x
in self._objects
if sys.getrefcount(x) > 3 \
214 or x.get_ref_count() > 1]
218 def get_object_count(self):
219 """Get number of director objects (useful for testing only)"""
220 return len(self._objects)
221 _director_objects = _DirectorObjects()
223 class _ostream(object):
224 r"""Proxy of C++ std::ostream class."""
226 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
228 def __init__(self, *args, **kwargs):
229 raise AttributeError(
"No constructor defined")
230 __repr__ = _swig_repr
232 def write(self, osa_buf):
233 r"""write(_ostream self, char const * osa_buf)"""
234 return _IMP_em._ostream_write(self, osa_buf)
237 _IMP_em._ostream_swigregister(_ostream)
238 IMP_C_OPEN_BINARY = _IMP_em.IMP_C_OPEN_BINARY
241 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_CGAL_HAS_BOOST_FILESYSTEM
243 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
245 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_em.IMP_CGAL_HAS_BOOST_RANDOM
247 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_em.IMP_CGAL_HAS_BOOST_SYSTEM
249 IMP_CGAL_HAS_NUMPY = _IMP_em.IMP_CGAL_HAS_NUMPY
251 IMPCGAL_SHOW_WARNINGS = _IMP_em.IMPCGAL_SHOW_WARNINGS
254 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_em.IMP_ALGEBRA_HAS_IMP_CGAL
256 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
258 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
260 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_em.IMP_ALGEBRA_HAS_BOOST_RANDOM
262 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_em.IMP_ALGEBRA_HAS_BOOST_SYSTEM
264 IMP_ALGEBRA_HAS_CGAL = _IMP_em.IMP_ALGEBRA_HAS_CGAL
266 IMP_ALGEBRA_HAS_NUMPY = _IMP_em.IMP_ALGEBRA_HAS_NUMPY
268 IMP_ALGEBRA_HAS_ANN = _IMP_em.IMP_ALGEBRA_HAS_ANN
270 IMPALGEBRA_SHOW_WARNINGS = _IMP_em.IMPALGEBRA_SHOW_WARNINGS
273 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_em.IMP_DISPLAY_HAS_IMP_CGAL
275 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
277 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
279 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_em.IMP_DISPLAY_HAS_BOOST_RANDOM
281 IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_em.IMP_DISPLAY_HAS_BOOST_SYSTEM
283 IMP_DISPLAY_HAS_CGAL = _IMP_em.IMP_DISPLAY_HAS_CGAL
285 IMP_DISPLAY_HAS_NUMPY = _IMP_em.IMP_DISPLAY_HAS_NUMPY
287 IMPDISPLAY_SHOW_WARNINGS = _IMP_em.IMPDISPLAY_SHOW_WARNINGS
290 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_em.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
292 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
294 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
296 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_em.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
298 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_em.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
300 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_em.IMP_SCORE_FUNCTOR_HAS_CGAL
302 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_em.IMP_SCORE_FUNCTOR_HAS_HDF5
304 IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_em.IMP_SCORE_FUNCTOR_HAS_NUMPY
306 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_em.IMPSCOREFUNCTOR_SHOW_WARNINGS
309 IMP_STATISTICS_HAS_IMP_CGAL = _IMP_em.IMP_STATISTICS_HAS_IMP_CGAL
311 IMP_STATISTICS_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_STATISTICS_HAS_BOOST_FILESYSTEM
313 IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS
315 IMP_STATISTICS_HAS_BOOST_RANDOM = _IMP_em.IMP_STATISTICS_HAS_BOOST_RANDOM
317 IMP_STATISTICS_HAS_BOOST_SYSTEM = _IMP_em.IMP_STATISTICS_HAS_BOOST_SYSTEM
319 IMP_STATISTICS_HAS_CGAL = _IMP_em.IMP_STATISTICS_HAS_CGAL
321 IMP_STATISTICS_HAS_NUMPY = _IMP_em.IMP_STATISTICS_HAS_NUMPY
323 IMPSTATISTICS_SHOW_WARNINGS = _IMP_em.IMPSTATISTICS_SHOW_WARNINGS
326 IMP_CORE_HAS_IMP_CGAL = _IMP_em.IMP_CORE_HAS_IMP_CGAL
328 IMP_CORE_HAS_IMP_KERNEL = _IMP_em.IMP_CORE_HAS_IMP_KERNEL
330 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_CORE_HAS_BOOST_FILESYSTEM
332 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
334 IMP_CORE_HAS_BOOST_RANDOM = _IMP_em.IMP_CORE_HAS_BOOST_RANDOM
336 IMP_CORE_HAS_BOOST_SYSTEM = _IMP_em.IMP_CORE_HAS_BOOST_SYSTEM
338 IMP_CORE_HAS_CGAL = _IMP_em.IMP_CORE_HAS_CGAL
340 IMP_CORE_HAS_HDF5 = _IMP_em.IMP_CORE_HAS_HDF5
342 IMP_CORE_HAS_NUMPY = _IMP_em.IMP_CORE_HAS_NUMPY
344 IMPCORE_SHOW_WARNINGS = _IMP_em.IMPCORE_SHOW_WARNINGS
347 IMP_CONTAINER_HAS_IMP_ALGEBRA = _IMP_em.IMP_CONTAINER_HAS_IMP_ALGEBRA
349 IMP_CONTAINER_HAS_IMP_CGAL = _IMP_em.IMP_CONTAINER_HAS_IMP_CGAL
351 IMP_CONTAINER_HAS_IMP_DISPLAY = _IMP_em.IMP_CONTAINER_HAS_IMP_DISPLAY
353 IMP_CONTAINER_HAS_IMP_KERNEL = _IMP_em.IMP_CONTAINER_HAS_IMP_KERNEL
355 IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_em.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR
357 IMP_CONTAINER_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_CONTAINER_HAS_BOOST_FILESYSTEM
359 IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS
361 IMP_CONTAINER_HAS_BOOST_RANDOM = _IMP_em.IMP_CONTAINER_HAS_BOOST_RANDOM
363 IMP_CONTAINER_HAS_BOOST_SYSTEM = _IMP_em.IMP_CONTAINER_HAS_BOOST_SYSTEM
365 IMP_CONTAINER_HAS_CGAL = _IMP_em.IMP_CONTAINER_HAS_CGAL
367 IMP_CONTAINER_HAS_HDF5 = _IMP_em.IMP_CONTAINER_HAS_HDF5
369 IMP_CONTAINER_HAS_NUMPY = _IMP_em.IMP_CONTAINER_HAS_NUMPY
371 IMP_CONTAINER_HAS_PYTHON_IHM = _IMP_em.IMP_CONTAINER_HAS_PYTHON_IHM
373 IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_em.IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP
375 IMP_CONTAINER_HAS_ROBIN_MAP = _IMP_em.IMP_CONTAINER_HAS_ROBIN_MAP
377 IMPCONTAINER_SHOW_WARNINGS = _IMP_em.IMPCONTAINER_SHOW_WARNINGS
380 IMP_ATOM_HAS_IMP_CGAL = _IMP_em.IMP_ATOM_HAS_IMP_CGAL
382 IMP_ATOM_HAS_IMP_KERNEL = _IMP_em.IMP_ATOM_HAS_IMP_KERNEL
384 IMP_ATOM_HAS_IMP_SCORE_FUNCTOR = _IMP_em.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR
386 IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS
388 IMP_ATOM_HAS_BOOST_RANDOM = _IMP_em.IMP_ATOM_HAS_BOOST_RANDOM
390 IMP_ATOM_HAS_BOOST_REGEX = _IMP_em.IMP_ATOM_HAS_BOOST_REGEX
392 IMP_ATOM_HAS_BOOST_SYSTEM = _IMP_em.IMP_ATOM_HAS_BOOST_SYSTEM
394 IMP_ATOM_HAS_CGAL = _IMP_em.IMP_ATOM_HAS_CGAL
396 IMP_ATOM_HAS_HDF5 = _IMP_em.IMP_ATOM_HAS_HDF5
398 IMP_ATOM_HAS_NUMPY = _IMP_em.IMP_ATOM_HAS_NUMPY
400 IMP_ATOM_HAS_PYTHON_IHM = _IMP_em.IMP_ATOM_HAS_PYTHON_IHM
402 IMPATOM_SHOW_WARNINGS = _IMP_em.IMPATOM_SHOW_WARNINGS
404 IMP_ATOM_TYPE_INDEX = _IMP_em.IMP_ATOM_TYPE_INDEX
406 IMP_RESIDUE_TYPE_INDEX = _IMP_em.IMP_RESIDUE_TYPE_INDEX
408 IMP_HIERARCHY_TYPE_INDEX = _IMP_em.IMP_HIERARCHY_TYPE_INDEX
410 IMP_CHAIN_TYPE_INDEX = _IMP_em.IMP_CHAIN_TYPE_INDEX
413 IMP_EM_HAS_IMP_CGAL = _IMP_em.IMP_EM_HAS_IMP_CGAL
415 IMP_EM_HAS_IMP_CONTAINER = _IMP_em.IMP_EM_HAS_IMP_CONTAINER
417 IMP_EM_HAS_IMP_DISPLAY = _IMP_em.IMP_EM_HAS_IMP_DISPLAY
419 IMP_EM_HAS_IMP_SCORE_FUNCTOR = _IMP_em.IMP_EM_HAS_IMP_SCORE_FUNCTOR
421 IMP_EM_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_EM_HAS_BOOST_FILESYSTEM
423 IMP_EM_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_EM_HAS_BOOST_PROGRAMOPTIONS
425 IMP_EM_HAS_BOOST_RANDOM = _IMP_em.IMP_EM_HAS_BOOST_RANDOM
427 IMP_EM_HAS_BOOST_REGEX = _IMP_em.IMP_EM_HAS_BOOST_REGEX
429 IMP_EM_HAS_BOOST_SYSTEM = _IMP_em.IMP_EM_HAS_BOOST_SYSTEM
431 IMP_EM_HAS_CGAL = _IMP_em.IMP_EM_HAS_CGAL
433 IMP_EM_HAS_HDF5 = _IMP_em.IMP_EM_HAS_HDF5
435 IMP_EM_HAS_NUMPY = _IMP_em.IMP_EM_HAS_NUMPY
437 IMP_EM_HAS_PYTHON_IHM = _IMP_em.IMP_EM_HAS_PYTHON_IHM
439 IMPEM_SHOW_WARNINGS = _IMP_em.IMPEM_SHOW_WARNINGS
442 _object_types.append(
"DensityMap")
445 def _object_cast_to_DensityMap(o):
446 r"""_object_cast_to_DensityMap(Object o) -> DensityMap"""
447 return _IMP_em._object_cast_to_DensityMap(o)
449 _object_types.append(
"SampledDensityMap")
452 def _object_cast_to_SampledDensityMap(o):
453 r"""_object_cast_to_SampledDensityMap(Object o) -> SampledDensityMap"""
454 return _IMP_em._object_cast_to_SampledDensityMap(o)
456 _object_types.append(
"SurfaceShellDensityMap")
459 def _object_cast_to_SurfaceShellDensityMap(o):
460 r"""_object_cast_to_SurfaceShellDensityMap(Object o) -> SurfaceShellDensityMap"""
461 return _IMP_em._object_cast_to_SurfaceShellDensityMap(o)
463 _object_types.append(
"FitRestraint")
466 def _object_cast_to_FitRestraint(o):
467 r"""_object_cast_to_FitRestraint(Object o) -> FitRestraint"""
468 return _IMP_em._object_cast_to_FitRestraint(o)
470 _object_types.append(
"FitRestraintBayesEM3D")
473 def _object_cast_to_FitRestraintBayesEM3D(o):
474 r"""_object_cast_to_FitRestraintBayesEM3D(Object o) -> FitRestraintBayesEM3D"""
475 return _IMP_em._object_cast_to_FitRestraintBayesEM3D(o)
477 _object_types.append(
"PCAFitRestraint")
480 def _object_cast_to_PCAFitRestraint(o):
481 r"""_object_cast_to_PCAFitRestraint(Object o) -> PCAFitRestraint"""
482 return _IMP_em._object_cast_to_PCAFitRestraint(o)
484 _object_types.append(
"EnvelopePenetrationRestraint")
487 def _object_cast_to_EnvelopePenetrationRestraint(o):
488 r"""_object_cast_to_EnvelopePenetrationRestraint(Object o) -> EnvelopePenetrationRestraint"""
489 return _IMP_em._object_cast_to_EnvelopePenetrationRestraint(o)
491 _object_types.append(
"EnvelopeFitRestraint")
494 def _object_cast_to_EnvelopeFitRestraint(o):
495 r"""_object_cast_to_EnvelopeFitRestraint(Object o) -> EnvelopeFitRestraint"""
496 return _IMP_em._object_cast_to_EnvelopeFitRestraint(o)
498 KernelParametersList=list
499 _plural_types.append(
"KernelParametersList")
500 _value_types.append(
"KernelParameters")
503 _object_types.append(
"HighDensityEmbedding")
506 def _object_cast_to_HighDensityEmbedding(o):
507 r"""_object_cast_to_HighDensityEmbedding(Object o) -> HighDensityEmbedding"""
508 return _IMP_em._object_cast_to_HighDensityEmbedding(o)
510 _object_types.append(
"MapReaderWriter")
513 def _object_cast_to_MapReaderWriter(o):
514 r"""_object_cast_to_MapReaderWriter(Object o) -> MapReaderWriter"""
515 return _IMP_em._object_cast_to_MapReaderWriter(o)
517 _object_types.append(
"MRCReaderWriter")
520 def _object_cast_to_MRCReaderWriter(o):
521 r"""_object_cast_to_MRCReaderWriter(Object o) -> MRCReaderWriter"""
522 return _IMP_em._object_cast_to_MRCReaderWriter(o)
524 _object_types.append(
"SpiderMapReaderWriter")
527 def _object_cast_to_SpiderMapReaderWriter(o):
528 r"""_object_cast_to_SpiderMapReaderWriter(Object o) -> SpiderMapReaderWriter"""
529 return _IMP_em._object_cast_to_SpiderMapReaderWriter(o)
531 _object_types.append(
"EMReaderWriter")
534 def _object_cast_to_EMReaderWriter(o):
535 r"""_object_cast_to_EMReaderWriter(Object o) -> EMReaderWriter"""
536 return _IMP_em._object_cast_to_EMReaderWriter(o)
538 _object_types.append(
"XplorReaderWriter")
541 def _object_cast_to_XplorReaderWriter(o):
542 r"""_object_cast_to_XplorReaderWriter(Object o) -> XplorReaderWriter"""
543 return _IMP_em._object_cast_to_XplorReaderWriter(o)
545 _object_types.append(
"CoarseCCatIntervals")
548 def _object_cast_to_CoarseCCatIntervals(o):
549 r"""_object_cast_to_CoarseCCatIntervals(Object o) -> CoarseCCatIntervals"""
550 return _IMP_em._object_cast_to_CoarseCCatIntervals(o)
552 FittingSolutionsList=list
553 _plural_types.append(
"FittingSolutionsList")
554 _value_types.append(
"FittingSolutions")
557 _object_types.append(
"MapDistanceTransform")
560 def _object_cast_to_MapDistanceTransform(o):
561 r"""_object_cast_to_MapDistanceTransform(Object o) -> MapDistanceTransform"""
562 return _IMP_em._object_cast_to_MapDistanceTransform(o)
564 _object_types.append(
"EnvelopeScore")
567 def _object_cast_to_EnvelopeScore(o):
568 r"""_object_cast_to_EnvelopeScore(Object o) -> EnvelopeScore"""
569 return _IMP_em._object_cast_to_EnvelopeScore(o)
571 def _get_density_map_x_loc(m, pyobj):
572 r"""_get_density_map_x_loc(DensityMap m, PyObject * pyobj) -> PyObject *"""
573 return _IMP_em._get_density_map_x_loc(m, pyobj)
575 def _get_density_map_y_loc(m, pyobj):
576 r"""_get_density_map_y_loc(DensityMap m, PyObject * pyobj) -> PyObject *"""
577 return _IMP_em._get_density_map_y_loc(m, pyobj)
579 def _get_density_map_z_loc(m, pyobj):
580 r"""_get_density_map_z_loc(DensityMap m, PyObject * pyobj) -> PyObject *"""
581 return _IMP_em._get_density_map_z_loc(m, pyobj)
583 def _get_density_map_data(m, pyobj):
584 r"""_get_density_map_data(DensityMap m, PyObject * pyobj) -> PyObject *"""
585 return _IMP_em._get_density_map_data(m, pyobj)
587 r"""Proxy of C++ IMP::em::MapReaderWriter class."""
589 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
592 r"""__init__(MapReaderWriter self) -> MapReaderWriter"""
593 _IMP_em.MapReaderWriter_swiginit(self, _IMP_em.new_MapReaderWriter())
595 def get_version_info(self):
596 r"""get_version_info(MapReaderWriter self) -> VersionInfo"""
597 return _IMP_em.MapReaderWriter_get_version_info(self)
598 __swig_destroy__ = _IMP_em.delete_MapReaderWriter
601 r"""__str__(MapReaderWriter self) -> std::string"""
602 return _IMP_em.MapReaderWriter___str__(self)
605 r"""__repr__(MapReaderWriter self) -> std::string"""
606 return _IMP_em.MapReaderWriter___repr__(self)
610 return _object_cast_to_MapReaderWriter(o)
614 _IMP_em.MapReaderWriter_swigregister(MapReaderWriter)
618 class DensityHeader(object):
619 r"""Proxy of C++ IMP::em::DensityHeader class."""
621 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
622 __repr__ = _swig_repr
625 r"""__init__(DensityHeader self) -> DensityHeader"""
626 _IMP_em.DensityHeader_swiginit(self, _IMP_em.new_DensityHeader())
628 def get_top(self, ind):
629 r"""get_top(DensityHeader self, int ind) -> double"""
630 return _IMP_em.DensityHeader_get_top(self, ind)
632 def compute_xyz_top(self, force=False):
633 r"""compute_xyz_top(DensityHeader self, bool force=False)"""
634 return _IMP_em.DensityHeader_compute_xyz_top(self, force)
636 def update_map_dimensions(self, nnx, nny, nnz):
637 r"""update_map_dimensions(DensityHeader self, int nnx, int nny, int nnz)"""
638 return _IMP_em.DensityHeader_update_map_dimensions(self, nnx, nny, nnz)
640 def update_cell_dimensions(self):
641 r"""update_cell_dimensions(DensityHeader self)"""
642 return _IMP_em.DensityHeader_update_cell_dimensions(self)
644 def show(self, *args):
645 r"""show(DensityHeader self, _ostream out=std::cout)"""
646 return _IMP_em.DensityHeader_show(self, *args)
647 MAP_FIELD_SIZE = _IMP_em.DensityHeader_MAP_FIELD_SIZE
649 USER_FIELD_SIZE = _IMP_em.DensityHeader_USER_FIELD_SIZE
651 COMMENT_FIELD_NUM_OF = _IMP_em.DensityHeader_COMMENT_FIELD_NUM_OF
653 COMMENT_FIELD_SINGLE_SIZE = _IMP_em.DensityHeader_COMMENT_FIELD_SINGLE_SIZE
655 nxstart = property(_IMP_em.DensityHeader_nxstart_get, _IMP_em.DensityHeader_nxstart_set, doc=
r"""nxstart : int""")
656 nystart = property(_IMP_em.DensityHeader_nystart_get, _IMP_em.DensityHeader_nystart_set, doc=
r"""nystart : int""")
657 nzstart = property(_IMP_em.DensityHeader_nzstart_get, _IMP_em.DensityHeader_nzstart_set, doc=
r"""nzstart : int""")
658 mx = property(_IMP_em.DensityHeader_mx_get, _IMP_em.DensityHeader_mx_set, doc=
r"""mx : int""")
659 my = property(_IMP_em.DensityHeader_my_get, _IMP_em.DensityHeader_my_set, doc=
r"""my : int""")
660 mz = property(_IMP_em.DensityHeader_mz_get, _IMP_em.DensityHeader_mz_set, doc=
r"""mz : int""")
661 xlen = property(_IMP_em.DensityHeader_xlen_get, _IMP_em.DensityHeader_xlen_set, doc=
r"""xlen : float""")
662 ylen = property(_IMP_em.DensityHeader_ylen_get, _IMP_em.DensityHeader_ylen_set, doc=
r"""ylen : float""")
663 zlen = property(_IMP_em.DensityHeader_zlen_get, _IMP_em.DensityHeader_zlen_set, doc=
r"""zlen : float""")
664 alpha = property(_IMP_em.DensityHeader_alpha_get, _IMP_em.DensityHeader_alpha_set, doc=
r"""alpha : float""")
665 beta = property(_IMP_em.DensityHeader_beta_get, _IMP_em.DensityHeader_beta_set, doc=
r"""beta : float""")
666 gamma = property(_IMP_em.DensityHeader_gamma_get, _IMP_em.DensityHeader_gamma_set, doc=
r"""gamma : float""")
667 mapc = property(_IMP_em.DensityHeader_mapc_get, _IMP_em.DensityHeader_mapc_set, doc=
r"""mapc : int""")
668 mapr = property(_IMP_em.DensityHeader_mapr_get, _IMP_em.DensityHeader_mapr_set, doc=
r"""mapr : int""")
669 maps = property(_IMP_em.DensityHeader_maps_get, _IMP_em.DensityHeader_maps_set, doc=
r"""maps : int""")
670 dmin = property(_IMP_em.DensityHeader_dmin_get, _IMP_em.DensityHeader_dmin_set, doc=
r"""dmin : float""")
671 dmax = property(_IMP_em.DensityHeader_dmax_get, _IMP_em.DensityHeader_dmax_set, doc=
r"""dmax : float""")
672 dmean = property(_IMP_em.DensityHeader_dmean_get, _IMP_em.DensityHeader_dmean_set, doc=
r"""dmean : float""")
673 ispg = property(_IMP_em.DensityHeader_ispg_get, _IMP_em.DensityHeader_ispg_set, doc=
r"""ispg : int""")
674 nsymbt = property(_IMP_em.DensityHeader_nsymbt_get, _IMP_em.DensityHeader_nsymbt_set, doc=
r"""nsymbt : int""")
675 user = property(_IMP_em.DensityHeader_user_get, _IMP_em.DensityHeader_user_set, doc=
r"""user : a(IMP::em::DensityHeader::USER_FIELD_SIZE).int""")
676 map = property(_IMP_em.DensityHeader_map_get, _IMP_em.DensityHeader_map_set, doc=
r"""map : a(IMP::em::DensityHeader::MAP_FIELD_SIZE).char""")
677 machinestamp = property(_IMP_em.DensityHeader_machinestamp_get, _IMP_em.DensityHeader_machinestamp_set, doc=
r"""machinestamp : int""")
678 rms = property(_IMP_em.DensityHeader_rms_get, _IMP_em.DensityHeader_rms_set, doc=
r"""rms : float""")
679 nlabl = property(_IMP_em.DensityHeader_nlabl_get, _IMP_em.DensityHeader_nlabl_set, doc=
r"""nlabl : int""")
680 comments = property(_IMP_em.DensityHeader_comments_get, _IMP_em.DensityHeader_comments_set, doc=
r"""comments : a(IMP::em::DensityHeader::COMMENT_FIELD_NUM_OF).a(IMP::em::DensityHeader::COMMENT_FIELD_SINGLE_SIZE).char""")
681 magic = property(_IMP_em.DensityHeader_magic_get, _IMP_em.DensityHeader_magic_set, doc=
r"""magic : int""")
682 voltage = property(_IMP_em.DensityHeader_voltage_get, _IMP_em.DensityHeader_voltage_set, doc=
r"""voltage : float""")
683 Cs = property(_IMP_em.DensityHeader_Cs_get, _IMP_em.DensityHeader_Cs_set, doc=
r"""Cs : float""")
684 Aperture = property(_IMP_em.DensityHeader_Aperture_get, _IMP_em.DensityHeader_Aperture_set, doc=
r"""Aperture : float""")
685 Magnification = property(_IMP_em.DensityHeader_Magnification_get, _IMP_em.DensityHeader_Magnification_set, doc=
r"""Magnification : float""")
686 Postmagnification = property(_IMP_em.DensityHeader_Postmagnification_get, _IMP_em.DensityHeader_Postmagnification_set, doc=
r"""Postmagnification : float""")
687 Exposuretime = property(_IMP_em.DensityHeader_Exposuretime_get, _IMP_em.DensityHeader_Exposuretime_set, doc=
r"""Exposuretime : float""")
688 Microscope = property(_IMP_em.DensityHeader_Microscope_get, _IMP_em.DensityHeader_Microscope_set, doc=
r"""Microscope : float""")
689 Pixelsize = property(_IMP_em.DensityHeader_Pixelsize_get, _IMP_em.DensityHeader_Pixelsize_set, doc=
r"""Pixelsize : float""")
690 CCDArea = property(_IMP_em.DensityHeader_CCDArea_get, _IMP_em.DensityHeader_CCDArea_set, doc=
r"""CCDArea : float""")
691 Defocus = property(_IMP_em.DensityHeader_Defocus_get, _IMP_em.DensityHeader_Defocus_set, doc=
r"""Defocus : float""")
692 Astigmatism = property(_IMP_em.DensityHeader_Astigmatism_get, _IMP_em.DensityHeader_Astigmatism_set, doc=
r"""Astigmatism : float""")
693 AstigmatismAngle = property(_IMP_em.DensityHeader_AstigmatismAngle_get, _IMP_em.DensityHeader_AstigmatismAngle_set, doc=
r"""AstigmatismAngle : float""")
694 FocusIncrement = property(_IMP_em.DensityHeader_FocusIncrement_get, _IMP_em.DensityHeader_FocusIncrement_set, doc=
r"""FocusIncrement : float""")
695 CountsPerElectron = property(_IMP_em.DensityHeader_CountsPerElectron_get, _IMP_em.DensityHeader_CountsPerElectron_set, doc=
r"""CountsPerElectron : float""")
696 Intensity = property(_IMP_em.DensityHeader_Intensity_get, _IMP_em.DensityHeader_Intensity_set, doc=
r"""Intensity : float""")
697 EnergySlitwidth = property(_IMP_em.DensityHeader_EnergySlitwidth_get, _IMP_em.DensityHeader_EnergySlitwidth_set, doc=
r"""EnergySlitwidth : float""")
698 EnergyOffset = property(_IMP_em.DensityHeader_EnergyOffset_get, _IMP_em.DensityHeader_EnergyOffset_set, doc=
r"""EnergyOffset : float""")
699 Tiltangle = property(_IMP_em.DensityHeader_Tiltangle_get, _IMP_em.DensityHeader_Tiltangle_set, doc=
r"""Tiltangle : float""")
700 Tiltaxis = property(_IMP_em.DensityHeader_Tiltaxis_get, _IMP_em.DensityHeader_Tiltaxis_set, doc=
r"""Tiltaxis : float""")
701 MarkerX = property(_IMP_em.DensityHeader_MarkerX_get, _IMP_em.DensityHeader_MarkerX_set, doc=
r"""MarkerX : float""")
702 MarkerY = property(_IMP_em.DensityHeader_MarkerY_get, _IMP_em.DensityHeader_MarkerY_set, doc=
r"""MarkerY : float""")
703 lswap = property(_IMP_em.DensityHeader_lswap_get, _IMP_em.DensityHeader_lswap_set, doc=
r"""lswap : int""")
706 r"""get_resolution(DensityHeader self) -> float"""
707 return _IMP_em.DensityHeader_get_resolution(self)
709 def get_has_resolution(self):
710 r"""get_has_resolution(DensityHeader self) -> bool"""
711 return _IMP_em.DensityHeader_get_has_resolution(self)
713 def set_resolution(self, resolution):
714 r"""set_resolution(DensityHeader self, float resolution)"""
715 return _IMP_em.DensityHeader_set_resolution(self, resolution)
717 def get_spacing(self):
718 r"""get_spacing(DensityHeader self) -> float"""
719 return _IMP_em.DensityHeader_get_spacing(self)
721 def get_xorigin(self):
722 r"""get_xorigin(DensityHeader self) -> float"""
723 return _IMP_em.DensityHeader_get_xorigin(self)
725 def get_yorigin(self):
726 r"""get_yorigin(DensityHeader self) -> float"""
727 return _IMP_em.DensityHeader_get_yorigin(self)
729 def get_zorigin(self):
730 r"""get_zorigin(DensityHeader self) -> float"""
731 return _IMP_em.DensityHeader_get_zorigin(self)
733 def get_origin(self, i):
734 r"""get_origin(DensityHeader self, int i) -> float"""
735 return _IMP_em.DensityHeader_get_origin(self, i)
737 def set_xorigin(self, x):
738 r"""set_xorigin(DensityHeader self, float x)"""
739 return _IMP_em.DensityHeader_set_xorigin(self, x)
741 def set_yorigin(self, y):
742 r"""set_yorigin(DensityHeader self, float y)"""
743 return _IMP_em.DensityHeader_set_yorigin(self, y)
745 def set_zorigin(self, z):
746 r"""set_zorigin(DensityHeader self, float z)"""
747 return _IMP_em.DensityHeader_set_zorigin(self, z)
749 def is_top_calculated(self):
750 r"""is_top_calculated(DensityHeader self) -> bool"""
751 return _IMP_em.DensityHeader_is_top_calculated(self)
752 Objectpixelsize_ = property(_IMP_em.DensityHeader_Objectpixelsize__get, _IMP_em.DensityHeader_Objectpixelsize__set, doc=
r"""Objectpixelsize_ : float""")
755 r"""get_nx(DensityHeader self) -> int"""
756 return _IMP_em.DensityHeader_get_nx(self)
759 r"""get_ny(DensityHeader self) -> int"""
760 return _IMP_em.DensityHeader_get_ny(self)
763 r"""get_nz(DensityHeader self) -> int"""
764 return _IMP_em.DensityHeader_get_nz(self)
766 def get_number_of_voxels(self):
767 r"""get_number_of_voxels(DensityHeader self) -> int"""
768 return _IMP_em.DensityHeader_get_number_of_voxels(self)
770 def get_data_type(self):
771 r"""get_data_type(DensityHeader self) -> int"""
772 return _IMP_em.DensityHeader_get_data_type(self)
774 def set_data_type(self, data_type):
775 r"""set_data_type(DensityHeader self, int data_type)"""
776 return _IMP_em.DensityHeader_set_data_type(self, data_type)
777 __swig_destroy__ = _IMP_em.delete_DensityHeader
780 _IMP_em.DensityHeader_swigregister(DensityHeader)
783 r"""create_density_header(BoundingBox3D bb, float spacing) -> DensityHeader"""
784 return _IMP_em.create_density_header(bb, spacing)
788 read_map(std::string filename, MapReaderWriter reader) -> DensityMap
789 read_map(std::string filename) -> DensityMap
791 return _IMP_em.read_map(*args)
793 def write_map(*args):
795 write_map(DensityMap m, std::string filename, MapReaderWriter writer)
796 write_map(DensityMap m, std::string filename)
798 return _IMP_em.write_map(*args)
801 r"""approximate_molecular_mass(DensityMap m, IMP::Float threshold) -> IMP::Float"""
802 return _IMP_em.approximate_molecular_mass(m, threshold)
804 r"""Proxy of C++ IMP::em::DensityMap class."""
806 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
808 def __init__(self, *args):
810 __init__(DensityMap self, std::string name="DensityMap%1%") -> DensityMap
811 __init__(DensityMap self, DensityHeader header, std::string name="DensityMap%1%") -> DensityMap
813 _IMP_em.DensityMap_swiginit(self, _IMP_em.new_DensityMap(*args))
815 def reset_data(self, value=0.0):
816 r"""reset_data(DensityMap self, float value=0.0)"""
817 return _IMP_em.DensityMap_reset_data(self, value)
820 r"""calcRMS(DensityMap self) -> double"""
821 return _IMP_em.DensityMap_calcRMS(self)
823 def std_normalize(self):
824 r"""std_normalize(DensityMap self)"""
825 return _IMP_em.DensityMap_std_normalize(self)
827 def is_normalized(self):
828 r"""is_normalized(DensityMap self) -> bool"""
829 return _IMP_em.DensityMap_is_normalized(self)
831 def get_location_in_dim_by_voxel(self, index, dim):
832 r"""get_location_in_dim_by_voxel(DensityMap self, long index, int dim) -> float"""
833 return _IMP_em.DensityMap_get_location_in_dim_by_voxel(self, index, dim)
835 def xyz_ind2voxel(self, x, y, z):
836 r"""xyz_ind2voxel(DensityMap self, int x, int y, int z) -> long"""
837 return _IMP_em.DensityMap_xyz_ind2voxel(self, x, y, z)
839 def get_voxel_by_location(self, *args):
841 get_voxel_by_location(DensityMap self, float x, float y, float z) -> long
842 get_voxel_by_location(DensityMap self, Vector3D v) -> long
844 return _IMP_em.DensityMap_get_voxel_by_location(self, *args)
846 def get_location_by_voxel(self, index):
847 r"""get_location_by_voxel(DensityMap self, long index) -> Vector3D"""
848 return _IMP_em.DensityMap_get_location_by_voxel(self, index)
850 def is_xyz_ind_part_of_volume(self, ix, iy, iz):
851 r"""is_xyz_ind_part_of_volume(DensityMap self, int ix, int iy, int iz) -> bool"""
852 return _IMP_em.DensityMap_is_xyz_ind_part_of_volume(self, ix, iy, iz)
854 def is_part_of_volume(self, *args):
856 is_part_of_volume(DensityMap self, float x, float y, float z) -> bool
857 is_part_of_volume(DensityMap self, Vector3D v) -> bool
859 return _IMP_em.DensityMap_is_part_of_volume(self, *args)
861 def get_value(self, *args):
863 get_value(DensityMap self, float x, float y, float z) -> double
864 get_value(DensityMap self, Vector3D point) -> double
865 get_value(DensityMap self, long index) -> double
867 return _IMP_em.DensityMap_get_value(self, *args)
869 def set_value(self, *args):
871 set_value(DensityMap self, long index, double value)
872 set_value(DensityMap self, float x, float y, float z, double value)
874 return _IMP_em.DensityMap_set_value(self, *args)
876 def set_origin(self, *args):
878 set_origin(DensityMap self, float x, float y, float z)
879 set_origin(DensityMap self, Vector3D v)
881 return _IMP_em.DensityMap_set_origin(self, *args)
883 def get_origin(self):
884 r"""get_origin(DensityMap self) -> Vector3D"""
885 return _IMP_em.DensityMap_get_origin(self)
888 r"""get_top(DensityMap self) -> Vector3D"""
889 return _IMP_em.DensityMap_get_top(self)
891 def get_header(self):
892 h = _IMP_em.DensityMap_get_header(self)
898 def get_header_writable(self):
899 h = _IMP_em.DensityMap_get_header_writable(self)
905 def same_origin(self, other):
906 r"""same_origin(DensityMap self, DensityMap other) -> bool"""
907 return _IMP_em.DensityMap_same_origin(self, other)
909 def same_dimensions(self, other):
910 r"""same_dimensions(DensityMap self, DensityMap other) -> bool"""
911 return _IMP_em.DensityMap_same_dimensions(self, other)
913 def same_voxel_size(self, other):
914 r"""same_voxel_size(DensityMap self, DensityMap other) -> bool"""
915 return _IMP_em.DensityMap_same_voxel_size(self, other)
918 r"""get_centroid(DensityMap self, double threshold=0.0) -> Vector3D"""
919 return _IMP_em.DensityMap_get_centroid(self, threshold)
921 def get_max_value(self):
922 r"""get_max_value(DensityMap self) -> double"""
923 return _IMP_em.DensityMap_get_max_value(self)
925 def get_min_value(self):
926 r"""get_min_value(DensityMap self) -> double"""
927 return _IMP_em.DensityMap_get_min_value(self)
929 def add(self, *args):
931 add(DensityMap self, DensityMap other)
932 add(DensityMap self, IMP::Float d)
934 return _IMP_em.DensityMap_add(self, *args)
936 def pick_max(self, other):
937 r"""pick_max(DensityMap self, DensityMap other)"""
938 return _IMP_em.DensityMap_pick_max(self, other)
940 def get_number_of_voxels(self):
941 r"""get_number_of_voxels(DensityMap self) -> long"""
942 return _IMP_em.DensityMap_get_number_of_voxels(self)
944 def set_void_map(self, nx, ny, nz):
945 r"""set_void_map(DensityMap self, int nx, int ny, int nz)"""
946 return _IMP_em.DensityMap_set_void_map(self, nx, ny, nz)
948 def pad(self, nx, ny, nz, val=0.0):
949 r"""pad(DensityMap self, int nx, int ny, int nz, float val=0.0)"""
950 return _IMP_em.DensityMap_pad(self, nx, ny, nz, val)
952 def pad_margin(self, mrg_x, mrg_y, mrg_z, val=0.0):
953 r"""pad_margin(DensityMap self, int mrg_x, int mrg_y, int mrg_z, float val=0.0) -> DensityMap"""
954 return _IMP_em.DensityMap_pad_margin(self, mrg_x, mrg_y, mrg_z, val)
956 def get_cropped(self, *args):
958 get_cropped(DensityMap self, float threshold) -> DensityMap
959 get_cropped(DensityMap self, IMP::Particles ps, double distance, bool inverse=False, bool keep_map_dimensions=False) -> DensityMap
960 get_cropped(DensityMap self, BoundingBox3D bb) -> DensityMap
962 return _IMP_em.DensityMap_get_cropped(self, *args)
964 def get_maximum_value_in_xy_plane(self, z_ind):
965 r"""get_maximum_value_in_xy_plane(DensityMap self, int z_ind) -> float"""
966 return _IMP_em.DensityMap_get_maximum_value_in_xy_plane(self, z_ind)
968 def get_maximum_value_in_xz_plane(self, y_ind):
969 r"""get_maximum_value_in_xz_plane(DensityMap self, int y_ind) -> float"""
970 return _IMP_em.DensityMap_get_maximum_value_in_xz_plane(self, y_ind)
972 def get_maximum_value_in_yz_plane(self, x_ind):
973 r"""get_maximum_value_in_yz_plane(DensityMap self, int x_ind) -> float"""
974 return _IMP_em.DensityMap_get_maximum_value_in_yz_plane(self, x_ind)
977 r"""multiply(DensityMap self, float factor)"""
978 return _IMP_em.DensityMap_multiply(self, factor)
980 def get_locations_string(self, t):
981 r"""get_locations_string(DensityMap self, float t) -> std::string"""
982 return _IMP_em.DensityMap_get_locations_string(self, t)
984 def update_voxel_size(self, new_apix):
985 r"""update_voxel_size(DensityMap self, float new_apix)"""
986 return _IMP_em.DensityMap_update_voxel_size(self, new_apix)
988 def get_spacing(self):
989 r"""get_spacing(DensityMap self) -> IMP::Float"""
990 return _IMP_em.DensityMap_get_spacing(self)
992 def calc_all_voxel2loc(self):
993 r"""calc_all_voxel2loc(DensityMap self)"""
994 return _IMP_em.DensityMap_calc_all_voxel2loc(self)
996 def copy_map(self, other):
997 r"""copy_map(DensityMap self, DensityMap other)"""
998 return _IMP_em.DensityMap_copy_map(self, other)
1000 def get_version_info(self):
1001 r"""get_version_info(DensityMap self) -> VersionInfo"""
1002 return _IMP_em.DensityMap_get_version_info(self)
1003 __swig_destroy__ = _IMP_em.delete_DensityMap
1005 def lower_voxel_shift(self, loc, kdist, orig, ndim):
1006 r"""lower_voxel_shift(DensityMap self, double loc, double kdist, double orig, int ndim) -> int"""
1007 return _IMP_em.DensityMap_lower_voxel_shift(self, loc, kdist, orig, ndim)
1009 def upper_voxel_shift(self, loc, kdist, orig, ndim):
1010 r"""upper_voxel_shift(DensityMap self, double loc, double kdist, double orig, int ndim) -> int"""
1011 return _IMP_em.DensityMap_upper_voxel_shift(self, loc, kdist, orig, ndim)
1013 def get_rms_calculated(self):
1014 r"""get_rms_calculated(DensityMap self) -> bool"""
1015 return _IMP_em.DensityMap_get_rms_calculated(self)
1017 def get_dim_index_by_location(self, *args):
1019 get_dim_index_by_location(DensityMap self, Vector3D v, int ind) -> int
1020 get_dim_index_by_location(DensityMap self, float loc_val, int ind) -> int
1022 return _IMP_em.DensityMap_get_dim_index_by_location(self, *args)
1025 r"""__str__(DensityMap self) -> std::string"""
1026 return _IMP_em.DensityMap___str__(self)
1029 r"""__repr__(DensityMap self) -> std::string"""
1030 return _IMP_em.DensityMap___repr__(self)
1034 return _object_cast_to_DensityMap(o)
1037 def _get_as_binary(self):
1038 r"""_get_as_binary(DensityMap self) -> PyObject *"""
1039 return _IMP_em.DensityMap__get_as_binary(self)
1041 def _set_from_binary(self, p):
1042 r"""_set_from_binary(DensityMap self, PyObject * p)"""
1043 return _IMP_em.DensityMap__set_from_binary(self, p)
1045 def __getstate__(self):
1046 p = self._get_as_binary()
1047 if len(self.__dict__) > 1:
1048 d = self.__dict__.copy()
1053 def __setstate__(self, p):
1054 if not hasattr(self,
'this'):
1056 if isinstance(p, tuple):
1058 self.__dict__.update(d)
1059 return self._set_from_binary(p)
1062 def get_x_loc(self):
1063 return _get_density_map_x_loc(self, self)
1065 def get_y_loc(self):
1066 return _get_density_map_y_loc(self, self)
1068 def get_z_loc(self):
1069 return _get_density_map_z_loc(self, self)
1072 return _get_density_map_data(self, self)
1076 _IMP_em.DensityMap_swigregister(DensityMap)
1080 get_bounding_box(DensityMap m, IMP::Float threshold) -> BoundingBox3D
1081 get_bounding_box(DensityMap m) -> BoundingBox3D
1083 return _IMP_em.get_bounding_box(*args)
1085 def get_density(m, v):
1086 r"""get_density(DensityMap m, Vector3D v) -> double"""
1087 return _IMP_em.get_density(m, v)
1089 def get_transformed(*args):
1091 get_transformed(DensityMap input, Transformation3D tr, double threshold) -> DensityMap
1092 get_transformed(DensityMap input, Transformation3D tr) -> DensityMap
1094 return _IMP_em.get_transformed(*args)
1096 def get_resampled(input, scaling):
1097 r"""get_resampled(DensityMap input, double scaling) -> DensityMap"""
1098 return _IMP_em.get_resampled(input, scaling)
1100 def get_transformed_into(source, tr, into, calc_rms=True):
1101 r"""get_transformed_into(DensityMap source, Transformation3D tr, DensityMap into, bool calc_rms=True)"""
1102 return _IMP_em.get_transformed_into(source, tr, into, calc_rms)
1104 def get_transformed_into2(source, tr, into):
1105 r"""get_transformed_into2(DensityMap source, Transformation3D tr, DensityMap into)"""
1106 return _IMP_em.get_transformed_into2(source, tr, into)
1108 def get_interiors_intersect(d1, d2):
1109 r"""get_interiors_intersect(DensityMap d1, DensityMap d2) -> bool"""
1110 return _IMP_em.get_interiors_intersect(d1, d2)
1114 get_segment(DensityMap map_to_segment, int nx_start, int nx_end, int ny_start, int ny_end, int nz_start, int nz_end) -> DensityMap
1115 get_segment(DensityMap map_to_segment, IMP::algebra::Vector3Ds vecs, float dist) -> DensityMap
1117 return _IMP_em.get_segment(*args)
1120 r"""get_segment_by_masking(DensityMap map_to_segment, DensityMap mask, float mas_threshold) -> DensityMap"""
1121 return _IMP_em.get_segment_by_masking(map_to_segment, mask, mas_threshold)
1123 def binarize(orig_map, threshold, reverse=False):
1124 r"""binarize(DensityMap orig_map, float threshold, bool reverse=False) -> DensityMap"""
1125 return _IMP_em.binarize(orig_map, threshold, reverse)
1128 r"""get_threshold_map(DensityMap orig_map, float threshold) -> DensityMap"""
1129 return _IMP_em.get_threshold_map(orig_map, threshold)
1132 r"""multiply(DensityMap m1, DensityMap m2) -> DensityMap"""
1133 return _IMP_em.multiply(m1, m2)
1136 r"""convolute(DensityMap m1, DensityMap m2) -> double"""
1137 return _IMP_em.convolute(m1, m2)
1140 r"""get_sum(DensityMap m1) -> double"""
1141 return _IMP_em.get_sum(m1)
1144 r"""get_max_map(IMP::em::DensityMaps maps) -> DensityMap"""
1145 return _IMP_em.get_max_map(maps)
1148 r"""interpolate_map(DensityMap in_map, double new_spacing) -> DensityMap"""
1149 return _IMP_em.interpolate_map(in_map, new_spacing)
1152 r"""get_grid(DensityMap in_map) -> IMP::algebra::GridD< 3,IMP::algebra::DenseGridStorageD< 3,float >,float,IMP::algebra::DefaultEmbeddingD< 3 > >"""
1153 return _IMP_em.get_grid(in_map)
1157 create_density_map(DensityMap other) -> DensityMap
1158 create_density_map(BoundingBox3D bb, double spacing) -> DensityMap
1159 create_density_map(int nx, int ny, int nz, double spacing) -> DensityMap
1160 create_density_map(DenseFloatGrid3D grid) -> DensityMap
1161 create_density_map(DenseDoubleGrid3D grid) -> DensityMap
1163 return _IMP_em.create_density_map(*args)
1165 def get_binarized_interior(dmap):
1166 r"""get_binarized_interior(DensityMap dmap) -> DensityMap"""
1167 return _IMP_em.get_binarized_interior(dmap)
1169 def add_to_map(dm, pis):
1170 r"""add_to_map(DensityMap dm, IMP::Particles const & pis)"""
1171 return _IMP_em.add_to_map(dm, pis)
1172 class RadiusDependentDistanceMask(object):
1173 r"""Proxy of C++ IMP::em::RadiusDependentDistanceMask class."""
1175 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1176 __repr__ = _swig_repr
1178 def __init__(self, sampling_radius, header):
1179 r"""__init__(RadiusDependentDistanceMask self, float sampling_radius, DensityHeader header) -> RadiusDependentDistanceMask"""
1180 _IMP_em.RadiusDependentDistanceMask_swiginit(self, _IMP_em.new_RadiusDependentDistanceMask(sampling_radius, header))
1182 def get_neighbor_shift(self):
1183 r"""get_neighbor_shift(RadiusDependentDistanceMask self) -> std::vector< double,std::allocator< double > > const *"""
1184 return _IMP_em.RadiusDependentDistanceMask_get_neighbor_shift(self)
1186 def get_neighbor_dist(self):
1187 r"""get_neighbor_dist(RadiusDependentDistanceMask self) -> std::vector< double,std::allocator< double > > const *"""
1188 return _IMP_em.RadiusDependentDistanceMask_get_neighbor_dist(self)
1190 def get_neighbor_dist_exp(self):
1191 r"""get_neighbor_dist_exp(RadiusDependentDistanceMask self) -> std::vector< double,std::allocator< double > > const *"""
1192 return _IMP_em.RadiusDependentDistanceMask_get_neighbor_dist_exp(self)
1194 def show(self, out):
1195 r"""show(RadiusDependentDistanceMask self, _ostream out)"""
1196 return _IMP_em.RadiusDependentDistanceMask_show(self, out)
1197 __swig_destroy__ = _IMP_em.delete_RadiusDependentDistanceMask
1200 _IMP_em.RadiusDependentDistanceMask_swigregister(RadiusDependentDistanceMask)
1201 class DistanceMask(object):
1202 r"""Proxy of C++ IMP::em::DistanceMask class."""
1204 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1205 __repr__ = _swig_repr
1207 def __init__(self, *args):
1209 __init__(DistanceMask self) -> DistanceMask
1210 __init__(DistanceMask self, DensityHeader header) -> DistanceMask
1212 _IMP_em.DistanceMask_swiginit(self, _IMP_em.new_DistanceMask(*args))
1214 def show(self, out):
1215 r"""show(DistanceMask self, _ostream out)"""
1216 return _IMP_em.DistanceMask_show(self, out)
1218 def is_mask_set(self, radius, eps=0.001):
1219 r"""is_mask_set(DistanceMask self, float radius, float eps=0.001) -> bool"""
1220 return _IMP_em.DistanceMask_is_mask_set(self, radius, eps)
1221 __swig_destroy__ = _IMP_em.delete_DistanceMask
1224 _IMP_em.DistanceMask_swigregister(DistanceMask)
1225 class EMReaderWriter(MapReaderWriter):
1226 r"""Proxy of C++ IMP::em::EMReaderWriter class."""
1228 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1229 __swig_destroy__ = _IMP_em.delete_EMReaderWriter
1232 r"""__str__(EMReaderWriter self) -> std::string"""
1233 return _IMP_em.EMReaderWriter___str__(self)
1236 r"""__repr__(EMReaderWriter self) -> std::string"""
1237 return _IMP_em.EMReaderWriter___repr__(self)
1241 return _object_cast_to_EMReaderWriter(o)
1245 r"""__init__(EMReaderWriter self) -> EMReaderWriter"""
1246 _IMP_em.EMReaderWriter_swiginit(self, _IMP_em.new_EMReaderWriter())
1249 _IMP_em.EMReaderWriter_swigregister(EMReaderWriter)
1250 class XplorReaderWriter(MapReaderWriter):
1251 r"""Proxy of C++ IMP::em::XplorReaderWriter class."""
1253 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1254 __swig_destroy__ = _IMP_em.delete_XplorReaderWriter
1257 r"""__str__(XplorReaderWriter self) -> std::string"""
1258 return _IMP_em.XplorReaderWriter___str__(self)
1261 r"""__repr__(XplorReaderWriter self) -> std::string"""
1262 return _IMP_em.XplorReaderWriter___repr__(self)
1266 return _object_cast_to_XplorReaderWriter(o)
1270 r"""__init__(XplorReaderWriter self) -> XplorReaderWriter"""
1271 _IMP_em.XplorReaderWriter_swiginit(self, _IMP_em.new_XplorReaderWriter())
1274 _IMP_em.XplorReaderWriter_swigregister(XplorReaderWriter)
1275 class MRCReaderWriter(MapReaderWriter):
1276 r"""Proxy of C++ IMP::em::MRCReaderWriter class."""
1278 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1280 def __init__(self, *args):
1282 __init__(MRCReaderWriter self) -> MRCReaderWriter
1283 __init__(MRCReaderWriter self, std::string fn) -> MRCReaderWriter
1285 _IMP_em.MRCReaderWriter_swiginit(self, _IMP_em.new_MRCReaderWriter(*args))
1286 __swig_destroy__ = _IMP_em.delete_MRCReaderWriter
1289 r"""__str__(MRCReaderWriter self) -> std::string"""
1290 return _IMP_em.MRCReaderWriter___str__(self)
1293 r"""__repr__(MRCReaderWriter self) -> std::string"""
1294 return _IMP_em.MRCReaderWriter___repr__(self)
1298 return _object_cast_to_MRCReaderWriter(o)
1302 _IMP_em.MRCReaderWriter_swigregister(MRCReaderWriter)
1303 class KernelParameters(object):
1304 r"""Proxy of C++ IMP::em::KernelParameters class."""
1306 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1308 def __init__(self, *args):
1310 __init__(KernelParameters self) -> KernelParameters
1311 __init__(KernelParameters self, float resolution) -> KernelParameters
1313 _IMP_em.KernelParameters_swiginit(self, _IMP_em.new_KernelParameters(*args))
1314 __swig_destroy__ = _IMP_em.delete_KernelParameters
1317 r"""get_rsig(KernelParameters self) -> float"""
1318 return _IMP_em.KernelParameters_get_rsig(self)
1320 def get_rsigsq(self):
1321 r"""get_rsigsq(KernelParameters self) -> float"""
1322 return _IMP_em.KernelParameters_get_rsigsq(self)
1324 def get_inv_rsigsq(self):
1325 r"""get_inv_rsigsq(KernelParameters self) -> float"""
1326 return _IMP_em.KernelParameters_get_inv_rsigsq(self)
1328 def get_timessig(self):
1329 r"""get_timessig(KernelParameters self) -> float"""
1330 return _IMP_em.KernelParameters_get_timessig(self)
1332 def get_sq2pi3(self):
1333 r"""get_sq2pi3(KernelParameters self) -> float"""
1334 return _IMP_em.KernelParameters_get_sq2pi3(self)
1336 def get_rnormfac(self):
1337 r"""get_rnormfac(KernelParameters self) -> float"""
1338 return _IMP_em.KernelParameters_get_rnormfac(self)
1340 def get_rkdist(self):
1341 r"""get_rkdist(KernelParameters self) -> float"""
1342 return _IMP_em.KernelParameters_get_rkdist(self)
1344 def get_rkdistsq(self):
1345 r"""get_rkdistsq(KernelParameters self) -> float"""
1346 return _IMP_em.KernelParameters_get_rkdistsq(self)
1349 r"""get_lim(KernelParameters self) -> float"""
1350 return _IMP_em.KernelParameters_get_lim(self)
1352 def show(self, *args):
1353 r"""show(KernelParameters self, _ostream out=std::cout)"""
1354 return _IMP_em.KernelParameters_show(self, *args)
1357 r"""__str__(KernelParameters self) -> std::string"""
1358 return _IMP_em.KernelParameters___str__(self)
1361 r"""__repr__(KernelParameters self) -> std::string"""
1362 return _IMP_em.KernelParameters___repr__(self)
1364 def _get_as_binary(self):
1365 r"""_get_as_binary(KernelParameters self) -> PyObject *"""
1366 return _IMP_em.KernelParameters__get_as_binary(self)
1368 def _set_from_binary(self, p):
1369 r"""_set_from_binary(KernelParameters self, PyObject * p)"""
1370 return _IMP_em.KernelParameters__set_from_binary(self, p)
1372 def __getstate__(self):
1373 p = self._get_as_binary()
1374 if len(self.__dict__) > 1:
1375 d = self.__dict__.copy()
1380 def __setstate__(self, p):
1381 if not hasattr(self,
'this'):
1383 if isinstance(p, tuple):
1385 self.__dict__.update(d)
1386 return self._set_from_binary(p)
1390 _IMP_em.KernelParameters_swigregister(KernelParameters)
1391 GAUSSIAN = _IMP_em.GAUSSIAN
1393 BINARIZED_SPHERE = _IMP_em.BINARIZED_SPHERE
1395 SPHERE = _IMP_em.SPHERE
1397 class SampledDensityMap(DensityMap):
1398 r"""Proxy of C++ IMP::em::SampledDensityMap class."""
1400 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1402 def __init__(self, *args):
1404 __init__(SampledDensityMap self, IMP::em::KernelType kt=GAUSSIAN) -> SampledDensityMap
1405 __init__(SampledDensityMap self, DensityHeader header, IMP::em::KernelType kt=GAUSSIAN) -> SampledDensityMap
1406 __init__(SampledDensityMap self, IMP::ParticlesTemp const & ps, double resolution, double voxel_size, FloatKey mass_key=IMP::atom::Mass::get_mass_key(), int sig_cutoff=3, IMP::em::KernelType kt=GAUSSIAN) -> SampledDensityMap
1408 _IMP_em.SampledDensityMap_swiginit(self, _IMP_em.new_SampledDensityMap(*args))
1411 r"""resample(SampledDensityMap self)"""
1412 return _IMP_em.SampledDensityMap_resample(self)
1414 def project(self, *args):
1415 r"""project(SampledDensityMap self, IMP::ParticlesTemp const & ps, int x_margin, int y_margin, int z_margin, Vector3D shift=IMP::algebra::Vector3D(0., 0., 0.), FloatKey mass_key=IMP::atom::Mass::get_mass_key())"""
1416 return _IMP_em.SampledDensityMap_project(self, *args)
1418 def set_particles(self, *args):
1419 r"""set_particles(SampledDensityMap self, IMP::ParticlesTemp const & ps, FloatKey mass_key=IMP::atom::Mass::get_mass_key())"""
1420 return _IMP_em.SampledDensityMap_set_particles(self, *args)
1422 def get_xyzr_particles(self):
1423 r"""get_xyzr_particles(SampledDensityMap self) -> IMP::core::XYZRs const &"""
1424 return _IMP_em.SampledDensityMap_get_xyzr_particles(self)
1426 def get_sampled_particles(self):
1427 r"""get_sampled_particles(SampledDensityMap self) -> IMP::Particles const &"""
1428 return _IMP_em.SampledDensityMap_get_sampled_particles(self)
1430 def get_weight_key(self):
1431 r"""get_weight_key(SampledDensityMap self) -> FloatKey"""
1432 return _IMP_em.SampledDensityMap_get_weight_key(self)
1434 def get_minimum_resampled_value(self):
1435 r"""get_minimum_resampled_value(SampledDensityMap self) -> float"""
1436 return _IMP_em.SampledDensityMap_get_minimum_resampled_value(self)
1438 def update_resolution(self, res):
1439 r"""update_resolution(SampledDensityMap self, IMP::Float res)"""
1440 return _IMP_em.SampledDensityMap_update_resolution(self, res)
1441 __swig_destroy__ = _IMP_em.delete_SampledDensityMap
1444 r"""__str__(SampledDensityMap self) -> std::string"""
1445 return _IMP_em.SampledDensityMap___str__(self)
1448 r"""__repr__(SampledDensityMap self) -> std::string"""
1449 return _IMP_em.SampledDensityMap___repr__(self)
1453 return _object_cast_to_SampledDensityMap(o)
1457 _IMP_em.SampledDensityMap_swigregister(SampledDensityMap)
1458 IMP_DEFAULT_NUM_SHELLS = _IMP_em.IMP_DEFAULT_NUM_SHELLS
1460 IMP_SIG_CUTOFF = _IMP_em.IMP_SIG_CUTOFF
1462 class SurfaceShellDensityMap(SampledDensityMap):
1463 r"""Proxy of C++ IMP::em::SurfaceShellDensityMap class."""
1465 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1467 def __init__(self, *args):
1469 __init__(SurfaceShellDensityMap self) -> SurfaceShellDensityMap
1470 __init__(SurfaceShellDensityMap self, DensityHeader header) -> SurfaceShellDensityMap
1471 __init__(SurfaceShellDensityMap self, IMP::ParticlesTemp const & ps, float voxel_size, FloatKey mass_key=IMP::atom::Mass::get_mass_key(), int num_shells=5) -> SurfaceShellDensityMap
1473 _IMP_em.SurfaceShellDensityMap_swiginit(self, _IMP_em.new_SurfaceShellDensityMap(*args))
1476 r"""binarize(SurfaceShellDensityMap self, float scene_val)"""
1477 return _IMP_em.SurfaceShellDensityMap_binarize(self, scene_val)
1479 def has_background_neighbor(self, voxel_ind):
1480 r"""has_background_neighbor(SurfaceShellDensityMap self, long voxel_ind) -> bool"""
1481 return _IMP_em.SurfaceShellDensityMap_has_background_neighbor(self, voxel_ind)
1482 __swig_destroy__ = _IMP_em.delete_SurfaceShellDensityMap
1485 r"""__str__(SurfaceShellDensityMap self) -> std::string"""
1486 return _IMP_em.SurfaceShellDensityMap___str__(self)
1489 r"""__repr__(SurfaceShellDensityMap self) -> std::string"""
1490 return _IMP_em.SurfaceShellDensityMap___repr__(self)
1494 return _object_cast_to_SurfaceShellDensityMap(o)
1498 _IMP_em.SurfaceShellDensityMap_swigregister(SurfaceShellDensityMap)
1501 r"""get_coarse_cc_score(DensityMap data, SampledDensityMap model_map, double scalefactor, bool recalc_rms=True, bool resample=True, IMP::FloatPair norm_factors=IMP::FloatPair(0., 0.)) -> double"""
1502 return _IMP_em.get_coarse_cc_score(*args)
1505 r"""get_coarse_cc_coefficient(DensityMap grid1, DensityMap grid2, double grid2_voxel_data_threshold, bool allow_padding=False, IMP::FloatPair norm_factors=IMP::FloatPair(0., 0.)) -> double"""
1506 return _IMP_em.get_coarse_cc_coefficient(*args)
1509 r"""get_coarse_cc_local_coefficient(DensityMap em_map, DensityMap model_map, double voxel_data_threshold) -> double"""
1510 return _IMP_em.get_coarse_cc_local_coefficient(em_map, model_map, voxel_data_threshold)
1511 class CoarseConvolution(object):
1512 r"""Proxy of C++ IMP::em::CoarseConvolution class."""
1514 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1515 __repr__ = _swig_repr
1518 def convolution(em_map, model_map, voxel_data_threshold, recalc_ccnormfac=True):
1519 r"""convolution(DensityMap em_map, DensityMap model_map, float voxel_data_threshold, bool recalc_ccnormfac=True) -> float"""
1520 return _IMP_em.CoarseConvolution_convolution(em_map, model_map, voxel_data_threshold, recalc_ccnormfac)
1523 r"""__init__(CoarseConvolution self) -> CoarseConvolution"""
1524 _IMP_em.CoarseConvolution_swiginit(self, _IMP_em.new_CoarseConvolution())
1525 __swig_destroy__ = _IMP_em.delete_CoarseConvolution
1528 _IMP_em.CoarseConvolution_swigregister(CoarseConvolution)
1530 r"""Proxy of C++ IMP::em::CoarseCCatIntervals class."""
1532 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1534 def __init__(self, *args):
1536 __init__(CoarseCCatIntervals self, int const & ncd) -> CoarseCCatIntervals
1537 __init__(CoarseCCatIntervals self) -> CoarseCCatIntervals
1539 _IMP_em.CoarseCCatIntervals_swiginit(self, _IMP_em.new_CoarseCCatIntervals(*args))
1541 def evaluate(self, em_map, model_map, deriv, scalefac, lderiv, eval_interval):
1542 r"""evaluate(CoarseCCatIntervals self, DensityMap em_map, SampledDensityMap model_map, IMP::algebra::Vector3Ds const & deriv, float scalefac, bool lderiv, unsigned long eval_interval) -> std::pair< double,IMP::algebra::Vector3Ds >"""
1543 return _IMP_em.CoarseCCatIntervals_evaluate(self, em_map, model_map, deriv, scalefac, lderiv, eval_interval)
1545 def get_version_info(self):
1546 r"""get_version_info(CoarseCCatIntervals self) -> VersionInfo"""
1547 return _IMP_em.CoarseCCatIntervals_get_version_info(self)
1548 __swig_destroy__ = _IMP_em.delete_CoarseCCatIntervals
1551 r"""__str__(CoarseCCatIntervals self) -> std::string"""
1552 return _IMP_em.CoarseCCatIntervals___str__(self)
1555 r"""__repr__(CoarseCCatIntervals self) -> std::string"""
1556 return _IMP_em.CoarseCCatIntervals___repr__(self)
1560 return _object_cast_to_CoarseCCatIntervals(o)
1564 _IMP_em.CoarseCCatIntervals_swigregister(CoarseCCatIntervals)
1567 r"""bayesem3d_get_distinct_and_counts(DensityMap em) -> std::map< double,int >"""
1568 return _IMP_em.bayesem3d_get_distinct_and_counts(em)
1571 r"""bayesem3d_get_cumulative_sum(DensityMap em) -> IMP::Floats"""
1572 return _IMP_em.bayesem3d_get_cumulative_sum(em)
1575 r"""bayesem3d_get_cumulative_sum_with_reference(DensityMap em) -> std::map< double,double >"""
1576 return _IMP_em.bayesem3d_get_cumulative_sum_with_reference(em)
1579 r"""bayesem3d_linear_interpolate(IMP::Floats const & x_data, IMP::Floats const & y_data, double x, bool extrapolate) -> double"""
1580 return _IMP_em.bayesem3d_linear_interpolate(x_data, y_data, x, extrapolate)
1583 r"""bayesem3d_get_logabssumexp(double x, double y, double sx, double sy) -> IMP::FloatPair"""
1584 return _IMP_em.bayesem3d_get_logabssumexp(x, y, sx, sy)
1587 r"""bayesem3d_get_logabssumprodexp(double x, double y, double wx, double wy) -> IMP::FloatPair"""
1588 return _IMP_em.bayesem3d_get_logabssumprodexp(x, y, wx, wy)
1591 r"""bayesem3d_get_logsumexp(double x, double y) -> double"""
1592 return _IMP_em.bayesem3d_get_logsumexp(x, y)
1595 r"""bayesem3d_get_logsumprodexp(double x, double y, double wx, double wy) -> double"""
1596 return _IMP_em.bayesem3d_get_logsumprodexp(x, y, wx, wy)
1599 r"""bayesem3d_get_em_density_squared(DensityMap em, long number_of_voxels) -> IMP::FloatPair"""
1600 return _IMP_em.bayesem3d_get_em_density_squared(em, number_of_voxels)
1603 r"""bayesem3d_get_value(Particle p, Vector3D pt, double mass_ii, KernelParameters kps) -> std::vector< double,std::allocator< double > >"""
1604 return _IMP_em.bayesem3d_get_value(p, pt, mass_ii, kps)
1607 r"""bayesem3d_get_value_no_deriv(Particle p, Vector3D pt, double mass_ii, KernelParameters kps) -> std::vector< double,std::allocator< double > >"""
1608 return _IMP_em.bayesem3d_get_value_no_deriv(p, pt, mass_ii, kps)
1611 r"""bayesem3d_get_density_from_particle(DensityMap em, IMP::ParticlesTemp const & ps, double resolution, double const window_size=1.0) -> DensityMap"""
1612 return _IMP_em.bayesem3d_get_density_from_particle(em, ps, resolution, window_size)
1615 r"""bayesem3d_get_cross_correlation_coefficient(DensityMap em1, DensityMap em2) -> double"""
1616 return _IMP_em.bayesem3d_get_cross_correlation_coefficient(em1, em2)
1619 r"""bayesem3d_get_score_and_derivative(DensityMap em, IMP::ParticlesTemp const & ps, double resolution, double sigma, double const window_size=1.0) -> std::pair< double,IMP::algebra::Vector3Ds >"""
1620 return _IMP_em.bayesem3d_get_score_and_derivative(em, ps, resolution, sigma, window_size)
1623 r"""bayesem3d_get_normalized_intensities(DensityMap em, IMP::ParticlesTemp const & ps, double resolution)"""
1624 return _IMP_em.bayesem3d_get_normalized_intensities(em, ps, resolution)
1626 r"""Proxy of C++ IMP::em::FitRestraint class."""
1628 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1630 def __init__(self, *args):
1631 r"""__init__(FitRestraint self, IMP::ParticlesTemp ps, DensityMap em_map, IMP::FloatPair norm_factors=IMP::FloatPair(0., 0.), FloatKey weight_key=IMP::atom::Mass::get_mass_key(), float scale=1, bool use_rigid_bodies=True, IMP::em::KernelType kt=GAUSSIAN) -> FitRestraint"""
1632 _IMP_em.FitRestraint_swiginit(self, _IMP_em.new_FitRestraint(*args))
1634 def get_model_dens_map(self):
1635 r"""get_model_dens_map(FitRestraint self) -> SampledDensityMap"""
1636 return _IMP_em.FitRestraint_get_model_dens_map(self)
1638 def set_scale_factor(self, scale):
1639 r"""set_scale_factor(FitRestraint self, float scale)"""
1640 return _IMP_em.FitRestraint_set_scale_factor(self, scale)
1642 def get_scale_factor(self):
1643 r"""get_scale_factor(FitRestraint self) -> float"""
1644 return _IMP_em.FitRestraint_get_scale_factor(self)
1646 def do_get_inputs(self):
1647 r"""do_get_inputs(FitRestraint self) -> IMP::ModelObjectsTemp"""
1648 return _IMP_em.FitRestraint_do_get_inputs(self)
1650 def get_version_info(self):
1651 r"""get_version_info(FitRestraint self) -> VersionInfo"""
1652 return _IMP_em.FitRestraint_get_version_info(self)
1653 __swig_destroy__ = _IMP_em.delete_FitRestraint
1656 r"""__str__(FitRestraint self) -> std::string"""
1657 return _IMP_em.FitRestraint___str__(self)
1660 r"""__repr__(FitRestraint self) -> std::string"""
1661 return _IMP_em.FitRestraint___repr__(self)
1665 return _object_cast_to_FitRestraint(o)
1669 _IMP_em.FitRestraint_swigregister(FitRestraint)
1671 r"""Proxy of C++ IMP::em::FitRestraintBayesEM3D class."""
1673 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1675 def __init__(self, *args):
1676 r"""__init__(FitRestraintBayesEM3D self, IMP::ParticlesTemp ps, DensityMap em_map, FloatKey weight_key=IMP::atom::Mass::get_mass_key(), bool use_rigid_bodies=True, double sigma=.1, double window_size=1.0) -> FitRestraintBayesEM3D"""
1677 _IMP_em.FitRestraintBayesEM3D_swiginit(self, _IMP_em.new_FitRestraintBayesEM3D(*args))
1679 def do_get_inputs(self):
1680 r"""do_get_inputs(FitRestraintBayesEM3D self) -> IMP::ModelObjectsTemp"""
1681 return _IMP_em.FitRestraintBayesEM3D_do_get_inputs(self)
1683 def get_version_info(self):
1684 r"""get_version_info(FitRestraintBayesEM3D self) -> VersionInfo"""
1685 return _IMP_em.FitRestraintBayesEM3D_get_version_info(self)
1686 __swig_destroy__ = _IMP_em.delete_FitRestraintBayesEM3D
1689 r"""__str__(FitRestraintBayesEM3D self) -> std::string"""
1690 return _IMP_em.FitRestraintBayesEM3D___str__(self)
1693 r"""__repr__(FitRestraintBayesEM3D self) -> std::string"""
1694 return _IMP_em.FitRestraintBayesEM3D___repr__(self)
1698 return _object_cast_to_FitRestraintBayesEM3D(o)
1702 _IMP_em.FitRestraintBayesEM3D_swigregister(FitRestraintBayesEM3D)
1705 r"""density2particles(DensityMap dmap, IMP::Float threshold, Model m, int step=1) -> IMP::Particles"""
1706 return _IMP_em.density2particles(dmap, threshold, m, step)
1709 r"""density2vectors(DensityMap dmap, IMP::Float threshold) -> IMP::algebra::Vector3Ds"""
1710 return _IMP_em.density2vectors(dmap, threshold)
1713 r"""particles2density(IMP::ParticlesTemp const & ps, IMP::Float resolution, IMP::Float apix, int sig_cutoff=3, FloatKey weight_key=IMP::atom::Mass::get_mass_key()) -> SampledDensityMap"""
1714 return _IMP_em.particles2density(*args)
1717 r"""particles2binarized_density(IMP::ParticlesTemp const & ps, IMP::Float resolution, IMP::Float apix, int sig_cutoff=3, FloatKey weight_key=IMP::atom::Mass::get_mass_key()) -> SampledDensityMap"""
1718 return _IMP_em.particles2binarized_density(*args)
1721 r"""particles2surface(IMP::ParticlesTemp const & ps, IMP::Float apix, FloatKey weight_key=IMP::atom::Mass::get_mass_key()) -> SurfaceShellDensityMap"""
1722 return _IMP_em.particles2surface(*args)
1724 def calculate_intersection_score(d1, d2):
1725 r"""calculate_intersection_score(SurfaceShellDensityMap d1, SurfaceShellDensityMap d2) -> IMP::Float"""
1726 return _IMP_em.calculate_intersection_score(d1, d2)
1727 class SpiderHeader(object):
1728 r"""Proxy of C++ IMP::em::SpiderHeader class."""
1730 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1731 __repr__ = _swig_repr
1732 fNslice = property(_IMP_em.SpiderHeader_fNslice_get, _IMP_em.SpiderHeader_fNslice_set, doc=
r"""fNslice : float""")
1733 fNrow = property(_IMP_em.SpiderHeader_fNrow_get, _IMP_em.SpiderHeader_fNrow_set, doc=
r"""fNrow : float""")
1734 fNrec = property(_IMP_em.SpiderHeader_fNrec_get, _IMP_em.SpiderHeader_fNrec_set, doc=
r"""fNrec : float""")
1735 fNlabel = property(_IMP_em.SpiderHeader_fNlabel_get, _IMP_em.SpiderHeader_fNlabel_set, doc=
r"""fNlabel : float""")
1736 fIform = property(_IMP_em.SpiderHeader_fIform_get, _IMP_em.SpiderHeader_fIform_set, doc=
r"""fIform : float""")
1737 fImami = property(_IMP_em.SpiderHeader_fImami_get, _IMP_em.SpiderHeader_fImami_set, doc=
r"""fImami : float""")
1738 fFmax = property(_IMP_em.SpiderHeader_fFmax_get, _IMP_em.SpiderHeader_fFmax_set, doc=
r"""fFmax : float""")
1739 fFmin = property(_IMP_em.SpiderHeader_fFmin_get, _IMP_em.SpiderHeader_fFmin_set, doc=
r"""fFmin : float""")
1740 fAv = property(_IMP_em.SpiderHeader_fAv_get, _IMP_em.SpiderHeader_fAv_set, doc=
r"""fAv : float""")
1741 fSig = property(_IMP_em.SpiderHeader_fSig_get, _IMP_em.SpiderHeader_fSig_set, doc=
r"""fSig : float""")
1742 fIhist = property(_IMP_em.SpiderHeader_fIhist_get, _IMP_em.SpiderHeader_fIhist_set, doc=
r"""fIhist : float""")
1743 fNcol = property(_IMP_em.SpiderHeader_fNcol_get, _IMP_em.SpiderHeader_fNcol_set, doc=
r"""fNcol : float""")
1744 fLabrec = property(_IMP_em.SpiderHeader_fLabrec_get, _IMP_em.SpiderHeader_fLabrec_set, doc=
r"""fLabrec : float""")
1745 fIangle = property(_IMP_em.SpiderHeader_fIangle_get, _IMP_em.SpiderHeader_fIangle_set, doc=
r"""fIangle : float""")
1746 fPhi = property(_IMP_em.SpiderHeader_fPhi_get, _IMP_em.SpiderHeader_fPhi_set, doc=
r"""fPhi : float""")
1747 fTheta = property(_IMP_em.SpiderHeader_fTheta_get, _IMP_em.SpiderHeader_fTheta_set, doc=
r"""fTheta : float""")
1748 fPsi = property(_IMP_em.SpiderHeader_fPsi_get, _IMP_em.SpiderHeader_fPsi_set, doc=
r"""fPsi : float""")
1749 fXoff = property(_IMP_em.SpiderHeader_fXoff_get, _IMP_em.SpiderHeader_fXoff_set, doc=
r"""fXoff : float""")
1750 fYoff = property(_IMP_em.SpiderHeader_fYoff_get, _IMP_em.SpiderHeader_fYoff_set, doc=
r"""fYoff : float""")
1751 fZoff = property(_IMP_em.SpiderHeader_fZoff_get, _IMP_em.SpiderHeader_fZoff_set, doc=
r"""fZoff : float""")
1752 fScale = property(_IMP_em.SpiderHeader_fScale_get, _IMP_em.SpiderHeader_fScale_set, doc=
r"""fScale : float""")
1753 fLabbyt = property(_IMP_em.SpiderHeader_fLabbyt_get, _IMP_em.SpiderHeader_fLabbyt_set, doc=
r"""fLabbyt : float""")
1754 fLenbyt = property(_IMP_em.SpiderHeader_fLenbyt_get, _IMP_em.SpiderHeader_fLenbyt_set, doc=
r"""fLenbyt : float""")
1755 fNothing = property(_IMP_em.SpiderHeader_fNothing_get, _IMP_em.SpiderHeader_fNothing_set, doc=
r"""fNothing : a(24).char""")
1756 fFlag = property(_IMP_em.SpiderHeader_fFlag_get, _IMP_em.SpiderHeader_fFlag_set, doc=
r"""fFlag : float""")
1757 fPhi1 = property(_IMP_em.SpiderHeader_fPhi1_get, _IMP_em.SpiderHeader_fPhi1_set, doc=
r"""fPhi1 : float""")
1758 fTheta1 = property(_IMP_em.SpiderHeader_fTheta1_get, _IMP_em.SpiderHeader_fTheta1_set, doc=
r"""fTheta1 : float""")
1759 fPsi1 = property(_IMP_em.SpiderHeader_fPsi1_get, _IMP_em.SpiderHeader_fPsi1_set, doc=
r"""fPsi1 : float""")
1760 fPhi2 = property(_IMP_em.SpiderHeader_fPhi2_get, _IMP_em.SpiderHeader_fPhi2_set, doc=
r"""fPhi2 : float""")
1761 fTheta2 = property(_IMP_em.SpiderHeader_fTheta2_get, _IMP_em.SpiderHeader_fTheta2_set, doc=
r"""fTheta2 : float""")
1762 fPsi2 = property(_IMP_em.SpiderHeader_fPsi2_get, _IMP_em.SpiderHeader_fPsi2_set, doc=
r"""fPsi2 : float""")
1763 fGeo_matrix = property(_IMP_em.SpiderHeader_fGeo_matrix_get, _IMP_em.SpiderHeader_fGeo_matrix_set, doc=
r"""fGeo_matrix : a(3).a(3).double""")
1764 fAngle1 = property(_IMP_em.SpiderHeader_fAngle1_get, _IMP_em.SpiderHeader_fAngle1_set, doc=
r"""fAngle1 : float""")
1765 fr1 = property(_IMP_em.SpiderHeader_fr1_get, _IMP_em.SpiderHeader_fr1_set, doc=
r"""fr1 : float""")
1766 fr2 = property(_IMP_em.SpiderHeader_fr2_get, _IMP_em.SpiderHeader_fr2_set, doc=
r"""fr2 : float""")
1767 RTflag = property(_IMP_em.SpiderHeader_RTflag_get, _IMP_em.SpiderHeader_RTflag_set, doc=
r"""RTflag : float""")
1768 Astart = property(_IMP_em.SpiderHeader_Astart_get, _IMP_em.SpiderHeader_Astart_set, doc=
r"""Astart : float""")
1769 Aend = property(_IMP_em.SpiderHeader_Aend_get, _IMP_em.SpiderHeader_Aend_set, doc=
r"""Aend : float""")
1770 Ainc = property(_IMP_em.SpiderHeader_Ainc_get, _IMP_em.SpiderHeader_Ainc_set, doc=
r"""Ainc : float""")
1771 Rsigma = property(_IMP_em.SpiderHeader_Rsigma_get, _IMP_em.SpiderHeader_Rsigma_set, doc=
r"""Rsigma : float""")
1772 Tstart = property(_IMP_em.SpiderHeader_Tstart_get, _IMP_em.SpiderHeader_Tstart_set, doc=
r"""Tstart : float""")
1773 Tend = property(_IMP_em.SpiderHeader_Tend_get, _IMP_em.SpiderHeader_Tend_set, doc=
r"""Tend : float""")
1774 Tinc = property(_IMP_em.SpiderHeader_Tinc_get, _IMP_em.SpiderHeader_Tinc_set, doc=
r"""Tinc : float""")
1775 Weight = property(_IMP_em.SpiderHeader_Weight_get, _IMP_em.SpiderHeader_Weight_set, doc=
r"""Weight : float""")
1776 Flip = property(_IMP_em.SpiderHeader_Flip_get, _IMP_em.SpiderHeader_Flip_set, doc=
r"""Flip : float""")
1777 empty = property(_IMP_em.SpiderHeader_empty_get, _IMP_em.SpiderHeader_empty_set, doc=
r"""empty : a(576).char""")
1778 szIDat = property(_IMP_em.SpiderHeader_szIDat_get, _IMP_em.SpiderHeader_szIDat_set, doc=
r"""szIDat : a(12).char""")
1779 szITim = property(_IMP_em.SpiderHeader_szITim_get, _IMP_em.SpiderHeader_szITim_set, doc=
r"""szITim : a(8).char""")
1780 szITit = property(_IMP_em.SpiderHeader_szITit_get, _IMP_em.SpiderHeader_szITit_set, doc=
r"""szITit : a(160).char""")
1782 def show(self, out):
1783 r"""show(SpiderHeader self, _ostream out)"""
1784 return _IMP_em.SpiderHeader_show(self, out)
1787 r"""__init__(SpiderHeader self) -> SpiderHeader"""
1788 _IMP_em.SpiderHeader_swiginit(self, _IMP_em.new_SpiderHeader())
1789 __swig_destroy__ = _IMP_em.delete_SpiderHeader
1792 _IMP_em.SpiderHeader_swigregister(SpiderHeader)
1793 class ImageHeader(object):
1794 r"""Proxy of C++ IMP::em::ImageHeader class."""
1796 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1797 __repr__ = _swig_repr
1798 IMG_BYTE = _IMP_em.ImageHeader_IMG_BYTE
1800 IMG_IMPEM = _IMP_em.ImageHeader_IMG_IMPEM
1802 IMG_INT = _IMP_em.ImageHeader_IMG_INT
1804 VOL_BYTE = _IMP_em.ImageHeader_VOL_BYTE
1806 VOL_IMPEM = _IMP_em.ImageHeader_VOL_IMPEM
1808 VOL_INT = _IMP_em.ImageHeader_VOL_INT
1810 IMG_FOURIER = _IMP_em.ImageHeader_IMG_FOURIER
1812 VOL_FOURIER = _IMP_em.ImageHeader_VOL_FOURIER
1815 def __init__(self, *args):
1817 __init__(ImageHeader self) -> ImageHeader
1818 __init__(ImageHeader self, IMP::em::ImageHeader::img_type im) -> ImageHeader
1819 __init__(ImageHeader self, float im) -> ImageHeader
1821 _IMP_em.ImageHeader_swiginit(self, _IMP_em.new_ImageHeader(*args))
1823 def get_image_type(self):
1824 r"""get_image_type(ImageHeader self) -> float"""
1825 return _IMP_em.ImageHeader_get_image_type(self)
1827 def set_image_type(self, *args):
1829 set_image_type(ImageHeader self, IMP::em::ImageHeader::img_type im)
1830 set_image_type(ImageHeader self, float im)
1832 return _IMP_em.ImageHeader_set_image_type(self, *args)
1834 def do_show(self, out):
1835 r"""do_show(ImageHeader self, _ostream out)"""
1836 return _IMP_em.ImageHeader_do_show(self, out)
1838 def show(self, *args):
1839 r"""show(ImageHeader self, _ostream out=std::cout)"""
1840 return _IMP_em.ImageHeader_show(self, *args)
1842 def print_hard(self, out):
1843 r"""print_hard(ImageHeader self, _ostream out)"""
1844 return _IMP_em.ImageHeader_print_hard(self, out)
1846 def show_projection_params(self, out):
1847 r"""show_projection_params(ImageHeader self, _ostream out)"""
1848 return _IMP_em.ImageHeader_show_projection_params(self, out)
1850 def read(self, *args):
1852 read(ImageHeader self, IMP::String const filename, bool skip_type_check=False, bool force_reversed=False, bool skip_extra_checkings=False) -> int
1853 read(ImageHeader self, std::ifstream & f, bool skip_type_check=False, bool force_reversed=False, bool skip_extra_checkings=False) -> bool
1855 return _IMP_em.ImageHeader_read(self, *args)
1857 def write(self, *args):
1859 write(ImageHeader self, IMP::String const & filename, bool force_reversed=False)
1860 write(ImageHeader self, std::ofstream & f, bool force_reversed=False)
1862 return _IMP_em.ImageHeader_write(self, *args)
1865 r"""clear(ImageHeader self)"""
1866 return _IMP_em.ImageHeader_clear(self)
1868 def set_header(self):
1869 r"""set_header(ImageHeader self)"""
1870 return _IMP_em.ImageHeader_set_header(self)
1872 def get_reversed(self):
1873 r"""get_reversed(ImageHeader self) -> bool"""
1874 return _IMP_em.ImageHeader_get_reversed(self)
1876 def set_reversed(self, value):
1877 r"""set_reversed(ImageHeader self, bool value)"""
1878 return _IMP_em.ImageHeader_set_reversed(self, value)
1880 def get_number_of_slices(self):
1881 r"""get_number_of_slices(ImageHeader self) -> unsigned int"""
1882 return _IMP_em.ImageHeader_get_number_of_slices(self)
1884 def set_number_of_slices(self, n):
1885 r"""set_number_of_slices(ImageHeader self, unsigned int n)"""
1886 return _IMP_em.ImageHeader_set_number_of_slices(self, n)
1888 def get_number_of_rows(self):
1889 r"""get_number_of_rows(ImageHeader self) -> unsigned int"""
1890 return _IMP_em.ImageHeader_get_number_of_rows(self)
1892 def set_number_of_rows(self, n):
1893 r"""set_number_of_rows(ImageHeader self, unsigned int n)"""
1894 return _IMP_em.ImageHeader_set_number_of_rows(self, n)
1896 def get_number_of_columns(self):
1897 r"""get_number_of_columns(ImageHeader self) -> unsigned int"""
1898 return _IMP_em.ImageHeader_get_number_of_columns(self)
1900 def set_number_of_columns(self, n):
1901 r"""set_number_of_columns(ImageHeader self, unsigned int n)"""
1902 return _IMP_em.ImageHeader_set_number_of_columns(self, n)
1904 def get_old_rot(self):
1905 r"""get_old_rot(ImageHeader self) -> float"""
1906 return _IMP_em.ImageHeader_get_old_rot(self)
1908 def set_old_rot(self, value):
1909 r"""set_old_rot(ImageHeader self, float value)"""
1910 return _IMP_em.ImageHeader_set_old_rot(self, value)
1912 def get_fAngle1(self):
1913 r"""get_fAngle1(ImageHeader self) -> float"""
1914 return _IMP_em.ImageHeader_get_fAngle1(self)
1916 def set_fAngle1(self, value):
1917 r"""set_fAngle1(ImageHeader self, float value)"""
1918 return _IMP_em.ImageHeader_set_fAngle1(self, value)
1920 def get_Scale(self):
1921 r"""get_Scale(ImageHeader self) -> float"""
1922 return _IMP_em.ImageHeader_get_Scale(self)
1924 def set_Scale(self, value):
1925 r"""set_Scale(ImageHeader self, float value)"""
1926 return _IMP_em.ImageHeader_set_Scale(self, value)
1929 r"""get_Flip(ImageHeader self) -> float"""
1930 return _IMP_em.ImageHeader_get_Flip(self)
1932 def set_Flip(self, value):
1933 r"""set_Flip(ImageHeader self, float value)"""
1934 return _IMP_em.ImageHeader_set_Flip(self, value)
1936 def get_Weight(self):
1937 r"""get_Weight(ImageHeader self) -> float"""
1938 return _IMP_em.ImageHeader_get_Weight(self)
1940 def set_Weight(self, value):
1941 r"""set_Weight(ImageHeader self, float value)"""
1942 return _IMP_em.ImageHeader_set_Weight(self, value)
1944 def get_fNrec(self):
1945 r"""get_fNrec(ImageHeader self) -> float"""
1946 return _IMP_em.ImageHeader_get_fNrec(self)
1948 def set_fNrec(self, value):
1949 r"""set_fNrec(ImageHeader self, float value)"""
1950 return _IMP_em.ImageHeader_set_fNrec(self, value)
1952 def get_fNlabel(self):
1953 r"""get_fNlabel(ImageHeader self) -> float"""
1954 return _IMP_em.ImageHeader_get_fNlabel(self)
1956 def set_fNlabel(self, value):
1957 r"""set_fNlabel(ImageHeader self, float value)"""
1958 return _IMP_em.ImageHeader_set_fNlabel(self, value)
1960 def get_fIform(self):
1961 r"""get_fIform(ImageHeader self) -> float"""
1962 return _IMP_em.ImageHeader_get_fIform(self)
1964 def set_fIform(self, value):
1965 r"""set_fIform(ImageHeader self, float value)"""
1966 return _IMP_em.ImageHeader_set_fIform(self, value)
1968 def get_fImami(self):
1969 r"""get_fImami(ImageHeader self) -> float"""
1970 return _IMP_em.ImageHeader_get_fImami(self)
1972 def set_fImami(self, value):
1973 r"""set_fImami(ImageHeader self, float value)"""
1974 return _IMP_em.ImageHeader_set_fImami(self, value)
1976 def get_fFmax(self):
1977 r"""get_fFmax(ImageHeader self) -> float"""
1978 return _IMP_em.ImageHeader_get_fFmax(self)
1980 def set_fFmax(self, value):
1981 r"""set_fFmax(ImageHeader self, float value)"""
1982 return _IMP_em.ImageHeader_set_fFmax(self, value)
1984 def get_fFmin(self):
1985 r"""get_fFmin(ImageHeader self) -> float"""
1986 return _IMP_em.ImageHeader_get_fFmin(self)
1988 def set_fFmin(self, value):
1989 r"""set_fFmin(ImageHeader self, float value)"""
1990 return _IMP_em.ImageHeader_set_fFmin(self, value)
1993 r"""get_fAv(ImageHeader self) -> float"""
1994 return _IMP_em.ImageHeader_get_fAv(self)
1996 def set_fAv(self, value):
1997 r"""set_fAv(ImageHeader self, float value)"""
1998 return _IMP_em.ImageHeader_set_fAv(self, value)
2001 r"""get_fSig(ImageHeader self) -> float"""
2002 return _IMP_em.ImageHeader_get_fSig(self)
2004 def set_fSig(self, value):
2005 r"""set_fSig(ImageHeader self, float value)"""
2006 return _IMP_em.ImageHeader_set_fSig(self, value)
2008 def get_fIhist(self):
2009 r"""get_fIhist(ImageHeader self) -> float"""
2010 return _IMP_em.ImageHeader_get_fIhist(self)
2012 def set_fIhist(self, value):
2013 r"""set_fIhist(ImageHeader self, float value)"""
2014 return _IMP_em.ImageHeader_set_fIhist(self, value)
2016 def get_fLabrec(self):
2017 r"""get_fLabrec(ImageHeader self) -> float"""
2018 return _IMP_em.ImageHeader_get_fLabrec(self)
2020 def set_fLabrec(self, value):
2021 r"""set_fLabrec(ImageHeader self, float value)"""
2022 return _IMP_em.ImageHeader_set_fLabrec(self, value)
2024 def get_fIangle(self):
2025 r"""get_fIangle(ImageHeader self) -> float"""
2026 return _IMP_em.ImageHeader_get_fIangle(self)
2028 def set_fIangle(self, value):
2029 r"""set_fIangle(ImageHeader self, float value)"""
2030 return _IMP_em.ImageHeader_set_fIangle(self, value)
2032 def get_origin(self):
2033 r"""get_origin(ImageHeader self) -> Vector3D"""
2034 return _IMP_em.ImageHeader_get_origin(self)
2036 def set_origin(self, *args):
2038 set_origin(ImageHeader self, Vector3D v)
2039 set_origin(ImageHeader self, Vector2D v)
2041 return _IMP_em.ImageHeader_set_origin(self, *args)
2043 def get_object_pixel_size(self):
2044 r"""get_object_pixel_size(ImageHeader self) -> float"""
2045 return _IMP_em.ImageHeader_get_object_pixel_size(self)
2047 def set_object_pixel_size(self, value):
2048 r"""set_object_pixel_size(ImageHeader self, float value)"""
2049 return _IMP_em.ImageHeader_set_object_pixel_size(self, value)
2051 def get_fLabbyt(self):
2052 r"""get_fLabbyt(ImageHeader self) -> float"""
2053 return _IMP_em.ImageHeader_get_fLabbyt(self)
2055 def set_fLabbyt(self, value):
2056 r"""set_fLabbyt(ImageHeader self, float value)"""
2057 return _IMP_em.ImageHeader_set_fLabbyt(self, value)
2059 def get_fLenbyt(self):
2060 r"""get_fLenbyt(ImageHeader self) -> float"""
2061 return _IMP_em.ImageHeader_get_fLenbyt(self)
2063 def set_fLenbyt(self, value):
2064 r"""set_fLenbyt(ImageHeader self, float value)"""
2065 return _IMP_em.ImageHeader_set_fLenbyt(self, value)
2067 def get_fGeo_matrix(self, i, j):
2068 r"""get_fGeo_matrix(ImageHeader self, unsigned int i, unsigned int j) -> double"""
2069 return _IMP_em.ImageHeader_get_fGeo_matrix(self, i, j)
2071 def get_fFlag(self):
2072 r"""get_fFlag(ImageHeader self) -> float"""
2073 return _IMP_em.ImageHeader_get_fFlag(self)
2075 def set_fFlag(self, value):
2076 r"""set_fFlag(ImageHeader self, float value)"""
2077 return _IMP_em.ImageHeader_set_fFlag(self, value)
2079 def get_euler_angles(self):
2080 r"""get_euler_angles(ImageHeader self) -> Vector3D"""
2081 return _IMP_em.ImageHeader_get_euler_angles(self)
2083 def get_euler_angles1(self):
2084 r"""get_euler_angles1(ImageHeader self) -> Vector3D"""
2085 return _IMP_em.ImageHeader_get_euler_angles1(self)
2087 def get_euler_angles2(self):
2088 r"""get_euler_angles2(ImageHeader self) -> Vector3D"""
2089 return _IMP_em.ImageHeader_get_euler_angles2(self)
2091 def set_euler_angles(self, euler):
2092 r"""set_euler_angles(ImageHeader self, Vector3D euler)"""
2093 return _IMP_em.ImageHeader_set_euler_angles(self, euler)
2095 def set_euler_angles1(self, euler):
2096 r"""set_euler_angles1(ImageHeader self, Vector3D euler)"""
2097 return _IMP_em.ImageHeader_set_euler_angles1(self, euler)
2099 def set_euler_angles2(self, euler):
2100 r"""set_euler_angles2(ImageHeader self, Vector3D euler)"""
2101 return _IMP_em.ImageHeader_set_euler_angles2(self, euler)
2103 def is_normalized(self):
2104 r"""is_normalized(ImageHeader self) -> bool"""
2105 return _IMP_em.ImageHeader_is_normalized(self)
2108 r"""set_date(ImageHeader self)"""
2109 return _IMP_em.ImageHeader_set_date(self)
2112 r"""set_time(ImageHeader self)"""
2113 return _IMP_em.ImageHeader_set_time(self)
2115 def set_title(self, newName):
2116 r"""set_title(ImageHeader self, IMP::String newName)"""
2117 return _IMP_em.ImageHeader_set_title(self, newName)
2118 __swig_destroy__ = _IMP_em.delete_ImageHeader
2121 _IMP_em.ImageHeader_swigregister(ImageHeader)
2122 class SpiderMapReaderWriter(MapReaderWriter):
2123 r"""Proxy of C++ IMP::em::SpiderMapReaderWriter class."""
2125 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2126 filename_ = property(_IMP_em.SpiderMapReaderWriter_filename__get, _IMP_em.SpiderMapReaderWriter_filename__set, doc=
r"""filename_ : IMP::String""")
2127 skip_type_check_ = property(_IMP_em.SpiderMapReaderWriter_skip_type_check__get, _IMP_em.SpiderMapReaderWriter_skip_type_check__set, doc=
r"""skip_type_check_ : bool""")
2128 force_reversed_ = property(_IMP_em.SpiderMapReaderWriter_force_reversed__get, _IMP_em.SpiderMapReaderWriter_force_reversed__set, doc=
r"""force_reversed_ : bool""")
2129 skip_extra_checkings_ = property(_IMP_em.SpiderMapReaderWriter_skip_extra_checkings__get, _IMP_em.SpiderMapReaderWriter_skip_extra_checkings__set, doc=
r"""skip_extra_checkings_ : bool""")
2131 def __init__(self, *args):
2133 __init__(SpiderMapReaderWriter self) -> SpiderMapReaderWriter
2134 __init__(SpiderMapReaderWriter self, IMP::String filename, bool skip_type_check, bool force_reversed, bool skip_extra_checkings) -> SpiderMapReaderWriter
2136 _IMP_em.SpiderMapReaderWriter_swiginit(self, _IMP_em.new_SpiderMapReaderWriter(*args))
2137 __swig_destroy__ = _IMP_em.delete_SpiderMapReaderWriter
2140 r"""__str__(SpiderMapReaderWriter self) -> std::string"""
2141 return _IMP_em.SpiderMapReaderWriter___str__(self)
2144 r"""__repr__(SpiderMapReaderWriter self) -> std::string"""
2145 return _IMP_em.SpiderMapReaderWriter___repr__(self)
2149 return _object_cast_to_SpiderMapReaderWriter(o)
2153 _IMP_em.SpiderMapReaderWriter_swigregister(SpiderMapReaderWriter)
2154 class FittingSolutions(object):
2155 r"""Proxy of C++ IMP::em::FittingSolutions class."""
2157 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2160 r"""__init__(FittingSolutions self) -> FittingSolutions"""
2161 _IMP_em.FittingSolutions_swiginit(self, _IMP_em.new_FittingSolutions())
2163 def get_number_of_solutions(self):
2164 r"""get_number_of_solutions(FittingSolutions self) -> int"""
2165 return _IMP_em.FittingSolutions_get_number_of_solutions(self)
2167 def get_transformation(self, i):
2168 r"""get_transformation(FittingSolutions self, unsigned int i) -> Transformation3D"""
2169 return _IMP_em.FittingSolutions_get_transformation(self, i)
2171 def get_score(self, i):
2172 r"""get_score(FittingSolutions self, unsigned int i) -> IMP::Float"""
2173 return _IMP_em.FittingSolutions_get_score(self, i)
2175 def set_score(self, i, score):
2176 r"""set_score(FittingSolutions self, unsigned int i, IMP::Float score)"""
2177 return _IMP_em.FittingSolutions_set_score(self, i, score)
2179 def add_solution(self, t, score):
2180 r"""add_solution(FittingSolutions self, Transformation3D t, IMP::Float score)"""
2181 return _IMP_em.FittingSolutions_add_solution(self, t, score)
2183 def sort(self, reverse=False):
2184 r"""sort(FittingSolutions self, bool reverse=False)"""
2185 return _IMP_em.FittingSolutions_sort(self, reverse)
2188 r"""multiply(FittingSolutions self, Transformation3D t)"""
2189 return _IMP_em.FittingSolutions_multiply(self, t)
2191 def get_transformations(self):
2192 r"""get_transformations(FittingSolutions self) -> IMP::algebra::Transformation3Ds"""
2193 return _IMP_em.FittingSolutions_get_transformations(self)
2195 def show(self, *args):
2196 r"""show(FittingSolutions self, _ostream out=std::cout)"""
2197 return _IMP_em.FittingSolutions_show(self, *args)
2200 r"""__str__(FittingSolutions self) -> std::string"""
2201 return _IMP_em.FittingSolutions___str__(self)
2204 r"""__repr__(FittingSolutions self) -> std::string"""
2205 return _IMP_em.FittingSolutions___repr__(self)
2207 def _get_as_binary(self):
2208 r"""_get_as_binary(FittingSolutions self) -> PyObject *"""
2209 return _IMP_em.FittingSolutions__get_as_binary(self)
2211 def _set_from_binary(self, p):
2212 r"""_set_from_binary(FittingSolutions self, PyObject * p)"""
2213 return _IMP_em.FittingSolutions__set_from_binary(self, p)
2215 def __getstate__(self):
2216 p = self._get_as_binary()
2217 if len(self.__dict__) > 1:
2218 d = self.__dict__.copy()
2223 def __setstate__(self, p):
2224 if not hasattr(self,
'this'):
2226 if isinstance(p, tuple):
2228 self.__dict__.update(d)
2229 return self._set_from_binary(p)
2231 __swig_destroy__ = _IMP_em.delete_FittingSolutions
2234 _IMP_em.FittingSolutions_swigregister(FittingSolutions)
2236 def local_rigid_fitting_around_point(p, refiner, weight_key, dmap, anchor_centroid, display_log, number_of_optimization_runs=5, number_of_mc_steps=10, number_of_cg_steps=100, max_translation=2., max_rotation=.3, fast=False):
2237 r"""local_rigid_fitting_around_point(Particle p, Refiner refiner, FloatKey weight_key, DensityMap dmap, Vector3D anchor_centroid, IMP::OptimizerStates display_log, IMP::Int number_of_optimization_runs=5, IMP::Int number_of_mc_steps=10, IMP::Int number_of_cg_steps=100, IMP::Float max_translation=2., IMP::Float max_rotation=.3, bool fast=False) -> FittingSolutions"""
2238 return _IMP_em.local_rigid_fitting_around_point(p, refiner, weight_key, dmap, anchor_centroid, display_log, number_of_optimization_runs, number_of_mc_steps, number_of_cg_steps, max_translation, max_rotation, fast)
2240 def local_rigid_fitting(p, refiner, weight_key, dmap, display_log, number_of_optimization_runs=5, number_of_mc_steps=10, number_of_cg_steps=100, max_translation=2., max_rotation=.3, fast=True):
2241 r"""local_rigid_fitting(Particle p, Refiner refiner, FloatKey weight_key, DensityMap dmap, IMP::OptimizerStates display_log, IMP::Int number_of_optimization_runs=5, IMP::Int number_of_mc_steps=10, IMP::Int number_of_cg_steps=100, IMP::Float max_translation=2., IMP::Float max_rotation=.3, bool fast=True) -> FittingSolutions"""
2242 return _IMP_em.local_rigid_fitting(p, refiner, weight_key, dmap, display_log, number_of_optimization_runs, number_of_mc_steps, number_of_cg_steps, max_translation, max_rotation, fast)
2244 def local_rigid_fitting_around_points(p, refiner, wei_key, dmap, anchor_centroids, display_log, number_of_optimization_runs=5, number_of_mc_steps=10, number_of_cg_steps=100, max_translation=2., max_rotation=.3):
2245 r"""local_rigid_fitting_around_points(Particle p, Refiner refiner, FloatKey wei_key, DensityMap dmap, IMP::algebra::Vector3Ds const & anchor_centroids, IMP::OptimizerStates display_log, IMP::Int number_of_optimization_runs=5, IMP::Int number_of_mc_steps=10, IMP::Int number_of_cg_steps=100, IMP::Float max_translation=2., IMP::Float max_rotation=.3) -> FittingSolutions"""
2246 return _IMP_em.local_rigid_fitting_around_points(p, refiner, wei_key, dmap, anchor_centroids, display_log, number_of_optimization_runs, number_of_mc_steps, number_of_cg_steps, max_translation, max_rotation)
2248 def local_rigid_fitting_grid_search(ps, wei_key, dmap, max_voxels_translation=2, translation_step=1, max_angle_in_radians=0.174, number_of_rotations=100):
2249 r"""local_rigid_fitting_grid_search(IMP::ParticlesTemp const & ps, FloatKey wei_key, DensityMap dmap, IMP::Int max_voxels_translation=2, IMP::Int translation_step=1, IMP::Float max_angle_in_radians=0.174, IMP::Int number_of_rotations=100) -> FittingSolutions"""
2250 return _IMP_em.local_rigid_fitting_grid_search(ps, wei_key, dmap, max_voxels_translation, translation_step, max_angle_in_radians, number_of_rotations)
2254 compute_fitting_scores(IMP::ParticlesTemp const & ps, DensityMap em_map, IMP::algebra::Transformation3Ds const & transformations, bool fast_version=False, bool local_score=False, FloatKey wei_key=IMP::atom::Mass::get_mass_key()) -> FittingSolutions
2255 compute_fitting_scores(DensityMap em_map, RigidBody rb, Refiner refiner, IMP::algebra::Transformation3Ds const & transformations) -> FittingSolutions
2257 return _IMP_em.compute_fitting_scores(*args)
2260 r"""compute_fitting_score(IMP::ParticlesTemp const & ps, DensityMap em_map, FloatKey wei_key=IMP::atom::Mass::get_mass_key()) -> IMP::Float"""
2261 return _IMP_em.compute_fitting_score(*args)
2264 r"""get_number_of_particles_outside_of_the_density(DensityMap dmap, IMP::Particles const & ps, Transformation3D t=IMP::algebra::get_identity_transformation_3d(), float thr=0.0) -> long"""
2265 return _IMP_em.get_number_of_particles_outside_of_the_density(*args)
2268 r"""get_numbers_of_particles_outside_of_the_density(DensityMap dmap, IMP::Particles const & ps, IMP::algebra::Transformation3Ds const & transformations, float thr=0.0) -> IMP::Ints"""
2269 return _IMP_em.get_numbers_of_particles_outside_of_the_density(dmap, ps, transformations, thr)
2272 r"""get_percentage_of_voxels_covered_by_particles(DensityMap dmap, IMP::Particles const & ps, float smoothing_radius=3., Transformation3D t=IMP::algebra::get_identity_transformation_3d(), float thr=0.0) -> double"""
2273 return _IMP_em.get_percentage_of_voxels_covered_by_particles(*args)
2275 r"""Proxy of C++ IMP::em::HighDensityEmbedding class."""
2277 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2279 def __init__(self, dm, threshold):
2280 r"""__init__(HighDensityEmbedding self, DensityMap dm, double threshold) -> HighDensityEmbedding"""
2281 _IMP_em.HighDensityEmbedding_swiginit(self, _IMP_em.new_HighDensityEmbedding(dm, threshold))
2283 def get_version_info(self):
2284 r"""get_version_info(HighDensityEmbedding self) -> VersionInfo"""
2285 return _IMP_em.HighDensityEmbedding_get_version_info(self)
2286 __swig_destroy__ = _IMP_em.delete_HighDensityEmbedding
2289 r"""__str__(HighDensityEmbedding self) -> std::string"""
2290 return _IMP_em.HighDensityEmbedding___str__(self)
2293 r"""__repr__(HighDensityEmbedding self) -> std::string"""
2294 return _IMP_em.HighDensityEmbedding___repr__(self)
2298 return _object_cast_to_HighDensityEmbedding(o)
2302 _IMP_em.HighDensityEmbedding_swigregister(HighDensityEmbedding)
2305 r"""mask_and_norm(DensityMap dmap, DensityMap mask) -> DensityMap"""
2306 return _IMP_em.mask_and_norm(dmap, mask)
2309 r"""get_volume_at_threshold(DensityMap m, IMP::Float threshold) -> IMP::Float"""
2310 return _IMP_em.get_volume_at_threshold(m, threshold)
2313 r"""get_molecular_mass_at_threshold(DensityMap m, IMP::Float threshold, IMP::atom::ProteinDensityReference ref=HARPAZ) -> IMP::Float"""
2314 return _IMP_em.get_molecular_mass_at_threshold(*args)
2317 r"""get_threshold_for_approximate_volume(DensityMap m, IMP::Float desired_volume) -> IMP::Float"""
2318 return _IMP_em.get_threshold_for_approximate_volume(m, desired_volume)
2321 r"""get_threshold_for_approximate_mass(DensityMap m, IMP::Float desired_mass, IMP::atom::ProteinDensityReference ref=HARPAZ) -> IMP::Float"""
2322 return _IMP_em.get_threshold_for_approximate_mass(*args)
2324 r"""Proxy of C++ IMP::em::EnvelopePenetrationRestraint class."""
2326 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2328 def __init__(self, ps, em_map, threshold):
2329 r"""__init__(EnvelopePenetrationRestraint self, IMP::Particles ps, DensityMap em_map, IMP::Float threshold) -> EnvelopePenetrationRestraint"""
2330 _IMP_em.EnvelopePenetrationRestraint_swiginit(self, _IMP_em.new_EnvelopePenetrationRestraint(ps, em_map, threshold))
2332 def do_get_inputs(self):
2333 r"""do_get_inputs(EnvelopePenetrationRestraint self) -> IMP::ModelObjectsTemp"""
2334 return _IMP_em.EnvelopePenetrationRestraint_do_get_inputs(self)
2336 def get_version_info(self):
2337 r"""get_version_info(EnvelopePenetrationRestraint self) -> VersionInfo"""
2338 return _IMP_em.EnvelopePenetrationRestraint_get_version_info(self)
2339 __swig_destroy__ = _IMP_em.delete_EnvelopePenetrationRestraint
2342 r"""__str__(EnvelopePenetrationRestraint self) -> std::string"""
2343 return _IMP_em.EnvelopePenetrationRestraint___str__(self)
2346 r"""__repr__(EnvelopePenetrationRestraint self) -> std::string"""
2347 return _IMP_em.EnvelopePenetrationRestraint___repr__(self)
2351 return _object_cast_to_EnvelopePenetrationRestraint(o)
2355 _IMP_em.EnvelopePenetrationRestraint_swigregister(EnvelopePenetrationRestraint)
2357 r"""Proxy of C++ IMP::em::PCAFitRestraint class."""
2359 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2361 def __init__(self, *args):
2362 r"""__init__(PCAFitRestraint self, IMP::ParticlesTemp ps, DensityMap em_map, float threshold, float max_pca_size_diff, float max_angle_diff, float max_centroid_diff, FloatKey weight_key=IMP::atom::Mass::get_mass_key()) -> PCAFitRestraint"""
2363 _IMP_em.PCAFitRestraint_swiginit(self, _IMP_em.new_PCAFitRestraint(*args))
2365 def do_get_inputs(self):
2366 r"""do_get_inputs(PCAFitRestraint self) -> IMP::ModelObjectsTemp"""
2367 return _IMP_em.PCAFitRestraint_do_get_inputs(self)
2369 def get_version_info(self):
2370 r"""get_version_info(PCAFitRestraint self) -> VersionInfo"""
2371 return _IMP_em.PCAFitRestraint_get_version_info(self)
2372 __swig_destroy__ = _IMP_em.delete_PCAFitRestraint
2375 r"""__str__(PCAFitRestraint self) -> std::string"""
2376 return _IMP_em.PCAFitRestraint___str__(self)
2379 r"""__repr__(PCAFitRestraint self) -> std::string"""
2380 return _IMP_em.PCAFitRestraint___repr__(self)
2384 return _object_cast_to_PCAFitRestraint(o)
2388 _IMP_em.PCAFitRestraint_swigregister(PCAFitRestraint)
2390 r"""Proxy of C++ IMP::em::EnvelopeFitRestraint class."""
2392 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2394 def __init__(self, particles, em_map, density_threshold, penetration_threshold):
2395 r"""__init__(EnvelopeFitRestraint self, IMP::Particles particles, DensityMap em_map, double density_threshold, double penetration_threshold) -> EnvelopeFitRestraint"""
2396 _IMP_em.EnvelopeFitRestraint_swiginit(self, _IMP_em.new_EnvelopeFitRestraint(particles, em_map, density_threshold, penetration_threshold))
2398 def get_transformation(self):
2399 r"""get_transformation(EnvelopeFitRestraint self) -> Transformation3D"""
2400 return _IMP_em.EnvelopeFitRestraint_get_transformation(self)
2402 def apply_transformation(self):
2403 r"""apply_transformation(EnvelopeFitRestraint self)"""
2404 return _IMP_em.EnvelopeFitRestraint_apply_transformation(self)
2406 def do_get_inputs(self):
2407 r"""do_get_inputs(EnvelopeFitRestraint self) -> IMP::ModelObjectsTemp"""
2408 return _IMP_em.EnvelopeFitRestraint_do_get_inputs(self)
2410 def get_version_info(self):
2411 r"""get_version_info(EnvelopeFitRestraint self) -> VersionInfo"""
2412 return _IMP_em.EnvelopeFitRestraint_get_version_info(self)
2413 __swig_destroy__ = _IMP_em.delete_EnvelopeFitRestraint
2416 r"""__str__(EnvelopeFitRestraint self) -> std::string"""
2417 return _IMP_em.EnvelopeFitRestraint___str__(self)
2420 r"""__repr__(EnvelopeFitRestraint self) -> std::string"""
2421 return _IMP_em.EnvelopeFitRestraint___repr__(self)
2425 return _object_cast_to_EnvelopeFitRestraint(o)
2429 _IMP_em.EnvelopeFitRestraint_swigregister(EnvelopeFitRestraint)
2430 class MapDistanceTransform(DensityMap):
2431 r"""Proxy of C++ IMP::em::MapDistanceTransform class."""
2433 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2435 def __init__(self, map, density_threshold, max_distance):
2436 r"""__init__(MapDistanceTransform self, DensityMap map, float density_threshold, float max_distance) -> MapDistanceTransform"""
2437 _IMP_em.MapDistanceTransform_swiginit(self, _IMP_em.new_MapDistanceTransform(map, density_threshold, max_distance))
2439 def get_distance_from_envelope(self, v):
2440 r"""get_distance_from_envelope(MapDistanceTransform self, Vector3D v) -> float"""
2441 return _IMP_em.MapDistanceTransform_get_distance_from_envelope(self, v)
2444 r"""__str__(MapDistanceTransform self) -> std::string"""
2445 return _IMP_em.MapDistanceTransform___str__(self)
2448 r"""__repr__(MapDistanceTransform self) -> std::string"""
2449 return _IMP_em.MapDistanceTransform___repr__(self)
2453 return _object_cast_to_MapDistanceTransform(o)
2455 __swig_destroy__ = _IMP_em.delete_MapDistanceTransform
2458 _IMP_em.MapDistanceTransform_swigregister(MapDistanceTransform)
2460 r"""Proxy of C++ IMP::em::EnvelopeScore class."""
2462 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2464 def __init__(self, mdt):
2465 r"""__init__(EnvelopeScore self, MapDistanceTransform mdt) -> EnvelopeScore"""
2466 _IMP_em.EnvelopeScore_swiginit(self, _IMP_em.new_EnvelopeScore(mdt))
2468 def is_penetrating(self, *args):
2470 is_penetrating(EnvelopeScore self, IMP::algebra::Vector3Ds const & points, float penetration_thr) -> bool
2471 is_penetrating(EnvelopeScore self, IMP::algebra::Vector3Ds const & points, Transformation3D trans, float penetration_thr) -> bool
2473 return _IMP_em.EnvelopeScore_is_penetrating(self, *args)
2475 def score(self, *args):
2477 score(EnvelopeScore self, IMP::algebra::Vector3Ds const & points) -> double
2478 score(EnvelopeScore self, IMP::algebra::Vector3Ds const & points, Transformation3D trans) -> double
2480 return _IMP_em.EnvelopeScore_score(self, *args)
2481 __swig_destroy__ = _IMP_em.delete_EnvelopeScore
2484 r"""__str__(EnvelopeScore self) -> std::string"""
2485 return _IMP_em.EnvelopeScore___str__(self)
2488 r"""__repr__(EnvelopeScore self) -> std::string"""
2489 return _IMP_em.EnvelopeScore___repr__(self)
2493 return _object_cast_to_EnvelopeScore(o)
2497 _IMP_em.EnvelopeScore_swigregister(EnvelopeScore)
2502 """Write out principal components to a file in Chimera Marker format"""
2503 eigen_values = pca.get_principal_values()
2504 eigen_vecs = pca.get_principal_components()
2505 centroid = pca.get_centroid()
2507 fh.write(
"<marker_set>\n")
2508 fh.write(
"<!-- PCA with eigen values: (%g,%g,%g) and "
2509 "centroid (%g,%g,%g) -->\n"
2510 % (math.sqrt(eigen_values[0]),
2511 math.sqrt(eigen_values[1]),
2512 math.sqrt(eigen_values[2]),
2513 centroid[0], centroid[1], centroid[2]))
2518 val = math.sqrt(eigen_values[i])
2519 v1 = centroid - val * eigen_vecs[i]
2520 v2 = centroid + val * eigen_vecs[i]
2521 for markerid, v
in ((i*2+1, v1), (i*2+2, v2)):
2522 fh.write(
"<marker id=\"%d\" x=\"%g\" y=\"%g\" z=\"%g\" "
2524 % (markerid, v[0], v[1], v[2], radius))
2526 for i
in range(1, 7, 2):
2527 fh.write(
"<link id1= \"%d\" id2=\"%d\" radius=\"%g\"/>\n"
2529 fh.write(
"</marker_set>\n")
2533 r"""get_module_version() -> std::string const"""
2534 return _IMP_em.get_module_version()
2537 r"""get_example_path(std::string fname) -> std::string"""
2538 return _IMP_em.get_example_path(fname)
2541 r"""get_data_path(std::string fname) -> std::string"""
2542 return _IMP_em.get_data_path(fname)
2544 from .
import _version_check
double bayesem3d_linear_interpolate(const Floats &x_data, const Floats &y_data, double x, bool extrapolate)
Basic linear interpolation given vectors of values.
Float get_threshold_for_approximate_mass(DensityMap *m, Float desired_mass, atom::ProteinDensityReference ref=atom::HARPAZ)
Computes the threshold to consider in an EM map to get a desired mass.
DensityMap * interpolate_map(DensityMap *in_map, double new_spacing)
Return a new map with an updated spacing.
Particles density2particles(DensityMap *dmap, Float threshold, Model *m, int step=1)
Convert a density grid to a set of particles.
algebra::Vector3Ds density2vectors(DensityMap *dmap, Float threshold)
Convert a density grid to a set of vectors.
algebra::BoundingBoxD< 3 > get_bounding_box(const DensityMap *m, Float threshold)
Get the bounding box for a map.
std::string get_module_version()
Return the version of this module, as a string.
DensityMap * bayesem3d_get_density_from_particle(DensityMap *em, const IMP::ParticlesTemp &ps, double resolution, const double window_size=1.0)
Ints get_numbers_of_particles_outside_of_the_density(DensityMap *dmap, const Particles &ps, const IMP::algebra::Transformation3Ds &transformations, float thr=0.0)
Get numbers of particles (mult transforms) that are outside the density.
double bayesem3d_get_logsumexp(double x, double y)
Numerically stable logsumexp.
double get_coarse_cc_coefficient(const DensityMap *grid1, const DensityMap *grid2, double grid2_voxel_data_threshold, bool allow_padding=false, FloatPair norm_factors=FloatPair(0., 0.))
Calculates the cross correlation coefficient between two maps.
Various classes to hold sets of particles.
std::vector< double > bayesem3d_get_value(Particle *p, const algebra::Vector3D &pt, double mass_ii, const IMP::em::KernelParameters &kps)
Compute the score and derivatives for a particle at a given voxel.
DensityMap * binarize(DensityMap *orig_map, float threshold, bool reverse=false)
Return a map with 0 for all voxels below the threshold and 1 for those above.
double get_sum(const DensityMap *m1)
Return the sum of all voxels.
SampledDensityMap * particles2binarized_density(const ParticlesTemp &ps, Float resolution, Float apix, int sig_cutoff=3, const FloatKey &weight_key=IMP::atom::Mass::get_mass_key())
Make CGAL functionality available to IMP.
DensityMap * mask_and_norm(em::DensityMap *dmap, em::DensityMap *mask)
Return a masked density, and normalize the output map within the mask region.
FittingSolutions compute_fitting_scores(const ParticlesTemp &ps, DensityMap *em_map, const algebra::Transformation3Ds &transformations, bool fast_version=false, bool local_score=false, const FloatKey &wei_key=atom::Mass::get_mass_key())
Compute fitting scores for a given set of rigid transformations.
DensityMap * get_threshold_map(const DensityMap *orig_map, float threshold)
Return a map with 0 for all voxels below the threshold.
DensityMap * get_segment_by_masking(DensityMap *map_to_segment, DensityMap *mask, float mas_threshold)
Get a segment of the map covered by another map.
FloatPair bayesem3d_get_logabssumexp(double x, double y, double sx, double sy)
Numerically stable logabssumexp.
std::string get_data_path(std::string file_name)
Return the full path to one of this module's data files.
SampledDensityMap * particles2density(const ParticlesTemp &ps, Float resolution, Float apix, int sig_cutoff=3, const FloatKey &weight_key=IMP::atom::Mass::get_mass_key())
Resample a set of particles into a density grid.
double get_coarse_cc_score(DensityMap *data, SampledDensityMap *model_map, double scalefactor, bool recalc_rms=true, bool resample=true, FloatPair norm_factors=FloatPair(0., 0.))
Calculates the value of the EM fitting term.
std::pair< double, algebra::Vector3Ds > bayesem3d_get_score_and_derivative(DensityMap *em, const IMP::ParticlesTemp &ps, double resolution, double sigma, const double window_size=1.0)
The function returns the negative log of the Normal distributed difference between a normalized EM de...
Composable functors to implement scores via compile-time composition.
Code to compute statistical measures.
algebra::GridD< 3, algebra::DenseGridStorageD< 3, float >, float > get_grid(DensityMap *in_map)
Return a dense grid containing the voxels of the passed density map.
void bayesem3d_get_normalized_intensities(DensityMap *em, const IMP::ParticlesTemp &ps, double resolution)
FloatPair bayesem3d_get_em_density_squared(DensityMap *em, long number_of_voxels)
Compute the sum of the density and the sum of the squares of the density.
def write_pca_cmm
Write out principal components to a file in Chimera Marker format.
double convolute(const DensityMap *m1, const DensityMap *m2)
Return a convolution between density maps m1 and m2.
Common base class for heavy weight IMP objects.
DensityMap * multiply(const DensityMap *m1, const DensityMap *m2)
Return a density map for which voxel i contains the result of m1[i]*m2[i].
std::map< double, int > bayesem3d_get_distinct_and_counts(DensityMap *em)
Get histogram of density in EM map.
DensityHeader create_density_header(const algebra::BoundingBoxD< 3 > &bb, float spacing)
Create a header from a bounding box in 3D.
Float compute_fitting_score(const ParticlesTemp &ps, DensityMap *em_map, FloatKey wei_key=atom::Mass::get_mass_key())
Compute fitting scores for a given set of rigid transformations.
double get_coarse_cc_local_coefficient(const DensityMap *em_map, DensityMap *model_map, double voxel_data_threshold)
Local cross correlation function.
double bayesem3d_get_cross_correlation_coefficient(const DensityMap *em1, const DensityMap *em2)
Compute a normalized cross-correlation coefficient.
Floats bayesem3d_get_cumulative_sum(DensityMap *em)
Compute the cumulative sum of the histogram computed from EM map.
FittingSolutions local_rigid_fitting_around_point(Particle *p, Refiner *refiner, const FloatKey &weight_key, DensityMap *dmap, const algebra::Vector3D &anchor_centroid, OptimizerStates display_log, Int number_of_optimization_runs=5, Int number_of_mc_steps=10, Int number_of_cg_steps=100, Float max_translation=2., Float max_rotation=.3, bool fast=false)
Local rigid fitting of a rigid body around a center point.
double bayesem3d_get_logsumprodexp(double x, double y, double wx, double wy)
Numerically stable logsumexpprod.
std::vector< double > bayesem3d_get_value_no_deriv(Particle *p, const algebra::Vector3D &pt, double mass_ii, const IMP::em::KernelParameters &kps)
Compute the score without its derivative.
long get_number_of_particles_outside_of_the_density(DensityMap *dmap, const Particles &ps, const IMP::algebra::Transformation3D &t=IMP::algebra::get_identity_transformation_3d(), float thr=0.0)
Get the number of particles that are outside of the density.
DensityMap * get_max_map(DensityMaps maps)
Return a map where each voxel is the maximum value from the input maps.
DensityMap * create_density_map(const DensityMap *other)
Create a copy of another map.
Store data to be clustered for embedding based algorithms.
Float approximate_molecular_mass(DensityMap *m, Float threshold)
Estimate the molecular mass from a map.
std::map< double, double > bayesem3d_get_cumulative_sum_with_reference(DensityMap *em)
Compute the cumulative sum of the histogram given a reference.
double get_percentage_of_voxels_covered_by_particles(DensityMap *dmap, const Particles &ps, float smoothing_radius=3., const IMP::algebra::Transformation3D &t=IMP::algebra::get_identity_transformation_3d(), float thr=0.0)
Get the number of density voxels that are not covered by particles.
Vector3D get_centroid(const Vector3Ds &ps)
Return the centroid of a set of vectors.
std::ostream & show(Hierarchy h, std::ostream &out=std::cout)
Print the hierarchy using a given decorator to display each node.
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
FittingSolutions local_rigid_fitting(Particle *p, Refiner *refiner, const FloatKey &weight_key, DensityMap *dmap, OptimizerStates display_log, Int number_of_optimization_runs=5, Int number_of_mc_steps=10, Int number_of_cg_steps=100, Float max_translation=2., Float max_rotation=.3, bool fast=true)
Local rigid fitting of a rigid body.
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...
SurfaceShellDensityMap * particles2surface(const ParticlesTemp &ps, Float apix, const FloatKey &weight_key=IMP::atom::Mass::get_mass_key())
Resample a set of particles into a density grid.
FittingSolutions local_rigid_fitting_around_points(Particle *p, Refiner *refiner, const FloatKey &wei_key, DensityMap *dmap, const algebra::Vector3Ds &anchor_centroids, OptimizerStates display_log, Int number_of_optimization_runs=5, Int number_of_mc_steps=10, Int number_of_cg_steps=100, Float max_translation=2., Float max_rotation=.3)
Local rigid fitting of a rigid body around a set of center points.
FittingSolutions local_rigid_fitting_grid_search(const ParticlesTemp &ps, const FloatKey &wei_key, DensityMap *dmap, Int max_voxels_translation=2, Int translation_step=1, Float max_angle_in_radians=0.174, Int number_of_rotations=100)
Local grid search rigid fitting.
double get_resolution(Model *m, ParticleIndex pi)
Estimate the resolution of the hierarchy as used by Representation.
Output IMP model data in various file formats.
Functionality for loading, creating, manipulating and scoring atomic structures.
Float get_molecular_mass_at_threshold(DensityMap *m, Float threshold, atom::ProteinDensityReference ref=atom::HARPAZ)
Compute an approximate molecular mass.
DensityMap * get_segment(DensityMap *map_to_segment, int nx_start, int nx_end, int ny_start, int ny_end, int nz_start, int nz_end)
Get a segment of the map according to xyz indexes.
Float get_threshold_for_approximate_volume(DensityMap *m, Float desired_volume)
Computes the threshold consider in an EM map to get a desired volume.
Float get_volume_at_threshold(DensityMap *m, Float threshold)
Compute an approximate volume.
A restraint is a term in an IMP ScoringFunction.
FloatPair bayesem3d_get_logabssumprodexp(double x, double y, double wx, double wy)
Numerically stable logabssumprodexp.