14 from sys
import version_info
as _swig_python_version_info
18 import builtins
as __builtin__
24 strthis =
"proxy of " + self.this.__repr__()
25 except __builtin__.Exception:
27 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
30 def _swig_setattr_nondynamic_instance_variable(set):
31 def set_instance_attr(self, name, value):
33 set(self, name, value)
34 elif name ==
"thisown":
36 elif hasattr(self, name)
and isinstance(getattr(type(self), name), property):
37 set(self, name, value)
39 raise AttributeError(
"You cannot add instance attributes to %s" % self)
40 return set_instance_attr
43 def _swig_setattr_nondynamic_class_variable(set):
44 def set_class_attr(cls, name, value):
45 if hasattr(cls, name)
and not isinstance(getattr(cls, name), property):
48 raise AttributeError(
"You cannot add class attributes to %s" % cls)
52 def _swig_add_metaclass(metaclass):
53 """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
55 return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
59 class _SwigNonDynamicMeta(type):
60 """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
61 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
66 class IMP_EM_SwigPyIterator(object):
67 r"""Proxy of C++ swig::IMP_EM_SwigPyIterator class."""
69 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
71 def __init__(self, *args, **kwargs):
72 raise AttributeError(
"No constructor defined - class is abstract")
74 __swig_destroy__ = _IMP_em.delete_IMP_EM_SwigPyIterator
77 r"""value(IMP_EM_SwigPyIterator self) -> PyObject *"""
78 return _IMP_em.IMP_EM_SwigPyIterator_value(self)
81 r"""incr(IMP_EM_SwigPyIterator self, size_t n=1) -> IMP_EM_SwigPyIterator"""
82 return _IMP_em.IMP_EM_SwigPyIterator_incr(self, n)
85 r"""decr(IMP_EM_SwigPyIterator self, size_t n=1) -> IMP_EM_SwigPyIterator"""
86 return _IMP_em.IMP_EM_SwigPyIterator_decr(self, n)
88 def distance(self, x):
89 r"""distance(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> ptrdiff_t"""
90 return _IMP_em.IMP_EM_SwigPyIterator_distance(self, x)
93 r"""equal(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> bool"""
94 return _IMP_em.IMP_EM_SwigPyIterator_equal(self, x)
97 r"""copy(IMP_EM_SwigPyIterator self) -> IMP_EM_SwigPyIterator"""
98 return _IMP_em.IMP_EM_SwigPyIterator_copy(self)
101 r"""next(IMP_EM_SwigPyIterator self) -> PyObject *"""
102 return _IMP_em.IMP_EM_SwigPyIterator_next(self)
105 r"""__next__(IMP_EM_SwigPyIterator self) -> PyObject *"""
106 return _IMP_em.IMP_EM_SwigPyIterator___next__(self)
109 r"""previous(IMP_EM_SwigPyIterator self) -> PyObject *"""
110 return _IMP_em.IMP_EM_SwigPyIterator_previous(self)
112 def advance(self, n):
113 r"""advance(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator"""
114 return _IMP_em.IMP_EM_SwigPyIterator_advance(self, n)
117 r"""__eq__(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> bool"""
118 return _IMP_em.IMP_EM_SwigPyIterator___eq__(self, x)
121 r"""__ne__(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> bool"""
122 return _IMP_em.IMP_EM_SwigPyIterator___ne__(self, x)
124 def __iadd__(self, n):
125 r"""__iadd__(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator"""
126 return _IMP_em.IMP_EM_SwigPyIterator___iadd__(self, n)
128 def __isub__(self, n):
129 r"""__isub__(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator"""
130 return _IMP_em.IMP_EM_SwigPyIterator___isub__(self, n)
132 def __add__(self, n):
133 r"""__add__(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator"""
134 return _IMP_em.IMP_EM_SwigPyIterator___add__(self, n)
136 def __sub__(self, *args):
138 __sub__(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator
139 __sub__(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> ptrdiff_t
141 return _IMP_em.IMP_EM_SwigPyIterator___sub__(self, *args)
146 _IMP_em.IMP_EM_SwigPyIterator_swigregister(IMP_EM_SwigPyIterator)
153 IMP_DEBUG = _IMP_em.IMP_DEBUG
155 IMP_RELEASE = _IMP_em.IMP_RELEASE
157 IMP_SILENT = _IMP_em.IMP_SILENT
159 IMP_PROGRESS = _IMP_em.IMP_PROGRESS
161 IMP_TERSE = _IMP_em.IMP_TERSE
163 IMP_VERBOSE = _IMP_em.IMP_VERBOSE
165 IMP_MEMORY = _IMP_em.IMP_MEMORY
167 IMP_NONE = _IMP_em.IMP_NONE
169 IMP_USAGE = _IMP_em.IMP_USAGE
171 IMP_INTERNAL = _IMP_em.IMP_INTERNAL
173 IMP_KERNEL_HAS_LOG4CXX = _IMP_em.IMP_KERNEL_HAS_LOG4CXX
175 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_em.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
177 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_em.IMP_COMPILER_HAS_DEBUG_VECTOR
179 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_em.IMP_COMPILER_HAS_RANDOM_SHUFFLE
181 IMP_COMPILER_HAS_THREE_WAY = _IMP_em.IMP_COMPILER_HAS_THREE_WAY
183 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_em.IMP_KERNEL_HAS_BOOST_RANDOM
185 IMP_KERNEL_HAS_NUMPY = _IMP_em.IMP_KERNEL_HAS_NUMPY
187 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_em.IMP_KERNEL_HAS_GPERFTOOLS
189 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_em.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
191 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_em.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
193 IMPKERNEL_SHOW_WARNINGS = _IMP_em.IMPKERNEL_SHOW_WARNINGS
197 class _DirectorObjects:
198 """@internal Simple class to keep references to director objects
199 to prevent premature deletion."""
202 def register(self, obj):
203 """Take a reference to a director object; will only work for
204 refcounted C++ classes"""
205 if hasattr(obj,
'get_ref_count'):
206 self._objects.append(obj)
208 """Only drop our reference and allow cleanup by Python if no other
209 Python references exist (we hold 3 references: one in self._objects,
210 one in x, and one in the argument list for getrefcount) *and* no
211 other C++ references exist (the Python object always holds one)"""
212 objs = [x
for x
in self._objects
if sys.getrefcount(x) > 3 \
213 or x.get_ref_count() > 1]
217 def get_object_count(self):
218 """Get number of director objects (useful for testing only)"""
219 return len(self._objects)
220 _director_objects = _DirectorObjects()
222 class _ostream(object):
223 r"""Proxy of C++ std::ostream class."""
225 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
227 def __init__(self, *args, **kwargs):
228 raise AttributeError(
"No constructor defined")
229 __repr__ = _swig_repr
231 def write(self, osa_buf):
232 r"""write(_ostream self, char const * osa_buf)"""
233 return _IMP_em._ostream_write(self, osa_buf)
236 _IMP_em._ostream_swigregister(_ostream)
237 IMP_C_OPEN_BINARY = _IMP_em.IMP_C_OPEN_BINARY
240 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_CGAL_HAS_BOOST_FILESYSTEM
242 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
244 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_em.IMP_CGAL_HAS_BOOST_RANDOM
246 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_em.IMP_CGAL_HAS_BOOST_SYSTEM
248 IMP_CGAL_HAS_NUMPY = _IMP_em.IMP_CGAL_HAS_NUMPY
250 IMPCGAL_SHOW_WARNINGS = _IMP_em.IMPCGAL_SHOW_WARNINGS
253 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_em.IMP_ALGEBRA_HAS_IMP_CGAL
255 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
257 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
259 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_em.IMP_ALGEBRA_HAS_BOOST_RANDOM
261 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_em.IMP_ALGEBRA_HAS_BOOST_SYSTEM
263 IMP_ALGEBRA_HAS_CGAL = _IMP_em.IMP_ALGEBRA_HAS_CGAL
265 IMP_ALGEBRA_HAS_NUMPY = _IMP_em.IMP_ALGEBRA_HAS_NUMPY
267 IMP_ALGEBRA_HAS_ANN = _IMP_em.IMP_ALGEBRA_HAS_ANN
269 IMPALGEBRA_SHOW_WARNINGS = _IMP_em.IMPALGEBRA_SHOW_WARNINGS
272 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_em.IMP_DISPLAY_HAS_IMP_CGAL
274 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
276 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
278 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_em.IMP_DISPLAY_HAS_BOOST_RANDOM
280 IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_em.IMP_DISPLAY_HAS_BOOST_SYSTEM
282 IMP_DISPLAY_HAS_CGAL = _IMP_em.IMP_DISPLAY_HAS_CGAL
284 IMP_DISPLAY_HAS_NUMPY = _IMP_em.IMP_DISPLAY_HAS_NUMPY
286 IMPDISPLAY_SHOW_WARNINGS = _IMP_em.IMPDISPLAY_SHOW_WARNINGS
289 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_em.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
291 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
293 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
295 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_em.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
297 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_em.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
299 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_em.IMP_SCORE_FUNCTOR_HAS_CGAL
301 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_em.IMP_SCORE_FUNCTOR_HAS_HDF5
303 IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_em.IMP_SCORE_FUNCTOR_HAS_NUMPY
305 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_em.IMPSCOREFUNCTOR_SHOW_WARNINGS
308 IMP_STATISTICS_HAS_IMP_CGAL = _IMP_em.IMP_STATISTICS_HAS_IMP_CGAL
310 IMP_STATISTICS_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_STATISTICS_HAS_BOOST_FILESYSTEM
312 IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS
314 IMP_STATISTICS_HAS_BOOST_RANDOM = _IMP_em.IMP_STATISTICS_HAS_BOOST_RANDOM
316 IMP_STATISTICS_HAS_BOOST_SYSTEM = _IMP_em.IMP_STATISTICS_HAS_BOOST_SYSTEM
318 IMP_STATISTICS_HAS_CGAL = _IMP_em.IMP_STATISTICS_HAS_CGAL
320 IMP_STATISTICS_HAS_NUMPY = _IMP_em.IMP_STATISTICS_HAS_NUMPY
322 IMPSTATISTICS_SHOW_WARNINGS = _IMP_em.IMPSTATISTICS_SHOW_WARNINGS
325 IMP_CORE_HAS_IMP_CGAL = _IMP_em.IMP_CORE_HAS_IMP_CGAL
327 IMP_CORE_HAS_IMP_KERNEL = _IMP_em.IMP_CORE_HAS_IMP_KERNEL
329 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_CORE_HAS_BOOST_FILESYSTEM
331 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
333 IMP_CORE_HAS_BOOST_RANDOM = _IMP_em.IMP_CORE_HAS_BOOST_RANDOM
335 IMP_CORE_HAS_BOOST_SYSTEM = _IMP_em.IMP_CORE_HAS_BOOST_SYSTEM
337 IMP_CORE_HAS_CGAL = _IMP_em.IMP_CORE_HAS_CGAL
339 IMP_CORE_HAS_HDF5 = _IMP_em.IMP_CORE_HAS_HDF5
341 IMP_CORE_HAS_NUMPY = _IMP_em.IMP_CORE_HAS_NUMPY
343 IMPCORE_SHOW_WARNINGS = _IMP_em.IMPCORE_SHOW_WARNINGS
346 IMP_CONTAINER_HAS_IMP_ALGEBRA = _IMP_em.IMP_CONTAINER_HAS_IMP_ALGEBRA
348 IMP_CONTAINER_HAS_IMP_CGAL = _IMP_em.IMP_CONTAINER_HAS_IMP_CGAL
350 IMP_CONTAINER_HAS_IMP_DISPLAY = _IMP_em.IMP_CONTAINER_HAS_IMP_DISPLAY
352 IMP_CONTAINER_HAS_IMP_KERNEL = _IMP_em.IMP_CONTAINER_HAS_IMP_KERNEL
354 IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_em.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR
356 IMP_CONTAINER_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_CONTAINER_HAS_BOOST_FILESYSTEM
358 IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS
360 IMP_CONTAINER_HAS_BOOST_RANDOM = _IMP_em.IMP_CONTAINER_HAS_BOOST_RANDOM
362 IMP_CONTAINER_HAS_BOOST_SYSTEM = _IMP_em.IMP_CONTAINER_HAS_BOOST_SYSTEM
364 IMP_CONTAINER_HAS_CGAL = _IMP_em.IMP_CONTAINER_HAS_CGAL
366 IMP_CONTAINER_HAS_HDF5 = _IMP_em.IMP_CONTAINER_HAS_HDF5
368 IMP_CONTAINER_HAS_NUMPY = _IMP_em.IMP_CONTAINER_HAS_NUMPY
370 IMP_CONTAINER_HAS_PYTHON_IHM = _IMP_em.IMP_CONTAINER_HAS_PYTHON_IHM
372 IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_em.IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP
374 IMP_CONTAINER_HAS_ROBIN_MAP = _IMP_em.IMP_CONTAINER_HAS_ROBIN_MAP
376 IMPCONTAINER_SHOW_WARNINGS = _IMP_em.IMPCONTAINER_SHOW_WARNINGS
379 IMP_ATOM_HAS_IMP_CGAL = _IMP_em.IMP_ATOM_HAS_IMP_CGAL
381 IMP_ATOM_HAS_IMP_KERNEL = _IMP_em.IMP_ATOM_HAS_IMP_KERNEL
383 IMP_ATOM_HAS_IMP_SCORE_FUNCTOR = _IMP_em.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR
385 IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS
387 IMP_ATOM_HAS_BOOST_RANDOM = _IMP_em.IMP_ATOM_HAS_BOOST_RANDOM
389 IMP_ATOM_HAS_BOOST_REGEX = _IMP_em.IMP_ATOM_HAS_BOOST_REGEX
391 IMP_ATOM_HAS_BOOST_SYSTEM = _IMP_em.IMP_ATOM_HAS_BOOST_SYSTEM
393 IMP_ATOM_HAS_CGAL = _IMP_em.IMP_ATOM_HAS_CGAL
395 IMP_ATOM_HAS_HDF5 = _IMP_em.IMP_ATOM_HAS_HDF5
397 IMP_ATOM_HAS_NUMPY = _IMP_em.IMP_ATOM_HAS_NUMPY
399 IMP_ATOM_HAS_PYTHON_IHM = _IMP_em.IMP_ATOM_HAS_PYTHON_IHM
401 IMPATOM_SHOW_WARNINGS = _IMP_em.IMPATOM_SHOW_WARNINGS
403 IMP_ATOM_TYPE_INDEX = _IMP_em.IMP_ATOM_TYPE_INDEX
405 IMP_RESIDUE_TYPE_INDEX = _IMP_em.IMP_RESIDUE_TYPE_INDEX
407 IMP_HIERARCHY_TYPE_INDEX = _IMP_em.IMP_HIERARCHY_TYPE_INDEX
409 IMP_CHAIN_TYPE_INDEX = _IMP_em.IMP_CHAIN_TYPE_INDEX
412 IMP_EM_HAS_IMP_CGAL = _IMP_em.IMP_EM_HAS_IMP_CGAL
414 IMP_EM_HAS_IMP_CONTAINER = _IMP_em.IMP_EM_HAS_IMP_CONTAINER
416 IMP_EM_HAS_IMP_DISPLAY = _IMP_em.IMP_EM_HAS_IMP_DISPLAY
418 IMP_EM_HAS_IMP_SCORE_FUNCTOR = _IMP_em.IMP_EM_HAS_IMP_SCORE_FUNCTOR
420 IMP_EM_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_EM_HAS_BOOST_FILESYSTEM
422 IMP_EM_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_EM_HAS_BOOST_PROGRAMOPTIONS
424 IMP_EM_HAS_BOOST_RANDOM = _IMP_em.IMP_EM_HAS_BOOST_RANDOM
426 IMP_EM_HAS_BOOST_REGEX = _IMP_em.IMP_EM_HAS_BOOST_REGEX
428 IMP_EM_HAS_BOOST_SYSTEM = _IMP_em.IMP_EM_HAS_BOOST_SYSTEM
430 IMP_EM_HAS_CGAL = _IMP_em.IMP_EM_HAS_CGAL
432 IMP_EM_HAS_HDF5 = _IMP_em.IMP_EM_HAS_HDF5
434 IMP_EM_HAS_NUMPY = _IMP_em.IMP_EM_HAS_NUMPY
436 IMP_EM_HAS_PYTHON_IHM = _IMP_em.IMP_EM_HAS_PYTHON_IHM
438 IMPEM_SHOW_WARNINGS = _IMP_em.IMPEM_SHOW_WARNINGS
441 _object_types.append(
"DensityMap")
444 def _object_cast_to_DensityMap(o):
445 r"""_object_cast_to_DensityMap(Object o) -> DensityMap"""
446 return _IMP_em._object_cast_to_DensityMap(o)
448 _object_types.append(
"SampledDensityMap")
451 def _object_cast_to_SampledDensityMap(o):
452 r"""_object_cast_to_SampledDensityMap(Object o) -> SampledDensityMap"""
453 return _IMP_em._object_cast_to_SampledDensityMap(o)
455 _object_types.append(
"SurfaceShellDensityMap")
458 def _object_cast_to_SurfaceShellDensityMap(o):
459 r"""_object_cast_to_SurfaceShellDensityMap(Object o) -> SurfaceShellDensityMap"""
460 return _IMP_em._object_cast_to_SurfaceShellDensityMap(o)
462 _object_types.append(
"FitRestraint")
465 def _object_cast_to_FitRestraint(o):
466 r"""_object_cast_to_FitRestraint(Object o) -> FitRestraint"""
467 return _IMP_em._object_cast_to_FitRestraint(o)
469 _object_types.append(
"FitRestraintBayesEM3D")
472 def _object_cast_to_FitRestraintBayesEM3D(o):
473 r"""_object_cast_to_FitRestraintBayesEM3D(Object o) -> FitRestraintBayesEM3D"""
474 return _IMP_em._object_cast_to_FitRestraintBayesEM3D(o)
476 _object_types.append(
"PCAFitRestraint")
479 def _object_cast_to_PCAFitRestraint(o):
480 r"""_object_cast_to_PCAFitRestraint(Object o) -> PCAFitRestraint"""
481 return _IMP_em._object_cast_to_PCAFitRestraint(o)
483 _object_types.append(
"EnvelopePenetrationRestraint")
486 def _object_cast_to_EnvelopePenetrationRestraint(o):
487 r"""_object_cast_to_EnvelopePenetrationRestraint(Object o) -> EnvelopePenetrationRestraint"""
488 return _IMP_em._object_cast_to_EnvelopePenetrationRestraint(o)
490 _object_types.append(
"EnvelopeFitRestraint")
493 def _object_cast_to_EnvelopeFitRestraint(o):
494 r"""_object_cast_to_EnvelopeFitRestraint(Object o) -> EnvelopeFitRestraint"""
495 return _IMP_em._object_cast_to_EnvelopeFitRestraint(o)
497 KernelParametersList=list
498 _plural_types.append(
"KernelParametersList")
499 _value_types.append(
"KernelParameters")
502 _object_types.append(
"HighDensityEmbedding")
505 def _object_cast_to_HighDensityEmbedding(o):
506 r"""_object_cast_to_HighDensityEmbedding(Object o) -> HighDensityEmbedding"""
507 return _IMP_em._object_cast_to_HighDensityEmbedding(o)
509 _object_types.append(
"MapReaderWriter")
512 def _object_cast_to_MapReaderWriter(o):
513 r"""_object_cast_to_MapReaderWriter(Object o) -> MapReaderWriter"""
514 return _IMP_em._object_cast_to_MapReaderWriter(o)
516 _object_types.append(
"MRCReaderWriter")
519 def _object_cast_to_MRCReaderWriter(o):
520 r"""_object_cast_to_MRCReaderWriter(Object o) -> MRCReaderWriter"""
521 return _IMP_em._object_cast_to_MRCReaderWriter(o)
523 _object_types.append(
"SpiderMapReaderWriter")
526 def _object_cast_to_SpiderMapReaderWriter(o):
527 r"""_object_cast_to_SpiderMapReaderWriter(Object o) -> SpiderMapReaderWriter"""
528 return _IMP_em._object_cast_to_SpiderMapReaderWriter(o)
530 _object_types.append(
"EMReaderWriter")
533 def _object_cast_to_EMReaderWriter(o):
534 r"""_object_cast_to_EMReaderWriter(Object o) -> EMReaderWriter"""
535 return _IMP_em._object_cast_to_EMReaderWriter(o)
537 _object_types.append(
"XplorReaderWriter")
540 def _object_cast_to_XplorReaderWriter(o):
541 r"""_object_cast_to_XplorReaderWriter(Object o) -> XplorReaderWriter"""
542 return _IMP_em._object_cast_to_XplorReaderWriter(o)
544 _object_types.append(
"CoarseCCatIntervals")
547 def _object_cast_to_CoarseCCatIntervals(o):
548 r"""_object_cast_to_CoarseCCatIntervals(Object o) -> CoarseCCatIntervals"""
549 return _IMP_em._object_cast_to_CoarseCCatIntervals(o)
551 FittingSolutionsList=list
552 _plural_types.append(
"FittingSolutionsList")
553 _value_types.append(
"FittingSolutions")
556 _object_types.append(
"MapDistanceTransform")
559 def _object_cast_to_MapDistanceTransform(o):
560 r"""_object_cast_to_MapDistanceTransform(Object o) -> MapDistanceTransform"""
561 return _IMP_em._object_cast_to_MapDistanceTransform(o)
563 _object_types.append(
"EnvelopeScore")
566 def _object_cast_to_EnvelopeScore(o):
567 r"""_object_cast_to_EnvelopeScore(Object o) -> EnvelopeScore"""
568 return _IMP_em._object_cast_to_EnvelopeScore(o)
570 def _get_density_map_x_loc(m, pyobj):
571 r"""_get_density_map_x_loc(DensityMap m, PyObject * pyobj) -> PyObject *"""
572 return _IMP_em._get_density_map_x_loc(m, pyobj)
574 def _get_density_map_y_loc(m, pyobj):
575 r"""_get_density_map_y_loc(DensityMap m, PyObject * pyobj) -> PyObject *"""
576 return _IMP_em._get_density_map_y_loc(m, pyobj)
578 def _get_density_map_z_loc(m, pyobj):
579 r"""_get_density_map_z_loc(DensityMap m, PyObject * pyobj) -> PyObject *"""
580 return _IMP_em._get_density_map_z_loc(m, pyobj)
582 def _get_density_map_data(m, pyobj):
583 r"""_get_density_map_data(DensityMap m, PyObject * pyobj) -> PyObject *"""
584 return _IMP_em._get_density_map_data(m, pyobj)
586 r"""Proxy of C++ IMP::em::MapReaderWriter class."""
588 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
591 r"""__init__(MapReaderWriter self) -> MapReaderWriter"""
592 _IMP_em.MapReaderWriter_swiginit(self, _IMP_em.new_MapReaderWriter())
594 def get_version_info(self):
595 r"""get_version_info(MapReaderWriter self) -> VersionInfo"""
596 return _IMP_em.MapReaderWriter_get_version_info(self)
597 __swig_destroy__ = _IMP_em.delete_MapReaderWriter
600 r"""__str__(MapReaderWriter self) -> std::string"""
601 return _IMP_em.MapReaderWriter___str__(self)
604 r"""__repr__(MapReaderWriter self) -> std::string"""
605 return _IMP_em.MapReaderWriter___repr__(self)
609 return _object_cast_to_MapReaderWriter(o)
613 _IMP_em.MapReaderWriter_swigregister(MapReaderWriter)
617 class DensityHeader(object):
618 r"""Proxy of C++ IMP::em::DensityHeader class."""
620 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
621 __repr__ = _swig_repr
624 r"""__init__(DensityHeader self) -> DensityHeader"""
625 _IMP_em.DensityHeader_swiginit(self, _IMP_em.new_DensityHeader())
627 def get_top(self, ind):
628 r"""get_top(DensityHeader self, int ind) -> double"""
629 return _IMP_em.DensityHeader_get_top(self, ind)
631 def compute_xyz_top(self, force=False):
632 r"""compute_xyz_top(DensityHeader self, bool force=False)"""
633 return _IMP_em.DensityHeader_compute_xyz_top(self, force)
635 def update_map_dimensions(self, nnx, nny, nnz):
636 r"""update_map_dimensions(DensityHeader self, int nnx, int nny, int nnz)"""
637 return _IMP_em.DensityHeader_update_map_dimensions(self, nnx, nny, nnz)
639 def update_cell_dimensions(self):
640 r"""update_cell_dimensions(DensityHeader self)"""
641 return _IMP_em.DensityHeader_update_cell_dimensions(self)
643 def show(self, *args):
644 r"""show(DensityHeader self, _ostream out=std::cout)"""
645 return _IMP_em.DensityHeader_show(self, *args)
646 MAP_FIELD_SIZE = _IMP_em.DensityHeader_MAP_FIELD_SIZE
648 USER_FIELD_SIZE = _IMP_em.DensityHeader_USER_FIELD_SIZE
650 COMMENT_FIELD_NUM_OF = _IMP_em.DensityHeader_COMMENT_FIELD_NUM_OF
652 COMMENT_FIELD_SINGLE_SIZE = _IMP_em.DensityHeader_COMMENT_FIELD_SINGLE_SIZE
654 nxstart = property(_IMP_em.DensityHeader_nxstart_get, _IMP_em.DensityHeader_nxstart_set, doc=
r"""nxstart : int""")
655 nystart = property(_IMP_em.DensityHeader_nystart_get, _IMP_em.DensityHeader_nystart_set, doc=
r"""nystart : int""")
656 nzstart = property(_IMP_em.DensityHeader_nzstart_get, _IMP_em.DensityHeader_nzstart_set, doc=
r"""nzstart : int""")
657 mx = property(_IMP_em.DensityHeader_mx_get, _IMP_em.DensityHeader_mx_set, doc=
r"""mx : int""")
658 my = property(_IMP_em.DensityHeader_my_get, _IMP_em.DensityHeader_my_set, doc=
r"""my : int""")
659 mz = property(_IMP_em.DensityHeader_mz_get, _IMP_em.DensityHeader_mz_set, doc=
r"""mz : int""")
660 xlen = property(_IMP_em.DensityHeader_xlen_get, _IMP_em.DensityHeader_xlen_set, doc=
r"""xlen : float""")
661 ylen = property(_IMP_em.DensityHeader_ylen_get, _IMP_em.DensityHeader_ylen_set, doc=
r"""ylen : float""")
662 zlen = property(_IMP_em.DensityHeader_zlen_get, _IMP_em.DensityHeader_zlen_set, doc=
r"""zlen : float""")
663 alpha = property(_IMP_em.DensityHeader_alpha_get, _IMP_em.DensityHeader_alpha_set, doc=
r"""alpha : float""")
664 beta = property(_IMP_em.DensityHeader_beta_get, _IMP_em.DensityHeader_beta_set, doc=
r"""beta : float""")
665 gamma = property(_IMP_em.DensityHeader_gamma_get, _IMP_em.DensityHeader_gamma_set, doc=
r"""gamma : float""")
666 mapc = property(_IMP_em.DensityHeader_mapc_get, _IMP_em.DensityHeader_mapc_set, doc=
r"""mapc : int""")
667 mapr = property(_IMP_em.DensityHeader_mapr_get, _IMP_em.DensityHeader_mapr_set, doc=
r"""mapr : int""")
668 maps = property(_IMP_em.DensityHeader_maps_get, _IMP_em.DensityHeader_maps_set, doc=
r"""maps : int""")
669 dmin = property(_IMP_em.DensityHeader_dmin_get, _IMP_em.DensityHeader_dmin_set, doc=
r"""dmin : float""")
670 dmax = property(_IMP_em.DensityHeader_dmax_get, _IMP_em.DensityHeader_dmax_set, doc=
r"""dmax : float""")
671 dmean = property(_IMP_em.DensityHeader_dmean_get, _IMP_em.DensityHeader_dmean_set, doc=
r"""dmean : float""")
672 ispg = property(_IMP_em.DensityHeader_ispg_get, _IMP_em.DensityHeader_ispg_set, doc=
r"""ispg : int""")
673 nsymbt = property(_IMP_em.DensityHeader_nsymbt_get, _IMP_em.DensityHeader_nsymbt_set, doc=
r"""nsymbt : int""")
674 user = property(_IMP_em.DensityHeader_user_get, _IMP_em.DensityHeader_user_set, doc=
r"""user : a(IMP::em::DensityHeader::USER_FIELD_SIZE).int""")
675 map = property(_IMP_em.DensityHeader_map_get, _IMP_em.DensityHeader_map_set, doc=
r"""map : a(IMP::em::DensityHeader::MAP_FIELD_SIZE).char""")
676 machinestamp = property(_IMP_em.DensityHeader_machinestamp_get, _IMP_em.DensityHeader_machinestamp_set, doc=
r"""machinestamp : int""")
677 rms = property(_IMP_em.DensityHeader_rms_get, _IMP_em.DensityHeader_rms_set, doc=
r"""rms : float""")
678 nlabl = property(_IMP_em.DensityHeader_nlabl_get, _IMP_em.DensityHeader_nlabl_set, doc=
r"""nlabl : int""")
679 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""")
680 magic = property(_IMP_em.DensityHeader_magic_get, _IMP_em.DensityHeader_magic_set, doc=
r"""magic : int""")
681 voltage = property(_IMP_em.DensityHeader_voltage_get, _IMP_em.DensityHeader_voltage_set, doc=
r"""voltage : float""")
682 Cs = property(_IMP_em.DensityHeader_Cs_get, _IMP_em.DensityHeader_Cs_set, doc=
r"""Cs : float""")
683 Aperture = property(_IMP_em.DensityHeader_Aperture_get, _IMP_em.DensityHeader_Aperture_set, doc=
r"""Aperture : float""")
684 Magnification = property(_IMP_em.DensityHeader_Magnification_get, _IMP_em.DensityHeader_Magnification_set, doc=
r"""Magnification : float""")
685 Postmagnification = property(_IMP_em.DensityHeader_Postmagnification_get, _IMP_em.DensityHeader_Postmagnification_set, doc=
r"""Postmagnification : float""")
686 Exposuretime = property(_IMP_em.DensityHeader_Exposuretime_get, _IMP_em.DensityHeader_Exposuretime_set, doc=
r"""Exposuretime : float""")
687 Microscope = property(_IMP_em.DensityHeader_Microscope_get, _IMP_em.DensityHeader_Microscope_set, doc=
r"""Microscope : float""")
688 Pixelsize = property(_IMP_em.DensityHeader_Pixelsize_get, _IMP_em.DensityHeader_Pixelsize_set, doc=
r"""Pixelsize : float""")
689 CCDArea = property(_IMP_em.DensityHeader_CCDArea_get, _IMP_em.DensityHeader_CCDArea_set, doc=
r"""CCDArea : float""")
690 Defocus = property(_IMP_em.DensityHeader_Defocus_get, _IMP_em.DensityHeader_Defocus_set, doc=
r"""Defocus : float""")
691 Astigmatism = property(_IMP_em.DensityHeader_Astigmatism_get, _IMP_em.DensityHeader_Astigmatism_set, doc=
r"""Astigmatism : float""")
692 AstigmatismAngle = property(_IMP_em.DensityHeader_AstigmatismAngle_get, _IMP_em.DensityHeader_AstigmatismAngle_set, doc=
r"""AstigmatismAngle : float""")
693 FocusIncrement = property(_IMP_em.DensityHeader_FocusIncrement_get, _IMP_em.DensityHeader_FocusIncrement_set, doc=
r"""FocusIncrement : float""")
694 CountsPerElectron = property(_IMP_em.DensityHeader_CountsPerElectron_get, _IMP_em.DensityHeader_CountsPerElectron_set, doc=
r"""CountsPerElectron : float""")
695 Intensity = property(_IMP_em.DensityHeader_Intensity_get, _IMP_em.DensityHeader_Intensity_set, doc=
r"""Intensity : float""")
696 EnergySlitwidth = property(_IMP_em.DensityHeader_EnergySlitwidth_get, _IMP_em.DensityHeader_EnergySlitwidth_set, doc=
r"""EnergySlitwidth : float""")
697 EnergyOffset = property(_IMP_em.DensityHeader_EnergyOffset_get, _IMP_em.DensityHeader_EnergyOffset_set, doc=
r"""EnergyOffset : float""")
698 Tiltangle = property(_IMP_em.DensityHeader_Tiltangle_get, _IMP_em.DensityHeader_Tiltangle_set, doc=
r"""Tiltangle : float""")
699 Tiltaxis = property(_IMP_em.DensityHeader_Tiltaxis_get, _IMP_em.DensityHeader_Tiltaxis_set, doc=
r"""Tiltaxis : float""")
700 MarkerX = property(_IMP_em.DensityHeader_MarkerX_get, _IMP_em.DensityHeader_MarkerX_set, doc=
r"""MarkerX : float""")
701 MarkerY = property(_IMP_em.DensityHeader_MarkerY_get, _IMP_em.DensityHeader_MarkerY_set, doc=
r"""MarkerY : float""")
702 lswap = property(_IMP_em.DensityHeader_lswap_get, _IMP_em.DensityHeader_lswap_set, doc=
r"""lswap : int""")
705 r"""get_resolution(DensityHeader self) -> float"""
706 return _IMP_em.DensityHeader_get_resolution(self)
708 def get_has_resolution(self):
709 r"""get_has_resolution(DensityHeader self) -> bool"""
710 return _IMP_em.DensityHeader_get_has_resolution(self)
712 def set_resolution(self, resolution):
713 r"""set_resolution(DensityHeader self, float resolution)"""
714 return _IMP_em.DensityHeader_set_resolution(self, resolution)
716 def get_spacing(self):
717 r"""get_spacing(DensityHeader self) -> float"""
718 return _IMP_em.DensityHeader_get_spacing(self)
720 def get_xorigin(self):
721 r"""get_xorigin(DensityHeader self) -> float"""
722 return _IMP_em.DensityHeader_get_xorigin(self)
724 def get_yorigin(self):
725 r"""get_yorigin(DensityHeader self) -> float"""
726 return _IMP_em.DensityHeader_get_yorigin(self)
728 def get_zorigin(self):
729 r"""get_zorigin(DensityHeader self) -> float"""
730 return _IMP_em.DensityHeader_get_zorigin(self)
732 def get_origin(self, i):
733 r"""get_origin(DensityHeader self, int i) -> float"""
734 return _IMP_em.DensityHeader_get_origin(self, i)
736 def set_xorigin(self, x):
737 r"""set_xorigin(DensityHeader self, float x)"""
738 return _IMP_em.DensityHeader_set_xorigin(self, x)
740 def set_yorigin(self, y):
741 r"""set_yorigin(DensityHeader self, float y)"""
742 return _IMP_em.DensityHeader_set_yorigin(self, y)
744 def set_zorigin(self, z):
745 r"""set_zorigin(DensityHeader self, float z)"""
746 return _IMP_em.DensityHeader_set_zorigin(self, z)
748 def is_top_calculated(self):
749 r"""is_top_calculated(DensityHeader self) -> bool"""
750 return _IMP_em.DensityHeader_is_top_calculated(self)
751 Objectpixelsize_ = property(_IMP_em.DensityHeader_Objectpixelsize__get, _IMP_em.DensityHeader_Objectpixelsize__set, doc=
r"""Objectpixelsize_ : float""")
754 r"""get_nx(DensityHeader self) -> int"""
755 return _IMP_em.DensityHeader_get_nx(self)
758 r"""get_ny(DensityHeader self) -> int"""
759 return _IMP_em.DensityHeader_get_ny(self)
762 r"""get_nz(DensityHeader self) -> int"""
763 return _IMP_em.DensityHeader_get_nz(self)
765 def get_number_of_voxels(self):
766 r"""get_number_of_voxels(DensityHeader self) -> int"""
767 return _IMP_em.DensityHeader_get_number_of_voxels(self)
769 def get_data_type(self):
770 r"""get_data_type(DensityHeader self) -> int"""
771 return _IMP_em.DensityHeader_get_data_type(self)
773 def set_data_type(self, data_type):
774 r"""set_data_type(DensityHeader self, int data_type)"""
775 return _IMP_em.DensityHeader_set_data_type(self, data_type)
776 __swig_destroy__ = _IMP_em.delete_DensityHeader
779 _IMP_em.DensityHeader_swigregister(DensityHeader)
782 r"""create_density_header(BoundingBox3D bb, float spacing) -> DensityHeader"""
783 return _IMP_em.create_density_header(bb, spacing)
787 read_map(std::string filename, MapReaderWriter reader) -> DensityMap
788 read_map(std::string filename) -> DensityMap
790 return _IMP_em.read_map(*args)
792 def write_map(*args):
794 write_map(DensityMap m, std::string filename, MapReaderWriter writer)
795 write_map(DensityMap m, std::string filename)
797 return _IMP_em.write_map(*args)
800 r"""approximate_molecular_mass(DensityMap m, IMP::Float threshold) -> IMP::Float"""
801 return _IMP_em.approximate_molecular_mass(m, threshold)
803 r"""Proxy of C++ IMP::em::DensityMap class."""
805 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
807 def __init__(self, *args):
809 __init__(DensityMap self, std::string name="DensityMap%1%") -> DensityMap
810 __init__(DensityMap self, DensityHeader header, std::string name="DensityMap%1%") -> DensityMap
812 _IMP_em.DensityMap_swiginit(self, _IMP_em.new_DensityMap(*args))
814 def reset_data(self, value=0.0):
815 r"""reset_data(DensityMap self, float value=0.0)"""
816 return _IMP_em.DensityMap_reset_data(self, value)
819 r"""calcRMS(DensityMap self) -> double"""
820 return _IMP_em.DensityMap_calcRMS(self)
822 def std_normalize(self):
823 r"""std_normalize(DensityMap self)"""
824 return _IMP_em.DensityMap_std_normalize(self)
826 def is_normalized(self):
827 r"""is_normalized(DensityMap self) -> bool"""
828 return _IMP_em.DensityMap_is_normalized(self)
830 def get_location_in_dim_by_voxel(self, index, dim):
831 r"""get_location_in_dim_by_voxel(DensityMap self, long index, int dim) -> float"""
832 return _IMP_em.DensityMap_get_location_in_dim_by_voxel(self, index, dim)
834 def xyz_ind2voxel(self, x, y, z):
835 r"""xyz_ind2voxel(DensityMap self, int x, int y, int z) -> long"""
836 return _IMP_em.DensityMap_xyz_ind2voxel(self, x, y, z)
838 def get_voxel_by_location(self, *args):
840 get_voxel_by_location(DensityMap self, float x, float y, float z) -> long
841 get_voxel_by_location(DensityMap self, Vector3D v) -> long
843 return _IMP_em.DensityMap_get_voxel_by_location(self, *args)
845 def get_location_by_voxel(self, index):
846 r"""get_location_by_voxel(DensityMap self, long index) -> Vector3D"""
847 return _IMP_em.DensityMap_get_location_by_voxel(self, index)
849 def is_xyz_ind_part_of_volume(self, ix, iy, iz):
850 r"""is_xyz_ind_part_of_volume(DensityMap self, int ix, int iy, int iz) -> bool"""
851 return _IMP_em.DensityMap_is_xyz_ind_part_of_volume(self, ix, iy, iz)
853 def is_part_of_volume(self, *args):
855 is_part_of_volume(DensityMap self, float x, float y, float z) -> bool
856 is_part_of_volume(DensityMap self, Vector3D v) -> bool
858 return _IMP_em.DensityMap_is_part_of_volume(self, *args)
860 def get_value(self, *args):
862 get_value(DensityMap self, float x, float y, float z) -> double
863 get_value(DensityMap self, Vector3D point) -> double
864 get_value(DensityMap self, long index) -> double
866 return _IMP_em.DensityMap_get_value(self, *args)
868 def set_value(self, *args):
870 set_value(DensityMap self, long index, double value)
871 set_value(DensityMap self, float x, float y, float z, double value)
873 return _IMP_em.DensityMap_set_value(self, *args)
875 def set_origin(self, *args):
877 set_origin(DensityMap self, float x, float y, float z)
878 set_origin(DensityMap self, Vector3D v)
880 return _IMP_em.DensityMap_set_origin(self, *args)
882 def get_origin(self):
883 r"""get_origin(DensityMap self) -> Vector3D"""
884 return _IMP_em.DensityMap_get_origin(self)
887 r"""get_top(DensityMap self) -> Vector3D"""
888 return _IMP_em.DensityMap_get_top(self)
890 def get_header(self):
891 h = _IMP_em.DensityMap_get_header(self)
897 def get_header_writable(self):
898 h = _IMP_em.DensityMap_get_header_writable(self)
904 def same_origin(self, other):
905 r"""same_origin(DensityMap self, DensityMap other) -> bool"""
906 return _IMP_em.DensityMap_same_origin(self, other)
908 def same_dimensions(self, other):
909 r"""same_dimensions(DensityMap self, DensityMap other) -> bool"""
910 return _IMP_em.DensityMap_same_dimensions(self, other)
912 def same_voxel_size(self, other):
913 r"""same_voxel_size(DensityMap self, DensityMap other) -> bool"""
914 return _IMP_em.DensityMap_same_voxel_size(self, other)
917 r"""get_centroid(DensityMap self, double threshold=0.0) -> Vector3D"""
918 return _IMP_em.DensityMap_get_centroid(self, threshold)
920 def get_max_value(self):
921 r"""get_max_value(DensityMap self) -> double"""
922 return _IMP_em.DensityMap_get_max_value(self)
924 def get_min_value(self):
925 r"""get_min_value(DensityMap self) -> double"""
926 return _IMP_em.DensityMap_get_min_value(self)
928 def add(self, *args):
930 add(DensityMap self, DensityMap other)
931 add(DensityMap self, IMP::Float d)
933 return _IMP_em.DensityMap_add(self, *args)
935 def pick_max(self, other):
936 r"""pick_max(DensityMap self, DensityMap other)"""
937 return _IMP_em.DensityMap_pick_max(self, other)
939 def get_number_of_voxels(self):
940 r"""get_number_of_voxels(DensityMap self) -> long"""
941 return _IMP_em.DensityMap_get_number_of_voxels(self)
943 def set_void_map(self, nx, ny, nz):
944 r"""set_void_map(DensityMap self, int nx, int ny, int nz)"""
945 return _IMP_em.DensityMap_set_void_map(self, nx, ny, nz)
947 def pad(self, nx, ny, nz, val=0.0):
948 r"""pad(DensityMap self, int nx, int ny, int nz, float val=0.0)"""
949 return _IMP_em.DensityMap_pad(self, nx, ny, nz, val)
951 def pad_margin(self, mrg_x, mrg_y, mrg_z, val=0.0):
952 r"""pad_margin(DensityMap self, int mrg_x, int mrg_y, int mrg_z, float val=0.0) -> DensityMap"""
953 return _IMP_em.DensityMap_pad_margin(self, mrg_x, mrg_y, mrg_z, val)
955 def get_cropped(self, *args):
957 get_cropped(DensityMap self, float threshold) -> DensityMap
958 get_cropped(DensityMap self, IMP::Particles ps, double distance, bool inverse=False, bool keep_map_dimensions=False) -> DensityMap
959 get_cropped(DensityMap self, BoundingBox3D bb) -> DensityMap
961 return _IMP_em.DensityMap_get_cropped(self, *args)
963 def get_maximum_value_in_xy_plane(self, z_ind):
964 r"""get_maximum_value_in_xy_plane(DensityMap self, int z_ind) -> float"""
965 return _IMP_em.DensityMap_get_maximum_value_in_xy_plane(self, z_ind)
967 def get_maximum_value_in_xz_plane(self, y_ind):
968 r"""get_maximum_value_in_xz_plane(DensityMap self, int y_ind) -> float"""
969 return _IMP_em.DensityMap_get_maximum_value_in_xz_plane(self, y_ind)
971 def get_maximum_value_in_yz_plane(self, x_ind):
972 r"""get_maximum_value_in_yz_plane(DensityMap self, int x_ind) -> float"""
973 return _IMP_em.DensityMap_get_maximum_value_in_yz_plane(self, x_ind)
976 r"""multiply(DensityMap self, float factor)"""
977 return _IMP_em.DensityMap_multiply(self, factor)
979 def get_locations_string(self, t):
980 r"""get_locations_string(DensityMap self, float t) -> std::string"""
981 return _IMP_em.DensityMap_get_locations_string(self, t)
983 def update_voxel_size(self, new_apix):
984 r"""update_voxel_size(DensityMap self, float new_apix)"""
985 return _IMP_em.DensityMap_update_voxel_size(self, new_apix)
987 def get_spacing(self):
988 r"""get_spacing(DensityMap self) -> IMP::Float"""
989 return _IMP_em.DensityMap_get_spacing(self)
991 def calc_all_voxel2loc(self):
992 r"""calc_all_voxel2loc(DensityMap self)"""
993 return _IMP_em.DensityMap_calc_all_voxel2loc(self)
995 def copy_map(self, other):
996 r"""copy_map(DensityMap self, DensityMap other)"""
997 return _IMP_em.DensityMap_copy_map(self, other)
999 def get_version_info(self):
1000 r"""get_version_info(DensityMap self) -> VersionInfo"""
1001 return _IMP_em.DensityMap_get_version_info(self)
1002 __swig_destroy__ = _IMP_em.delete_DensityMap
1004 def lower_voxel_shift(self, loc, kdist, orig, ndim):
1005 r"""lower_voxel_shift(DensityMap self, double loc, double kdist, double orig, int ndim) -> int"""
1006 return _IMP_em.DensityMap_lower_voxel_shift(self, loc, kdist, orig, ndim)
1008 def upper_voxel_shift(self, loc, kdist, orig, ndim):
1009 r"""upper_voxel_shift(DensityMap self, double loc, double kdist, double orig, int ndim) -> int"""
1010 return _IMP_em.DensityMap_upper_voxel_shift(self, loc, kdist, orig, ndim)
1012 def get_rms_calculated(self):
1013 r"""get_rms_calculated(DensityMap self) -> bool"""
1014 return _IMP_em.DensityMap_get_rms_calculated(self)
1016 def get_dim_index_by_location(self, *args):
1018 get_dim_index_by_location(DensityMap self, Vector3D v, int ind) -> int
1019 get_dim_index_by_location(DensityMap self, float loc_val, int ind) -> int
1021 return _IMP_em.DensityMap_get_dim_index_by_location(self, *args)
1024 r"""__str__(DensityMap self) -> std::string"""
1025 return _IMP_em.DensityMap___str__(self)
1028 r"""__repr__(DensityMap self) -> std::string"""
1029 return _IMP_em.DensityMap___repr__(self)
1033 return _object_cast_to_DensityMap(o)
1036 def _get_as_binary(self):
1037 r"""_get_as_binary(DensityMap self) -> PyObject *"""
1038 return _IMP_em.DensityMap__get_as_binary(self)
1040 def _set_from_binary(self, p):
1041 r"""_set_from_binary(DensityMap self, PyObject * p)"""
1042 return _IMP_em.DensityMap__set_from_binary(self, p)
1044 def __getstate__(self):
1045 p = self._get_as_binary()
1046 if len(self.__dict__) > 1:
1047 d = self.__dict__.copy()
1052 def __setstate__(self, p):
1053 if not hasattr(self,
'this'):
1055 if isinstance(p, tuple):
1057 self.__dict__.update(d)
1058 return self._set_from_binary(p)
1061 def get_x_loc(self):
1062 return _get_density_map_x_loc(self, self)
1064 def get_y_loc(self):
1065 return _get_density_map_y_loc(self, self)
1067 def get_z_loc(self):
1068 return _get_density_map_z_loc(self, self)
1071 return _get_density_map_data(self, self)
1075 _IMP_em.DensityMap_swigregister(DensityMap)
1079 get_bounding_box(DensityMap m, IMP::Float threshold) -> BoundingBox3D
1080 get_bounding_box(DensityMap m) -> BoundingBox3D
1082 return _IMP_em.get_bounding_box(*args)
1084 def get_density(m, v):
1085 r"""get_density(DensityMap m, Vector3D v) -> double"""
1086 return _IMP_em.get_density(m, v)
1088 def get_transformed(*args):
1090 get_transformed(DensityMap input, Transformation3D tr, double threshold) -> DensityMap
1091 get_transformed(DensityMap input, Transformation3D tr) -> DensityMap
1093 return _IMP_em.get_transformed(*args)
1095 def get_resampled(input, scaling):
1096 r"""get_resampled(DensityMap input, double scaling) -> DensityMap"""
1097 return _IMP_em.get_resampled(input, scaling)
1099 def get_transformed_into(source, tr, into, calc_rms=True):
1100 r"""get_transformed_into(DensityMap source, Transformation3D tr, DensityMap into, bool calc_rms=True)"""
1101 return _IMP_em.get_transformed_into(source, tr, into, calc_rms)
1103 def get_transformed_into2(source, tr, into):
1104 r"""get_transformed_into2(DensityMap source, Transformation3D tr, DensityMap into)"""
1105 return _IMP_em.get_transformed_into2(source, tr, into)
1107 def get_interiors_intersect(d1, d2):
1108 r"""get_interiors_intersect(DensityMap d1, DensityMap d2) -> bool"""
1109 return _IMP_em.get_interiors_intersect(d1, d2)
1113 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
1114 get_segment(DensityMap map_to_segment, IMP::algebra::Vector3Ds vecs, float dist) -> DensityMap
1116 return _IMP_em.get_segment(*args)
1119 r"""get_segment_by_masking(DensityMap map_to_segment, DensityMap mask, float mas_threshold) -> DensityMap"""
1120 return _IMP_em.get_segment_by_masking(map_to_segment, mask, mas_threshold)
1122 def binarize(orig_map, threshold, reverse=False):
1123 r"""binarize(DensityMap orig_map, float threshold, bool reverse=False) -> DensityMap"""
1124 return _IMP_em.binarize(orig_map, threshold, reverse)
1127 r"""get_threshold_map(DensityMap orig_map, float threshold) -> DensityMap"""
1128 return _IMP_em.get_threshold_map(orig_map, threshold)
1131 r"""multiply(DensityMap m1, DensityMap m2) -> DensityMap"""
1132 return _IMP_em.multiply(m1, m2)
1135 r"""convolute(DensityMap m1, DensityMap m2) -> double"""
1136 return _IMP_em.convolute(m1, m2)
1139 r"""get_sum(DensityMap m1) -> double"""
1140 return _IMP_em.get_sum(m1)
1143 r"""get_max_map(IMP::em::DensityMaps maps) -> DensityMap"""
1144 return _IMP_em.get_max_map(maps)
1147 r"""interpolate_map(DensityMap in_map, double new_spacing) -> DensityMap"""
1148 return _IMP_em.interpolate_map(in_map, new_spacing)
1151 r"""get_grid(DensityMap in_map) -> IMP::algebra::GridD< 3,IMP::algebra::DenseGridStorageD< 3,float >,float,IMP::algebra::DefaultEmbeddingD< 3 > >"""
1152 return _IMP_em.get_grid(in_map)
1156 create_density_map(DensityMap other) -> DensityMap
1157 create_density_map(BoundingBox3D bb, double spacing) -> DensityMap
1158 create_density_map(int nx, int ny, int nz, double spacing) -> DensityMap
1159 create_density_map(DenseFloatGrid3D grid) -> DensityMap
1160 create_density_map(DenseDoubleGrid3D grid) -> DensityMap
1162 return _IMP_em.create_density_map(*args)
1164 def get_binarized_interior(dmap):
1165 r"""get_binarized_interior(DensityMap dmap) -> DensityMap"""
1166 return _IMP_em.get_binarized_interior(dmap)
1168 def add_to_map(dm, pis):
1169 r"""add_to_map(DensityMap dm, IMP::Particles const & pis)"""
1170 return _IMP_em.add_to_map(dm, pis)
1171 class RadiusDependentDistanceMask(object):
1172 r"""Proxy of C++ IMP::em::RadiusDependentDistanceMask class."""
1174 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1175 __repr__ = _swig_repr
1177 def __init__(self, sampling_radius, header):
1178 r"""__init__(RadiusDependentDistanceMask self, float sampling_radius, DensityHeader header) -> RadiusDependentDistanceMask"""
1179 _IMP_em.RadiusDependentDistanceMask_swiginit(self, _IMP_em.new_RadiusDependentDistanceMask(sampling_radius, header))
1181 def get_neighbor_shift(self):
1182 r"""get_neighbor_shift(RadiusDependentDistanceMask self) -> std::vector< double,std::allocator< double > > const *"""
1183 return _IMP_em.RadiusDependentDistanceMask_get_neighbor_shift(self)
1185 def get_neighbor_dist(self):
1186 r"""get_neighbor_dist(RadiusDependentDistanceMask self) -> std::vector< double,std::allocator< double > > const *"""
1187 return _IMP_em.RadiusDependentDistanceMask_get_neighbor_dist(self)
1189 def get_neighbor_dist_exp(self):
1190 r"""get_neighbor_dist_exp(RadiusDependentDistanceMask self) -> std::vector< double,std::allocator< double > > const *"""
1191 return _IMP_em.RadiusDependentDistanceMask_get_neighbor_dist_exp(self)
1193 def show(self, out):
1194 r"""show(RadiusDependentDistanceMask self, _ostream out)"""
1195 return _IMP_em.RadiusDependentDistanceMask_show(self, out)
1196 __swig_destroy__ = _IMP_em.delete_RadiusDependentDistanceMask
1199 _IMP_em.RadiusDependentDistanceMask_swigregister(RadiusDependentDistanceMask)
1200 class DistanceMask(object):
1201 r"""Proxy of C++ IMP::em::DistanceMask class."""
1203 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1204 __repr__ = _swig_repr
1206 def __init__(self, *args):
1208 __init__(DistanceMask self) -> DistanceMask
1209 __init__(DistanceMask self, DensityHeader header) -> DistanceMask
1211 _IMP_em.DistanceMask_swiginit(self, _IMP_em.new_DistanceMask(*args))
1213 def show(self, out):
1214 r"""show(DistanceMask self, _ostream out)"""
1215 return _IMP_em.DistanceMask_show(self, out)
1217 def is_mask_set(self, radius, eps=0.001):
1218 r"""is_mask_set(DistanceMask self, float radius, float eps=0.001) -> bool"""
1219 return _IMP_em.DistanceMask_is_mask_set(self, radius, eps)
1220 __swig_destroy__ = _IMP_em.delete_DistanceMask
1223 _IMP_em.DistanceMask_swigregister(DistanceMask)
1224 class EMReaderWriter(MapReaderWriter):
1225 r"""Proxy of C++ IMP::em::EMReaderWriter class."""
1227 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1228 __swig_destroy__ = _IMP_em.delete_EMReaderWriter
1231 r"""__str__(EMReaderWriter self) -> std::string"""
1232 return _IMP_em.EMReaderWriter___str__(self)
1235 r"""__repr__(EMReaderWriter self) -> std::string"""
1236 return _IMP_em.EMReaderWriter___repr__(self)
1240 return _object_cast_to_EMReaderWriter(o)
1244 r"""__init__(EMReaderWriter self) -> EMReaderWriter"""
1245 _IMP_em.EMReaderWriter_swiginit(self, _IMP_em.new_EMReaderWriter())
1248 _IMP_em.EMReaderWriter_swigregister(EMReaderWriter)
1249 class XplorReaderWriter(MapReaderWriter):
1250 r"""Proxy of C++ IMP::em::XplorReaderWriter class."""
1252 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1253 __swig_destroy__ = _IMP_em.delete_XplorReaderWriter
1256 r"""__str__(XplorReaderWriter self) -> std::string"""
1257 return _IMP_em.XplorReaderWriter___str__(self)
1260 r"""__repr__(XplorReaderWriter self) -> std::string"""
1261 return _IMP_em.XplorReaderWriter___repr__(self)
1265 return _object_cast_to_XplorReaderWriter(o)
1269 r"""__init__(XplorReaderWriter self) -> XplorReaderWriter"""
1270 _IMP_em.XplorReaderWriter_swiginit(self, _IMP_em.new_XplorReaderWriter())
1273 _IMP_em.XplorReaderWriter_swigregister(XplorReaderWriter)
1274 class MRCReaderWriter(MapReaderWriter):
1275 r"""Proxy of C++ IMP::em::MRCReaderWriter class."""
1277 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1279 def __init__(self, *args):
1281 __init__(MRCReaderWriter self) -> MRCReaderWriter
1282 __init__(MRCReaderWriter self, std::string fn) -> MRCReaderWriter
1284 _IMP_em.MRCReaderWriter_swiginit(self, _IMP_em.new_MRCReaderWriter(*args))
1285 __swig_destroy__ = _IMP_em.delete_MRCReaderWriter
1288 r"""__str__(MRCReaderWriter self) -> std::string"""
1289 return _IMP_em.MRCReaderWriter___str__(self)
1292 r"""__repr__(MRCReaderWriter self) -> std::string"""
1293 return _IMP_em.MRCReaderWriter___repr__(self)
1297 return _object_cast_to_MRCReaderWriter(o)
1301 _IMP_em.MRCReaderWriter_swigregister(MRCReaderWriter)
1302 class KernelParameters(object):
1303 r"""Proxy of C++ IMP::em::KernelParameters class."""
1305 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1307 def __init__(self, *args):
1309 __init__(KernelParameters self) -> KernelParameters
1310 __init__(KernelParameters self, float resolution) -> KernelParameters
1312 _IMP_em.KernelParameters_swiginit(self, _IMP_em.new_KernelParameters(*args))
1313 __swig_destroy__ = _IMP_em.delete_KernelParameters
1316 r"""get_rsig(KernelParameters self) -> float"""
1317 return _IMP_em.KernelParameters_get_rsig(self)
1319 def get_rsigsq(self):
1320 r"""get_rsigsq(KernelParameters self) -> float"""
1321 return _IMP_em.KernelParameters_get_rsigsq(self)
1323 def get_inv_rsigsq(self):
1324 r"""get_inv_rsigsq(KernelParameters self) -> float"""
1325 return _IMP_em.KernelParameters_get_inv_rsigsq(self)
1327 def get_timessig(self):
1328 r"""get_timessig(KernelParameters self) -> float"""
1329 return _IMP_em.KernelParameters_get_timessig(self)
1331 def get_sq2pi3(self):
1332 r"""get_sq2pi3(KernelParameters self) -> float"""
1333 return _IMP_em.KernelParameters_get_sq2pi3(self)
1335 def get_rnormfac(self):
1336 r"""get_rnormfac(KernelParameters self) -> float"""
1337 return _IMP_em.KernelParameters_get_rnormfac(self)
1339 def get_rkdist(self):
1340 r"""get_rkdist(KernelParameters self) -> float"""
1341 return _IMP_em.KernelParameters_get_rkdist(self)
1343 def get_rkdistsq(self):
1344 r"""get_rkdistsq(KernelParameters self) -> float"""
1345 return _IMP_em.KernelParameters_get_rkdistsq(self)
1348 r"""get_lim(KernelParameters self) -> float"""
1349 return _IMP_em.KernelParameters_get_lim(self)
1351 def show(self, *args):
1352 r"""show(KernelParameters self, _ostream out=std::cout)"""
1353 return _IMP_em.KernelParameters_show(self, *args)
1356 r"""__str__(KernelParameters self) -> std::string"""
1357 return _IMP_em.KernelParameters___str__(self)
1360 r"""__repr__(KernelParameters self) -> std::string"""
1361 return _IMP_em.KernelParameters___repr__(self)
1363 def _get_as_binary(self):
1364 r"""_get_as_binary(KernelParameters self) -> PyObject *"""
1365 return _IMP_em.KernelParameters__get_as_binary(self)
1367 def _set_from_binary(self, p):
1368 r"""_set_from_binary(KernelParameters self, PyObject * p)"""
1369 return _IMP_em.KernelParameters__set_from_binary(self, p)
1371 def __getstate__(self):
1372 p = self._get_as_binary()
1373 if len(self.__dict__) > 1:
1374 d = self.__dict__.copy()
1379 def __setstate__(self, p):
1380 if not hasattr(self,
'this'):
1382 if isinstance(p, tuple):
1384 self.__dict__.update(d)
1385 return self._set_from_binary(p)
1389 _IMP_em.KernelParameters_swigregister(KernelParameters)
1390 GAUSSIAN = _IMP_em.GAUSSIAN
1392 BINARIZED_SPHERE = _IMP_em.BINARIZED_SPHERE
1394 SPHERE = _IMP_em.SPHERE
1396 class SampledDensityMap(DensityMap):
1397 r"""Proxy of C++ IMP::em::SampledDensityMap class."""
1399 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1401 def __init__(self, *args):
1403 __init__(SampledDensityMap self, IMP::em::KernelType kt=GAUSSIAN) -> SampledDensityMap
1404 __init__(SampledDensityMap self, DensityHeader header, IMP::em::KernelType kt=GAUSSIAN) -> SampledDensityMap
1405 __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
1407 _IMP_em.SampledDensityMap_swiginit(self, _IMP_em.new_SampledDensityMap(*args))
1410 r"""resample(SampledDensityMap self)"""
1411 return _IMP_em.SampledDensityMap_resample(self)
1413 def project(self, *args):
1414 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())"""
1415 return _IMP_em.SampledDensityMap_project(self, *args)
1417 def set_particles(self, *args):
1418 r"""set_particles(SampledDensityMap self, IMP::ParticlesTemp const & ps, FloatKey mass_key=IMP::atom::Mass::get_mass_key())"""
1419 return _IMP_em.SampledDensityMap_set_particles(self, *args)
1421 def get_xyzr_particles(self):
1422 r"""get_xyzr_particles(SampledDensityMap self) -> IMP::core::XYZRs const &"""
1423 return _IMP_em.SampledDensityMap_get_xyzr_particles(self)
1425 def get_sampled_particles(self):
1426 r"""get_sampled_particles(SampledDensityMap self) -> IMP::Particles const &"""
1427 return _IMP_em.SampledDensityMap_get_sampled_particles(self)
1429 def get_weight_key(self):
1430 r"""get_weight_key(SampledDensityMap self) -> FloatKey"""
1431 return _IMP_em.SampledDensityMap_get_weight_key(self)
1433 def get_minimum_resampled_value(self):
1434 r"""get_minimum_resampled_value(SampledDensityMap self) -> float"""
1435 return _IMP_em.SampledDensityMap_get_minimum_resampled_value(self)
1437 def update_resolution(self, res):
1438 r"""update_resolution(SampledDensityMap self, IMP::Float res)"""
1439 return _IMP_em.SampledDensityMap_update_resolution(self, res)
1440 __swig_destroy__ = _IMP_em.delete_SampledDensityMap
1443 r"""__str__(SampledDensityMap self) -> std::string"""
1444 return _IMP_em.SampledDensityMap___str__(self)
1447 r"""__repr__(SampledDensityMap self) -> std::string"""
1448 return _IMP_em.SampledDensityMap___repr__(self)
1452 return _object_cast_to_SampledDensityMap(o)
1456 _IMP_em.SampledDensityMap_swigregister(SampledDensityMap)
1457 IMP_DEFAULT_NUM_SHELLS = _IMP_em.IMP_DEFAULT_NUM_SHELLS
1459 IMP_SIG_CUTOFF = _IMP_em.IMP_SIG_CUTOFF
1461 class SurfaceShellDensityMap(SampledDensityMap):
1462 r"""Proxy of C++ IMP::em::SurfaceShellDensityMap class."""
1464 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1466 def __init__(self, *args):
1468 __init__(SurfaceShellDensityMap self) -> SurfaceShellDensityMap
1469 __init__(SurfaceShellDensityMap self, DensityHeader header) -> SurfaceShellDensityMap
1470 __init__(SurfaceShellDensityMap self, IMP::ParticlesTemp const & ps, float voxel_size, FloatKey mass_key=IMP::atom::Mass::get_mass_key(), int num_shells=5) -> SurfaceShellDensityMap
1472 _IMP_em.SurfaceShellDensityMap_swiginit(self, _IMP_em.new_SurfaceShellDensityMap(*args))
1475 r"""binarize(SurfaceShellDensityMap self, float scene_val)"""
1476 return _IMP_em.SurfaceShellDensityMap_binarize(self, scene_val)
1478 def has_background_neighbor(self, voxel_ind):
1479 r"""has_background_neighbor(SurfaceShellDensityMap self, long voxel_ind) -> bool"""
1480 return _IMP_em.SurfaceShellDensityMap_has_background_neighbor(self, voxel_ind)
1481 __swig_destroy__ = _IMP_em.delete_SurfaceShellDensityMap
1484 r"""__str__(SurfaceShellDensityMap self) -> std::string"""
1485 return _IMP_em.SurfaceShellDensityMap___str__(self)
1488 r"""__repr__(SurfaceShellDensityMap self) -> std::string"""
1489 return _IMP_em.SurfaceShellDensityMap___repr__(self)
1493 return _object_cast_to_SurfaceShellDensityMap(o)
1497 _IMP_em.SurfaceShellDensityMap_swigregister(SurfaceShellDensityMap)
1500 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"""
1501 return _IMP_em.get_coarse_cc_score(*args)
1504 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"""
1505 return _IMP_em.get_coarse_cc_coefficient(*args)
1508 r"""get_coarse_cc_local_coefficient(DensityMap em_map, DensityMap model_map, double voxel_data_threshold) -> double"""
1509 return _IMP_em.get_coarse_cc_local_coefficient(em_map, model_map, voxel_data_threshold)
1510 class CoarseConvolution(object):
1511 r"""Proxy of C++ IMP::em::CoarseConvolution class."""
1513 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1514 __repr__ = _swig_repr
1517 def convolution(em_map, model_map, voxel_data_threshold, recalc_ccnormfac=True):
1518 r"""convolution(DensityMap em_map, DensityMap model_map, float voxel_data_threshold, bool recalc_ccnormfac=True) -> float"""
1519 return _IMP_em.CoarseConvolution_convolution(em_map, model_map, voxel_data_threshold, recalc_ccnormfac)
1522 r"""__init__(CoarseConvolution self) -> CoarseConvolution"""
1523 _IMP_em.CoarseConvolution_swiginit(self, _IMP_em.new_CoarseConvolution())
1524 __swig_destroy__ = _IMP_em.delete_CoarseConvolution
1527 _IMP_em.CoarseConvolution_swigregister(CoarseConvolution)
1529 r"""Proxy of C++ IMP::em::CoarseCCatIntervals class."""
1531 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1533 def __init__(self, *args):
1535 __init__(CoarseCCatIntervals self, int const & ncd) -> CoarseCCatIntervals
1536 __init__(CoarseCCatIntervals self) -> CoarseCCatIntervals
1538 _IMP_em.CoarseCCatIntervals_swiginit(self, _IMP_em.new_CoarseCCatIntervals(*args))
1540 def evaluate(self, em_map, model_map, deriv, scalefac, lderiv, eval_interval):
1541 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 >"""
1542 return _IMP_em.CoarseCCatIntervals_evaluate(self, em_map, model_map, deriv, scalefac, lderiv, eval_interval)
1544 def get_version_info(self):
1545 r"""get_version_info(CoarseCCatIntervals self) -> VersionInfo"""
1546 return _IMP_em.CoarseCCatIntervals_get_version_info(self)
1547 __swig_destroy__ = _IMP_em.delete_CoarseCCatIntervals
1550 r"""__str__(CoarseCCatIntervals self) -> std::string"""
1551 return _IMP_em.CoarseCCatIntervals___str__(self)
1554 r"""__repr__(CoarseCCatIntervals self) -> std::string"""
1555 return _IMP_em.CoarseCCatIntervals___repr__(self)
1559 return _object_cast_to_CoarseCCatIntervals(o)
1563 _IMP_em.CoarseCCatIntervals_swigregister(CoarseCCatIntervals)
1566 r"""bayesem3d_get_distinct_and_counts(DensityMap em) -> std::map< double,int >"""
1567 return _IMP_em.bayesem3d_get_distinct_and_counts(em)
1570 r"""bayesem3d_get_cumulative_sum(DensityMap em) -> IMP::Floats"""
1571 return _IMP_em.bayesem3d_get_cumulative_sum(em)
1574 r"""bayesem3d_get_cumulative_sum_with_reference(DensityMap em) -> std::map< double,double >"""
1575 return _IMP_em.bayesem3d_get_cumulative_sum_with_reference(em)
1578 r"""bayesem3d_linear_interpolate(IMP::Floats const & x_data, IMP::Floats const & y_data, double x, bool extrapolate) -> double"""
1579 return _IMP_em.bayesem3d_linear_interpolate(x_data, y_data, x, extrapolate)
1582 r"""bayesem3d_get_logabssumexp(double x, double y, double sx, double sy) -> IMP::FloatPair"""
1583 return _IMP_em.bayesem3d_get_logabssumexp(x, y, sx, sy)
1586 r"""bayesem3d_get_logabssumprodexp(double x, double y, double wx, double wy) -> IMP::FloatPair"""
1587 return _IMP_em.bayesem3d_get_logabssumprodexp(x, y, wx, wy)
1590 r"""bayesem3d_get_logsumexp(double x, double y) -> double"""
1591 return _IMP_em.bayesem3d_get_logsumexp(x, y)
1594 r"""bayesem3d_get_logsumprodexp(double x, double y, double wx, double wy) -> double"""
1595 return _IMP_em.bayesem3d_get_logsumprodexp(x, y, wx, wy)
1598 r"""bayesem3d_get_em_density_squared(DensityMap em, long number_of_voxels) -> IMP::FloatPair"""
1599 return _IMP_em.bayesem3d_get_em_density_squared(em, number_of_voxels)
1602 r"""bayesem3d_get_value(Particle p, Vector3D pt, double mass_ii, KernelParameters kps) -> std::vector< double,std::allocator< double > >"""
1603 return _IMP_em.bayesem3d_get_value(p, pt, mass_ii, kps)
1606 r"""bayesem3d_get_value_no_deriv(Particle p, Vector3D pt, double mass_ii, KernelParameters kps) -> std::vector< double,std::allocator< double > >"""
1607 return _IMP_em.bayesem3d_get_value_no_deriv(p, pt, mass_ii, kps)
1610 r"""bayesem3d_get_density_from_particle(DensityMap em, IMP::ParticlesTemp const & ps, double resolution, double const window_size=1.0) -> DensityMap"""
1611 return _IMP_em.bayesem3d_get_density_from_particle(em, ps, resolution, window_size)
1614 r"""bayesem3d_get_cross_correlation_coefficient(DensityMap em1, DensityMap em2) -> double"""
1615 return _IMP_em.bayesem3d_get_cross_correlation_coefficient(em1, em2)
1618 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 >"""
1619 return _IMP_em.bayesem3d_get_score_and_derivative(em, ps, resolution, sigma, window_size)
1622 r"""bayesem3d_get_normalized_intensities(DensityMap em, IMP::ParticlesTemp const & ps, double resolution)"""
1623 return _IMP_em.bayesem3d_get_normalized_intensities(em, ps, resolution)
1625 r"""Proxy of C++ IMP::em::FitRestraint class."""
1627 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1629 def __init__(self, *args):
1630 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"""
1631 _IMP_em.FitRestraint_swiginit(self, _IMP_em.new_FitRestraint(*args))
1633 def get_model_dens_map(self):
1634 r"""get_model_dens_map(FitRestraint self) -> SampledDensityMap"""
1635 return _IMP_em.FitRestraint_get_model_dens_map(self)
1637 def set_scale_factor(self, scale):
1638 r"""set_scale_factor(FitRestraint self, float scale)"""
1639 return _IMP_em.FitRestraint_set_scale_factor(self, scale)
1641 def get_scale_factor(self):
1642 r"""get_scale_factor(FitRestraint self) -> float"""
1643 return _IMP_em.FitRestraint_get_scale_factor(self)
1645 def do_get_inputs(self):
1646 r"""do_get_inputs(FitRestraint self) -> IMP::ModelObjectsTemp"""
1647 return _IMP_em.FitRestraint_do_get_inputs(self)
1649 def get_version_info(self):
1650 r"""get_version_info(FitRestraint self) -> VersionInfo"""
1651 return _IMP_em.FitRestraint_get_version_info(self)
1652 __swig_destroy__ = _IMP_em.delete_FitRestraint
1655 r"""__str__(FitRestraint self) -> std::string"""
1656 return _IMP_em.FitRestraint___str__(self)
1659 r"""__repr__(FitRestraint self) -> std::string"""
1660 return _IMP_em.FitRestraint___repr__(self)
1664 return _object_cast_to_FitRestraint(o)
1668 _IMP_em.FitRestraint_swigregister(FitRestraint)
1670 r"""Proxy of C++ IMP::em::FitRestraintBayesEM3D class."""
1672 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1674 def __init__(self, *args):
1675 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"""
1676 _IMP_em.FitRestraintBayesEM3D_swiginit(self, _IMP_em.new_FitRestraintBayesEM3D(*args))
1678 def do_get_inputs(self):
1679 r"""do_get_inputs(FitRestraintBayesEM3D self) -> IMP::ModelObjectsTemp"""
1680 return _IMP_em.FitRestraintBayesEM3D_do_get_inputs(self)
1682 def get_version_info(self):
1683 r"""get_version_info(FitRestraintBayesEM3D self) -> VersionInfo"""
1684 return _IMP_em.FitRestraintBayesEM3D_get_version_info(self)
1685 __swig_destroy__ = _IMP_em.delete_FitRestraintBayesEM3D
1688 r"""__str__(FitRestraintBayesEM3D self) -> std::string"""
1689 return _IMP_em.FitRestraintBayesEM3D___str__(self)
1692 r"""__repr__(FitRestraintBayesEM3D self) -> std::string"""
1693 return _IMP_em.FitRestraintBayesEM3D___repr__(self)
1697 return _object_cast_to_FitRestraintBayesEM3D(o)
1701 _IMP_em.FitRestraintBayesEM3D_swigregister(FitRestraintBayesEM3D)
1704 r"""density2particles(DensityMap dmap, IMP::Float threshold, Model m, int step=1) -> IMP::Particles"""
1705 return _IMP_em.density2particles(dmap, threshold, m, step)
1708 r"""density2vectors(DensityMap dmap, IMP::Float threshold) -> IMP::algebra::Vector3Ds"""
1709 return _IMP_em.density2vectors(dmap, threshold)
1712 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"""
1713 return _IMP_em.particles2density(*args)
1716 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"""
1717 return _IMP_em.particles2binarized_density(*args)
1720 r"""particles2surface(IMP::ParticlesTemp const & ps, IMP::Float apix, FloatKey weight_key=IMP::atom::Mass::get_mass_key()) -> SurfaceShellDensityMap"""
1721 return _IMP_em.particles2surface(*args)
1723 def calculate_intersection_score(d1, d2):
1724 r"""calculate_intersection_score(SurfaceShellDensityMap d1, SurfaceShellDensityMap d2) -> IMP::Float"""
1725 return _IMP_em.calculate_intersection_score(d1, d2)
1726 class SpiderHeader(object):
1727 r"""Proxy of C++ IMP::em::SpiderHeader class."""
1729 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1730 __repr__ = _swig_repr
1731 fNslice = property(_IMP_em.SpiderHeader_fNslice_get, _IMP_em.SpiderHeader_fNslice_set, doc=
r"""fNslice : float""")
1732 fNrow = property(_IMP_em.SpiderHeader_fNrow_get, _IMP_em.SpiderHeader_fNrow_set, doc=
r"""fNrow : float""")
1733 fNrec = property(_IMP_em.SpiderHeader_fNrec_get, _IMP_em.SpiderHeader_fNrec_set, doc=
r"""fNrec : float""")
1734 fNlabel = property(_IMP_em.SpiderHeader_fNlabel_get, _IMP_em.SpiderHeader_fNlabel_set, doc=
r"""fNlabel : float""")
1735 fIform = property(_IMP_em.SpiderHeader_fIform_get, _IMP_em.SpiderHeader_fIform_set, doc=
r"""fIform : float""")
1736 fImami = property(_IMP_em.SpiderHeader_fImami_get, _IMP_em.SpiderHeader_fImami_set, doc=
r"""fImami : float""")
1737 fFmax = property(_IMP_em.SpiderHeader_fFmax_get, _IMP_em.SpiderHeader_fFmax_set, doc=
r"""fFmax : float""")
1738 fFmin = property(_IMP_em.SpiderHeader_fFmin_get, _IMP_em.SpiderHeader_fFmin_set, doc=
r"""fFmin : float""")
1739 fAv = property(_IMP_em.SpiderHeader_fAv_get, _IMP_em.SpiderHeader_fAv_set, doc=
r"""fAv : float""")
1740 fSig = property(_IMP_em.SpiderHeader_fSig_get, _IMP_em.SpiderHeader_fSig_set, doc=
r"""fSig : float""")
1741 fIhist = property(_IMP_em.SpiderHeader_fIhist_get, _IMP_em.SpiderHeader_fIhist_set, doc=
r"""fIhist : float""")
1742 fNcol = property(_IMP_em.SpiderHeader_fNcol_get, _IMP_em.SpiderHeader_fNcol_set, doc=
r"""fNcol : float""")
1743 fLabrec = property(_IMP_em.SpiderHeader_fLabrec_get, _IMP_em.SpiderHeader_fLabrec_set, doc=
r"""fLabrec : float""")
1744 fIangle = property(_IMP_em.SpiderHeader_fIangle_get, _IMP_em.SpiderHeader_fIangle_set, doc=
r"""fIangle : float""")
1745 fPhi = property(_IMP_em.SpiderHeader_fPhi_get, _IMP_em.SpiderHeader_fPhi_set, doc=
r"""fPhi : float""")
1746 fTheta = property(_IMP_em.SpiderHeader_fTheta_get, _IMP_em.SpiderHeader_fTheta_set, doc=
r"""fTheta : float""")
1747 fPsi = property(_IMP_em.SpiderHeader_fPsi_get, _IMP_em.SpiderHeader_fPsi_set, doc=
r"""fPsi : float""")
1748 fXoff = property(_IMP_em.SpiderHeader_fXoff_get, _IMP_em.SpiderHeader_fXoff_set, doc=
r"""fXoff : float""")
1749 fYoff = property(_IMP_em.SpiderHeader_fYoff_get, _IMP_em.SpiderHeader_fYoff_set, doc=
r"""fYoff : float""")
1750 fZoff = property(_IMP_em.SpiderHeader_fZoff_get, _IMP_em.SpiderHeader_fZoff_set, doc=
r"""fZoff : float""")
1751 fScale = property(_IMP_em.SpiderHeader_fScale_get, _IMP_em.SpiderHeader_fScale_set, doc=
r"""fScale : float""")
1752 fLabbyt = property(_IMP_em.SpiderHeader_fLabbyt_get, _IMP_em.SpiderHeader_fLabbyt_set, doc=
r"""fLabbyt : float""")
1753 fLenbyt = property(_IMP_em.SpiderHeader_fLenbyt_get, _IMP_em.SpiderHeader_fLenbyt_set, doc=
r"""fLenbyt : float""")
1754 fNothing = property(_IMP_em.SpiderHeader_fNothing_get, _IMP_em.SpiderHeader_fNothing_set, doc=
r"""fNothing : a(24).char""")
1755 fFlag = property(_IMP_em.SpiderHeader_fFlag_get, _IMP_em.SpiderHeader_fFlag_set, doc=
r"""fFlag : float""")
1756 fPhi1 = property(_IMP_em.SpiderHeader_fPhi1_get, _IMP_em.SpiderHeader_fPhi1_set, doc=
r"""fPhi1 : float""")
1757 fTheta1 = property(_IMP_em.SpiderHeader_fTheta1_get, _IMP_em.SpiderHeader_fTheta1_set, doc=
r"""fTheta1 : float""")
1758 fPsi1 = property(_IMP_em.SpiderHeader_fPsi1_get, _IMP_em.SpiderHeader_fPsi1_set, doc=
r"""fPsi1 : float""")
1759 fPhi2 = property(_IMP_em.SpiderHeader_fPhi2_get, _IMP_em.SpiderHeader_fPhi2_set, doc=
r"""fPhi2 : float""")
1760 fTheta2 = property(_IMP_em.SpiderHeader_fTheta2_get, _IMP_em.SpiderHeader_fTheta2_set, doc=
r"""fTheta2 : float""")
1761 fPsi2 = property(_IMP_em.SpiderHeader_fPsi2_get, _IMP_em.SpiderHeader_fPsi2_set, doc=
r"""fPsi2 : float""")
1762 fGeo_matrix = property(_IMP_em.SpiderHeader_fGeo_matrix_get, _IMP_em.SpiderHeader_fGeo_matrix_set, doc=
r"""fGeo_matrix : a(3).a(3).double""")
1763 fAngle1 = property(_IMP_em.SpiderHeader_fAngle1_get, _IMP_em.SpiderHeader_fAngle1_set, doc=
r"""fAngle1 : float""")
1764 fr1 = property(_IMP_em.SpiderHeader_fr1_get, _IMP_em.SpiderHeader_fr1_set, doc=
r"""fr1 : float""")
1765 fr2 = property(_IMP_em.SpiderHeader_fr2_get, _IMP_em.SpiderHeader_fr2_set, doc=
r"""fr2 : float""")
1766 RTflag = property(_IMP_em.SpiderHeader_RTflag_get, _IMP_em.SpiderHeader_RTflag_set, doc=
r"""RTflag : float""")
1767 Astart = property(_IMP_em.SpiderHeader_Astart_get, _IMP_em.SpiderHeader_Astart_set, doc=
r"""Astart : float""")
1768 Aend = property(_IMP_em.SpiderHeader_Aend_get, _IMP_em.SpiderHeader_Aend_set, doc=
r"""Aend : float""")
1769 Ainc = property(_IMP_em.SpiderHeader_Ainc_get, _IMP_em.SpiderHeader_Ainc_set, doc=
r"""Ainc : float""")
1770 Rsigma = property(_IMP_em.SpiderHeader_Rsigma_get, _IMP_em.SpiderHeader_Rsigma_set, doc=
r"""Rsigma : float""")
1771 Tstart = property(_IMP_em.SpiderHeader_Tstart_get, _IMP_em.SpiderHeader_Tstart_set, doc=
r"""Tstart : float""")
1772 Tend = property(_IMP_em.SpiderHeader_Tend_get, _IMP_em.SpiderHeader_Tend_set, doc=
r"""Tend : float""")
1773 Tinc = property(_IMP_em.SpiderHeader_Tinc_get, _IMP_em.SpiderHeader_Tinc_set, doc=
r"""Tinc : float""")
1774 Weight = property(_IMP_em.SpiderHeader_Weight_get, _IMP_em.SpiderHeader_Weight_set, doc=
r"""Weight : float""")
1775 Flip = property(_IMP_em.SpiderHeader_Flip_get, _IMP_em.SpiderHeader_Flip_set, doc=
r"""Flip : float""")
1776 empty = property(_IMP_em.SpiderHeader_empty_get, _IMP_em.SpiderHeader_empty_set, doc=
r"""empty : a(576).char""")
1777 szIDat = property(_IMP_em.SpiderHeader_szIDat_get, _IMP_em.SpiderHeader_szIDat_set, doc=
r"""szIDat : a(12).char""")
1778 szITim = property(_IMP_em.SpiderHeader_szITim_get, _IMP_em.SpiderHeader_szITim_set, doc=
r"""szITim : a(8).char""")
1779 szITit = property(_IMP_em.SpiderHeader_szITit_get, _IMP_em.SpiderHeader_szITit_set, doc=
r"""szITit : a(160).char""")
1781 def show(self, out):
1782 r"""show(SpiderHeader self, _ostream out)"""
1783 return _IMP_em.SpiderHeader_show(self, out)
1786 r"""__init__(SpiderHeader self) -> SpiderHeader"""
1787 _IMP_em.SpiderHeader_swiginit(self, _IMP_em.new_SpiderHeader())
1788 __swig_destroy__ = _IMP_em.delete_SpiderHeader
1791 _IMP_em.SpiderHeader_swigregister(SpiderHeader)
1792 class ImageHeader(object):
1793 r"""Proxy of C++ IMP::em::ImageHeader class."""
1795 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
1796 __repr__ = _swig_repr
1797 IMG_BYTE = _IMP_em.ImageHeader_IMG_BYTE
1799 IMG_IMPEM = _IMP_em.ImageHeader_IMG_IMPEM
1801 IMG_INT = _IMP_em.ImageHeader_IMG_INT
1803 VOL_BYTE = _IMP_em.ImageHeader_VOL_BYTE
1805 VOL_IMPEM = _IMP_em.ImageHeader_VOL_IMPEM
1807 VOL_INT = _IMP_em.ImageHeader_VOL_INT
1809 IMG_FOURIER = _IMP_em.ImageHeader_IMG_FOURIER
1811 VOL_FOURIER = _IMP_em.ImageHeader_VOL_FOURIER
1814 def __init__(self, *args):
1816 __init__(ImageHeader self) -> ImageHeader
1817 __init__(ImageHeader self, IMP::em::ImageHeader::img_type im) -> ImageHeader
1818 __init__(ImageHeader self, float im) -> ImageHeader
1820 _IMP_em.ImageHeader_swiginit(self, _IMP_em.new_ImageHeader(*args))
1822 def get_image_type(self):
1823 r"""get_image_type(ImageHeader self) -> float"""
1824 return _IMP_em.ImageHeader_get_image_type(self)
1826 def set_image_type(self, *args):
1828 set_image_type(ImageHeader self, IMP::em::ImageHeader::img_type im)
1829 set_image_type(ImageHeader self, float im)
1831 return _IMP_em.ImageHeader_set_image_type(self, *args)
1833 def do_show(self, out):
1834 r"""do_show(ImageHeader self, _ostream out)"""
1835 return _IMP_em.ImageHeader_do_show(self, out)
1837 def show(self, *args):
1838 r"""show(ImageHeader self, _ostream out=std::cout)"""
1839 return _IMP_em.ImageHeader_show(self, *args)
1841 def print_hard(self, out):
1842 r"""print_hard(ImageHeader self, _ostream out)"""
1843 return _IMP_em.ImageHeader_print_hard(self, out)
1845 def show_projection_params(self, out):
1846 r"""show_projection_params(ImageHeader self, _ostream out)"""
1847 return _IMP_em.ImageHeader_show_projection_params(self, out)
1849 def read(self, *args):
1851 read(ImageHeader self, IMP::String const filename, bool skip_type_check=False, bool force_reversed=False, bool skip_extra_checkings=False) -> int
1852 read(ImageHeader self, std::ifstream & f, bool skip_type_check=False, bool force_reversed=False, bool skip_extra_checkings=False) -> bool
1854 return _IMP_em.ImageHeader_read(self, *args)
1856 def write(self, *args):
1858 write(ImageHeader self, IMP::String const & filename, bool force_reversed=False)
1859 write(ImageHeader self, std::ofstream & f, bool force_reversed=False)
1861 return _IMP_em.ImageHeader_write(self, *args)
1864 r"""clear(ImageHeader self)"""
1865 return _IMP_em.ImageHeader_clear(self)
1867 def set_header(self):
1868 r"""set_header(ImageHeader self)"""
1869 return _IMP_em.ImageHeader_set_header(self)
1871 def get_reversed(self):
1872 r"""get_reversed(ImageHeader self) -> bool"""
1873 return _IMP_em.ImageHeader_get_reversed(self)
1875 def set_reversed(self, value):
1876 r"""set_reversed(ImageHeader self, bool value)"""
1877 return _IMP_em.ImageHeader_set_reversed(self, value)
1879 def get_number_of_slices(self):
1880 r"""get_number_of_slices(ImageHeader self) -> unsigned int"""
1881 return _IMP_em.ImageHeader_get_number_of_slices(self)
1883 def set_number_of_slices(self, n):
1884 r"""set_number_of_slices(ImageHeader self, unsigned int n)"""
1885 return _IMP_em.ImageHeader_set_number_of_slices(self, n)
1887 def get_number_of_rows(self):
1888 r"""get_number_of_rows(ImageHeader self) -> unsigned int"""
1889 return _IMP_em.ImageHeader_get_number_of_rows(self)
1891 def set_number_of_rows(self, n):
1892 r"""set_number_of_rows(ImageHeader self, unsigned int n)"""
1893 return _IMP_em.ImageHeader_set_number_of_rows(self, n)
1895 def get_number_of_columns(self):
1896 r"""get_number_of_columns(ImageHeader self) -> unsigned int"""
1897 return _IMP_em.ImageHeader_get_number_of_columns(self)
1899 def set_number_of_columns(self, n):
1900 r"""set_number_of_columns(ImageHeader self, unsigned int n)"""
1901 return _IMP_em.ImageHeader_set_number_of_columns(self, n)
1903 def get_old_rot(self):
1904 r"""get_old_rot(ImageHeader self) -> float"""
1905 return _IMP_em.ImageHeader_get_old_rot(self)
1907 def set_old_rot(self, value):
1908 r"""set_old_rot(ImageHeader self, float value)"""
1909 return _IMP_em.ImageHeader_set_old_rot(self, value)
1911 def get_fAngle1(self):
1912 r"""get_fAngle1(ImageHeader self) -> float"""
1913 return _IMP_em.ImageHeader_get_fAngle1(self)
1915 def set_fAngle1(self, value):
1916 r"""set_fAngle1(ImageHeader self, float value)"""
1917 return _IMP_em.ImageHeader_set_fAngle1(self, value)
1919 def get_Scale(self):
1920 r"""get_Scale(ImageHeader self) -> float"""
1921 return _IMP_em.ImageHeader_get_Scale(self)
1923 def set_Scale(self, value):
1924 r"""set_Scale(ImageHeader self, float value)"""
1925 return _IMP_em.ImageHeader_set_Scale(self, value)
1928 r"""get_Flip(ImageHeader self) -> float"""
1929 return _IMP_em.ImageHeader_get_Flip(self)
1931 def set_Flip(self, value):
1932 r"""set_Flip(ImageHeader self, float value)"""
1933 return _IMP_em.ImageHeader_set_Flip(self, value)
1935 def get_Weight(self):
1936 r"""get_Weight(ImageHeader self) -> float"""
1937 return _IMP_em.ImageHeader_get_Weight(self)
1939 def set_Weight(self, value):
1940 r"""set_Weight(ImageHeader self, float value)"""
1941 return _IMP_em.ImageHeader_set_Weight(self, value)
1943 def get_fNrec(self):
1944 r"""get_fNrec(ImageHeader self) -> float"""
1945 return _IMP_em.ImageHeader_get_fNrec(self)
1947 def set_fNrec(self, value):
1948 r"""set_fNrec(ImageHeader self, float value)"""
1949 return _IMP_em.ImageHeader_set_fNrec(self, value)
1951 def get_fNlabel(self):
1952 r"""get_fNlabel(ImageHeader self) -> float"""
1953 return _IMP_em.ImageHeader_get_fNlabel(self)
1955 def set_fNlabel(self, value):
1956 r"""set_fNlabel(ImageHeader self, float value)"""
1957 return _IMP_em.ImageHeader_set_fNlabel(self, value)
1959 def get_fIform(self):
1960 r"""get_fIform(ImageHeader self) -> float"""
1961 return _IMP_em.ImageHeader_get_fIform(self)
1963 def set_fIform(self, value):
1964 r"""set_fIform(ImageHeader self, float value)"""
1965 return _IMP_em.ImageHeader_set_fIform(self, value)
1967 def get_fImami(self):
1968 r"""get_fImami(ImageHeader self) -> float"""
1969 return _IMP_em.ImageHeader_get_fImami(self)
1971 def set_fImami(self, value):
1972 r"""set_fImami(ImageHeader self, float value)"""
1973 return _IMP_em.ImageHeader_set_fImami(self, value)
1975 def get_fFmax(self):
1976 r"""get_fFmax(ImageHeader self) -> float"""
1977 return _IMP_em.ImageHeader_get_fFmax(self)
1979 def set_fFmax(self, value):
1980 r"""set_fFmax(ImageHeader self, float value)"""
1981 return _IMP_em.ImageHeader_set_fFmax(self, value)
1983 def get_fFmin(self):
1984 r"""get_fFmin(ImageHeader self) -> float"""
1985 return _IMP_em.ImageHeader_get_fFmin(self)
1987 def set_fFmin(self, value):
1988 r"""set_fFmin(ImageHeader self, float value)"""
1989 return _IMP_em.ImageHeader_set_fFmin(self, value)
1992 r"""get_fAv(ImageHeader self) -> float"""
1993 return _IMP_em.ImageHeader_get_fAv(self)
1995 def set_fAv(self, value):
1996 r"""set_fAv(ImageHeader self, float value)"""
1997 return _IMP_em.ImageHeader_set_fAv(self, value)
2000 r"""get_fSig(ImageHeader self) -> float"""
2001 return _IMP_em.ImageHeader_get_fSig(self)
2003 def set_fSig(self, value):
2004 r"""set_fSig(ImageHeader self, float value)"""
2005 return _IMP_em.ImageHeader_set_fSig(self, value)
2007 def get_fIhist(self):
2008 r"""get_fIhist(ImageHeader self) -> float"""
2009 return _IMP_em.ImageHeader_get_fIhist(self)
2011 def set_fIhist(self, value):
2012 r"""set_fIhist(ImageHeader self, float value)"""
2013 return _IMP_em.ImageHeader_set_fIhist(self, value)
2015 def get_fLabrec(self):
2016 r"""get_fLabrec(ImageHeader self) -> float"""
2017 return _IMP_em.ImageHeader_get_fLabrec(self)
2019 def set_fLabrec(self, value):
2020 r"""set_fLabrec(ImageHeader self, float value)"""
2021 return _IMP_em.ImageHeader_set_fLabrec(self, value)
2023 def get_fIangle(self):
2024 r"""get_fIangle(ImageHeader self) -> float"""
2025 return _IMP_em.ImageHeader_get_fIangle(self)
2027 def set_fIangle(self, value):
2028 r"""set_fIangle(ImageHeader self, float value)"""
2029 return _IMP_em.ImageHeader_set_fIangle(self, value)
2031 def get_origin(self):
2032 r"""get_origin(ImageHeader self) -> Vector3D"""
2033 return _IMP_em.ImageHeader_get_origin(self)
2035 def set_origin(self, *args):
2037 set_origin(ImageHeader self, Vector3D v)
2038 set_origin(ImageHeader self, Vector2D v)
2040 return _IMP_em.ImageHeader_set_origin(self, *args)
2042 def get_object_pixel_size(self):
2043 r"""get_object_pixel_size(ImageHeader self) -> float"""
2044 return _IMP_em.ImageHeader_get_object_pixel_size(self)
2046 def set_object_pixel_size(self, value):
2047 r"""set_object_pixel_size(ImageHeader self, float value)"""
2048 return _IMP_em.ImageHeader_set_object_pixel_size(self, value)
2050 def get_fLabbyt(self):
2051 r"""get_fLabbyt(ImageHeader self) -> float"""
2052 return _IMP_em.ImageHeader_get_fLabbyt(self)
2054 def set_fLabbyt(self, value):
2055 r"""set_fLabbyt(ImageHeader self, float value)"""
2056 return _IMP_em.ImageHeader_set_fLabbyt(self, value)
2058 def get_fLenbyt(self):
2059 r"""get_fLenbyt(ImageHeader self) -> float"""
2060 return _IMP_em.ImageHeader_get_fLenbyt(self)
2062 def set_fLenbyt(self, value):
2063 r"""set_fLenbyt(ImageHeader self, float value)"""
2064 return _IMP_em.ImageHeader_set_fLenbyt(self, value)
2066 def get_fGeo_matrix(self, i, j):
2067 r"""get_fGeo_matrix(ImageHeader self, unsigned int i, unsigned int j) -> double"""
2068 return _IMP_em.ImageHeader_get_fGeo_matrix(self, i, j)
2070 def get_fFlag(self):
2071 r"""get_fFlag(ImageHeader self) -> float"""
2072 return _IMP_em.ImageHeader_get_fFlag(self)
2074 def set_fFlag(self, value):
2075 r"""set_fFlag(ImageHeader self, float value)"""
2076 return _IMP_em.ImageHeader_set_fFlag(self, value)
2078 def get_euler_angles(self):
2079 r"""get_euler_angles(ImageHeader self) -> Vector3D"""
2080 return _IMP_em.ImageHeader_get_euler_angles(self)
2082 def get_euler_angles1(self):
2083 r"""get_euler_angles1(ImageHeader self) -> Vector3D"""
2084 return _IMP_em.ImageHeader_get_euler_angles1(self)
2086 def get_euler_angles2(self):
2087 r"""get_euler_angles2(ImageHeader self) -> Vector3D"""
2088 return _IMP_em.ImageHeader_get_euler_angles2(self)
2090 def set_euler_angles(self, euler):
2091 r"""set_euler_angles(ImageHeader self, Vector3D euler)"""
2092 return _IMP_em.ImageHeader_set_euler_angles(self, euler)
2094 def set_euler_angles1(self, euler):
2095 r"""set_euler_angles1(ImageHeader self, Vector3D euler)"""
2096 return _IMP_em.ImageHeader_set_euler_angles1(self, euler)
2098 def set_euler_angles2(self, euler):
2099 r"""set_euler_angles2(ImageHeader self, Vector3D euler)"""
2100 return _IMP_em.ImageHeader_set_euler_angles2(self, euler)
2102 def is_normalized(self):
2103 r"""is_normalized(ImageHeader self) -> bool"""
2104 return _IMP_em.ImageHeader_is_normalized(self)
2107 r"""set_date(ImageHeader self)"""
2108 return _IMP_em.ImageHeader_set_date(self)
2111 r"""set_time(ImageHeader self)"""
2112 return _IMP_em.ImageHeader_set_time(self)
2114 def set_title(self, newName):
2115 r"""set_title(ImageHeader self, IMP::String newName)"""
2116 return _IMP_em.ImageHeader_set_title(self, newName)
2117 __swig_destroy__ = _IMP_em.delete_ImageHeader
2120 _IMP_em.ImageHeader_swigregister(ImageHeader)
2121 class SpiderMapReaderWriter(MapReaderWriter):
2122 r"""Proxy of C++ IMP::em::SpiderMapReaderWriter class."""
2124 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2125 filename_ = property(_IMP_em.SpiderMapReaderWriter_filename__get, _IMP_em.SpiderMapReaderWriter_filename__set, doc=
r"""filename_ : IMP::String""")
2126 skip_type_check_ = property(_IMP_em.SpiderMapReaderWriter_skip_type_check__get, _IMP_em.SpiderMapReaderWriter_skip_type_check__set, doc=
r"""skip_type_check_ : bool""")
2127 force_reversed_ = property(_IMP_em.SpiderMapReaderWriter_force_reversed__get, _IMP_em.SpiderMapReaderWriter_force_reversed__set, doc=
r"""force_reversed_ : bool""")
2128 skip_extra_checkings_ = property(_IMP_em.SpiderMapReaderWriter_skip_extra_checkings__get, _IMP_em.SpiderMapReaderWriter_skip_extra_checkings__set, doc=
r"""skip_extra_checkings_ : bool""")
2130 def __init__(self, *args):
2132 __init__(SpiderMapReaderWriter self) -> SpiderMapReaderWriter
2133 __init__(SpiderMapReaderWriter self, IMP::String filename, bool skip_type_check, bool force_reversed, bool skip_extra_checkings) -> SpiderMapReaderWriter
2135 _IMP_em.SpiderMapReaderWriter_swiginit(self, _IMP_em.new_SpiderMapReaderWriter(*args))
2136 __swig_destroy__ = _IMP_em.delete_SpiderMapReaderWriter
2139 r"""__str__(SpiderMapReaderWriter self) -> std::string"""
2140 return _IMP_em.SpiderMapReaderWriter___str__(self)
2143 r"""__repr__(SpiderMapReaderWriter self) -> std::string"""
2144 return _IMP_em.SpiderMapReaderWriter___repr__(self)
2148 return _object_cast_to_SpiderMapReaderWriter(o)
2152 _IMP_em.SpiderMapReaderWriter_swigregister(SpiderMapReaderWriter)
2153 class FittingSolutions(object):
2154 r"""Proxy of C++ IMP::em::FittingSolutions class."""
2156 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2159 r"""__init__(FittingSolutions self) -> FittingSolutions"""
2160 _IMP_em.FittingSolutions_swiginit(self, _IMP_em.new_FittingSolutions())
2162 def get_number_of_solutions(self):
2163 r"""get_number_of_solutions(FittingSolutions self) -> int"""
2164 return _IMP_em.FittingSolutions_get_number_of_solutions(self)
2166 def get_transformation(self, i):
2167 r"""get_transformation(FittingSolutions self, unsigned int i) -> Transformation3D"""
2168 return _IMP_em.FittingSolutions_get_transformation(self, i)
2170 def get_score(self, i):
2171 r"""get_score(FittingSolutions self, unsigned int i) -> IMP::Float"""
2172 return _IMP_em.FittingSolutions_get_score(self, i)
2174 def set_score(self, i, score):
2175 r"""set_score(FittingSolutions self, unsigned int i, IMP::Float score)"""
2176 return _IMP_em.FittingSolutions_set_score(self, i, score)
2178 def add_solution(self, t, score):
2179 r"""add_solution(FittingSolutions self, Transformation3D t, IMP::Float score)"""
2180 return _IMP_em.FittingSolutions_add_solution(self, t, score)
2182 def sort(self, reverse=False):
2183 r"""sort(FittingSolutions self, bool reverse=False)"""
2184 return _IMP_em.FittingSolutions_sort(self, reverse)
2187 r"""multiply(FittingSolutions self, Transformation3D t)"""
2188 return _IMP_em.FittingSolutions_multiply(self, t)
2190 def get_transformations(self):
2191 r"""get_transformations(FittingSolutions self) -> IMP::algebra::Transformation3Ds"""
2192 return _IMP_em.FittingSolutions_get_transformations(self)
2194 def show(self, *args):
2195 r"""show(FittingSolutions self, _ostream out=std::cout)"""
2196 return _IMP_em.FittingSolutions_show(self, *args)
2199 r"""__str__(FittingSolutions self) -> std::string"""
2200 return _IMP_em.FittingSolutions___str__(self)
2203 r"""__repr__(FittingSolutions self) -> std::string"""
2204 return _IMP_em.FittingSolutions___repr__(self)
2206 def _get_as_binary(self):
2207 r"""_get_as_binary(FittingSolutions self) -> PyObject *"""
2208 return _IMP_em.FittingSolutions__get_as_binary(self)
2210 def _set_from_binary(self, p):
2211 r"""_set_from_binary(FittingSolutions self, PyObject * p)"""
2212 return _IMP_em.FittingSolutions__set_from_binary(self, p)
2214 def __getstate__(self):
2215 p = self._get_as_binary()
2216 if len(self.__dict__) > 1:
2217 d = self.__dict__.copy()
2222 def __setstate__(self, p):
2223 if not hasattr(self,
'this'):
2225 if isinstance(p, tuple):
2227 self.__dict__.update(d)
2228 return self._set_from_binary(p)
2230 __swig_destroy__ = _IMP_em.delete_FittingSolutions
2233 _IMP_em.FittingSolutions_swigregister(FittingSolutions)
2235 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):
2236 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"""
2237 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)
2239 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):
2240 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"""
2241 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)
2243 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):
2244 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"""
2245 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)
2247 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):
2248 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"""
2249 return _IMP_em.local_rigid_fitting_grid_search(ps, wei_key, dmap, max_voxels_translation, translation_step, max_angle_in_radians, number_of_rotations)
2253 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
2254 compute_fitting_scores(DensityMap em_map, RigidBody rb, Refiner refiner, IMP::algebra::Transformation3Ds const & transformations) -> FittingSolutions
2256 return _IMP_em.compute_fitting_scores(*args)
2259 r"""compute_fitting_score(IMP::ParticlesTemp const & ps, DensityMap em_map, FloatKey wei_key=IMP::atom::Mass::get_mass_key()) -> IMP::Float"""
2260 return _IMP_em.compute_fitting_score(*args)
2263 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"""
2264 return _IMP_em.get_number_of_particles_outside_of_the_density(*args)
2267 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"""
2268 return _IMP_em.get_numbers_of_particles_outside_of_the_density(dmap, ps, transformations, thr)
2271 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"""
2272 return _IMP_em.get_percentage_of_voxels_covered_by_particles(*args)
2274 r"""Proxy of C++ IMP::em::HighDensityEmbedding class."""
2276 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2278 def __init__(self, dm, threshold):
2279 r"""__init__(HighDensityEmbedding self, DensityMap dm, double threshold) -> HighDensityEmbedding"""
2280 _IMP_em.HighDensityEmbedding_swiginit(self, _IMP_em.new_HighDensityEmbedding(dm, threshold))
2282 def get_version_info(self):
2283 r"""get_version_info(HighDensityEmbedding self) -> VersionInfo"""
2284 return _IMP_em.HighDensityEmbedding_get_version_info(self)
2285 __swig_destroy__ = _IMP_em.delete_HighDensityEmbedding
2288 r"""__str__(HighDensityEmbedding self) -> std::string"""
2289 return _IMP_em.HighDensityEmbedding___str__(self)
2292 r"""__repr__(HighDensityEmbedding self) -> std::string"""
2293 return _IMP_em.HighDensityEmbedding___repr__(self)
2297 return _object_cast_to_HighDensityEmbedding(o)
2301 _IMP_em.HighDensityEmbedding_swigregister(HighDensityEmbedding)
2304 r"""mask_and_norm(DensityMap dmap, DensityMap mask) -> DensityMap"""
2305 return _IMP_em.mask_and_norm(dmap, mask)
2308 r"""get_volume_at_threshold(DensityMap m, IMP::Float threshold) -> IMP::Float"""
2309 return _IMP_em.get_volume_at_threshold(m, threshold)
2312 r"""get_molecular_mass_at_threshold(DensityMap m, IMP::Float threshold, IMP::atom::ProteinDensityReference ref=HARPAZ) -> IMP::Float"""
2313 return _IMP_em.get_molecular_mass_at_threshold(*args)
2316 r"""get_threshold_for_approximate_volume(DensityMap m, IMP::Float desired_volume) -> IMP::Float"""
2317 return _IMP_em.get_threshold_for_approximate_volume(m, desired_volume)
2320 r"""get_threshold_for_approximate_mass(DensityMap m, IMP::Float desired_mass, IMP::atom::ProteinDensityReference ref=HARPAZ) -> IMP::Float"""
2321 return _IMP_em.get_threshold_for_approximate_mass(*args)
2323 r"""Proxy of C++ IMP::em::EnvelopePenetrationRestraint class."""
2325 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2327 def __init__(self, ps, em_map, threshold):
2328 r"""__init__(EnvelopePenetrationRestraint self, IMP::Particles ps, DensityMap em_map, IMP::Float threshold) -> EnvelopePenetrationRestraint"""
2329 _IMP_em.EnvelopePenetrationRestraint_swiginit(self, _IMP_em.new_EnvelopePenetrationRestraint(ps, em_map, threshold))
2331 def do_get_inputs(self):
2332 r"""do_get_inputs(EnvelopePenetrationRestraint self) -> IMP::ModelObjectsTemp"""
2333 return _IMP_em.EnvelopePenetrationRestraint_do_get_inputs(self)
2335 def get_version_info(self):
2336 r"""get_version_info(EnvelopePenetrationRestraint self) -> VersionInfo"""
2337 return _IMP_em.EnvelopePenetrationRestraint_get_version_info(self)
2338 __swig_destroy__ = _IMP_em.delete_EnvelopePenetrationRestraint
2341 r"""__str__(EnvelopePenetrationRestraint self) -> std::string"""
2342 return _IMP_em.EnvelopePenetrationRestraint___str__(self)
2345 r"""__repr__(EnvelopePenetrationRestraint self) -> std::string"""
2346 return _IMP_em.EnvelopePenetrationRestraint___repr__(self)
2350 return _object_cast_to_EnvelopePenetrationRestraint(o)
2354 _IMP_em.EnvelopePenetrationRestraint_swigregister(EnvelopePenetrationRestraint)
2356 r"""Proxy of C++ IMP::em::PCAFitRestraint class."""
2358 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2360 def __init__(self, *args):
2361 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"""
2362 _IMP_em.PCAFitRestraint_swiginit(self, _IMP_em.new_PCAFitRestraint(*args))
2364 def do_get_inputs(self):
2365 r"""do_get_inputs(PCAFitRestraint self) -> IMP::ModelObjectsTemp"""
2366 return _IMP_em.PCAFitRestraint_do_get_inputs(self)
2368 def get_version_info(self):
2369 r"""get_version_info(PCAFitRestraint self) -> VersionInfo"""
2370 return _IMP_em.PCAFitRestraint_get_version_info(self)
2371 __swig_destroy__ = _IMP_em.delete_PCAFitRestraint
2374 r"""__str__(PCAFitRestraint self) -> std::string"""
2375 return _IMP_em.PCAFitRestraint___str__(self)
2378 r"""__repr__(PCAFitRestraint self) -> std::string"""
2379 return _IMP_em.PCAFitRestraint___repr__(self)
2383 return _object_cast_to_PCAFitRestraint(o)
2387 _IMP_em.PCAFitRestraint_swigregister(PCAFitRestraint)
2389 r"""Proxy of C++ IMP::em::EnvelopeFitRestraint class."""
2391 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2393 def __init__(self, particles, em_map, density_threshold, penetration_threshold):
2394 r"""__init__(EnvelopeFitRestraint self, IMP::Particles particles, DensityMap em_map, double density_threshold, double penetration_threshold) -> EnvelopeFitRestraint"""
2395 _IMP_em.EnvelopeFitRestraint_swiginit(self, _IMP_em.new_EnvelopeFitRestraint(particles, em_map, density_threshold, penetration_threshold))
2397 def get_transformation(self):
2398 r"""get_transformation(EnvelopeFitRestraint self) -> Transformation3D"""
2399 return _IMP_em.EnvelopeFitRestraint_get_transformation(self)
2401 def apply_transformation(self):
2402 r"""apply_transformation(EnvelopeFitRestraint self)"""
2403 return _IMP_em.EnvelopeFitRestraint_apply_transformation(self)
2405 def do_get_inputs(self):
2406 r"""do_get_inputs(EnvelopeFitRestraint self) -> IMP::ModelObjectsTemp"""
2407 return _IMP_em.EnvelopeFitRestraint_do_get_inputs(self)
2409 def get_version_info(self):
2410 r"""get_version_info(EnvelopeFitRestraint self) -> VersionInfo"""
2411 return _IMP_em.EnvelopeFitRestraint_get_version_info(self)
2412 __swig_destroy__ = _IMP_em.delete_EnvelopeFitRestraint
2415 r"""__str__(EnvelopeFitRestraint self) -> std::string"""
2416 return _IMP_em.EnvelopeFitRestraint___str__(self)
2419 r"""__repr__(EnvelopeFitRestraint self) -> std::string"""
2420 return _IMP_em.EnvelopeFitRestraint___repr__(self)
2424 return _object_cast_to_EnvelopeFitRestraint(o)
2428 _IMP_em.EnvelopeFitRestraint_swigregister(EnvelopeFitRestraint)
2429 class MapDistanceTransform(DensityMap):
2430 r"""Proxy of C++ IMP::em::MapDistanceTransform class."""
2432 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2434 def __init__(self, map, density_threshold, max_distance):
2435 r"""__init__(MapDistanceTransform self, DensityMap map, float density_threshold, float max_distance) -> MapDistanceTransform"""
2436 _IMP_em.MapDistanceTransform_swiginit(self, _IMP_em.new_MapDistanceTransform(map, density_threshold, max_distance))
2438 def get_distance_from_envelope(self, v):
2439 r"""get_distance_from_envelope(MapDistanceTransform self, Vector3D v) -> float"""
2440 return _IMP_em.MapDistanceTransform_get_distance_from_envelope(self, v)
2443 r"""__str__(MapDistanceTransform self) -> std::string"""
2444 return _IMP_em.MapDistanceTransform___str__(self)
2447 r"""__repr__(MapDistanceTransform self) -> std::string"""
2448 return _IMP_em.MapDistanceTransform___repr__(self)
2452 return _object_cast_to_MapDistanceTransform(o)
2454 __swig_destroy__ = _IMP_em.delete_MapDistanceTransform
2457 _IMP_em.MapDistanceTransform_swigregister(MapDistanceTransform)
2459 r"""Proxy of C++ IMP::em::EnvelopeScore class."""
2461 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
2463 def __init__(self, mdt):
2464 r"""__init__(EnvelopeScore self, MapDistanceTransform mdt) -> EnvelopeScore"""
2465 _IMP_em.EnvelopeScore_swiginit(self, _IMP_em.new_EnvelopeScore(mdt))
2467 def is_penetrating(self, *args):
2469 is_penetrating(EnvelopeScore self, IMP::algebra::Vector3Ds const & points, float penetration_thr) -> bool
2470 is_penetrating(EnvelopeScore self, IMP::algebra::Vector3Ds const & points, Transformation3D trans, float penetration_thr) -> bool
2472 return _IMP_em.EnvelopeScore_is_penetrating(self, *args)
2474 def score(self, *args):
2476 score(EnvelopeScore self, IMP::algebra::Vector3Ds const & points) -> double
2477 score(EnvelopeScore self, IMP::algebra::Vector3Ds const & points, Transformation3D trans) -> double
2479 return _IMP_em.EnvelopeScore_score(self, *args)
2480 __swig_destroy__ = _IMP_em.delete_EnvelopeScore
2483 r"""__str__(EnvelopeScore self) -> std::string"""
2484 return _IMP_em.EnvelopeScore___str__(self)
2487 r"""__repr__(EnvelopeScore self) -> std::string"""
2488 return _IMP_em.EnvelopeScore___repr__(self)
2492 return _object_cast_to_EnvelopeScore(o)
2496 _IMP_em.EnvelopeScore_swigregister(EnvelopeScore)
2501 """Write out principal components to a file in Chimera Marker format"""
2502 eigen_values = pca.get_principal_values()
2503 eigen_vecs = pca.get_principal_components()
2504 centroid = pca.get_centroid()
2506 fh.write(
"<marker_set>\n")
2507 fh.write(
"<!-- PCA with eigen values: (%g,%g,%g) and "
2508 "centroid (%g,%g,%g) -->\n"
2509 % (math.sqrt(eigen_values[0]),
2510 math.sqrt(eigen_values[1]),
2511 math.sqrt(eigen_values[2]),
2512 centroid[0], centroid[1], centroid[2]))
2517 val = math.sqrt(eigen_values[i])
2518 v1 = centroid - val * eigen_vecs[i]
2519 v2 = centroid + val * eigen_vecs[i]
2520 for markerid, v
in ((i*2+1, v1), (i*2+2, v2)):
2521 fh.write(
"<marker id=\"%d\" x=\"%g\" y=\"%g\" z=\"%g\" "
2523 % (markerid, v[0], v[1], v[2], radius))
2525 for i
in range(1, 7, 2):
2526 fh.write(
"<link id1= \"%d\" id2=\"%d\" radius=\"%g\"/>\n"
2528 fh.write(
"</marker_set>\n")
2532 r"""get_module_version() -> std::string const"""
2533 return _IMP_em.get_module_version()
2536 r"""get_example_path(std::string fname) -> std::string"""
2537 return _IMP_em.get_example_path(fname)
2540 r"""get_data_path(std::string fname) -> std::string"""
2541 return _IMP_em.get_data_path(fname)
2543 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.