IMP logo
IMP Reference Guide  2.20.2
The Integrative Modeling Platform
em/__init__.py
1 # This file was automatically generated by SWIG (https://www.swig.org).
2 # Version 4.2.1
3 #
4 # Do not make changes to this file unless you know what you are doing - modify
5 # the SWIG interface file instead.
6 
7 
8 # This wrapper is part of IMP,
9 # Copyright 2007-2024 IMP Inventors. All rights reserved.
10 
11 from __future__ import print_function, division, absolute_import
12 
13 
14 
15 from sys import version_info as _swig_python_version_info
16 import _IMP_em
17 
18 try:
19  import builtins as __builtin__
20 except ImportError:
21  import __builtin__
22 
23 def _swig_repr(self):
24  try:
25  strthis = "proxy of " + self.this.__repr__()
26  except __builtin__.Exception:
27  strthis = ""
28  return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
29 
30 
31 def _swig_setattr_nondynamic_instance_variable(set):
32  def set_instance_attr(self, name, value):
33  if name == "this":
34  set(self, name, value)
35  elif name == "thisown":
36  self.this.own(value)
37  elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
38  set(self, name, value)
39  else:
40  raise AttributeError("You cannot add instance attributes to %s" % self)
41  return set_instance_attr
42 
43 
44 def _swig_setattr_nondynamic_class_variable(set):
45  def set_class_attr(cls, name, value):
46  if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
47  set(cls, name, value)
48  else:
49  raise AttributeError("You cannot add class attributes to %s" % cls)
50  return set_class_attr
51 
52 
53 def _swig_add_metaclass(metaclass):
54  """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
55  def wrapper(cls):
56  return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
57  return wrapper
58 
59 
60 class _SwigNonDynamicMeta(type):
61  """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
62  __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
63 
64 
65 import weakref
66 
67 class IMP_EM_SwigPyIterator(object):
68  r"""Proxy of C++ swig::IMP_EM_SwigPyIterator class."""
69 
70  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
71 
72  def __init__(self, *args, **kwargs):
73  raise AttributeError("No constructor defined - class is abstract")
74  __repr__ = _swig_repr
75  __swig_destroy__ = _IMP_em.delete_IMP_EM_SwigPyIterator
76 
77  def value(self):
78  r"""value(IMP_EM_SwigPyIterator self) -> PyObject *"""
79  return _IMP_em.IMP_EM_SwigPyIterator_value(self)
80 
81  def incr(self, n=1):
82  r"""incr(IMP_EM_SwigPyIterator self, size_t n=1) -> IMP_EM_SwigPyIterator"""
83  return _IMP_em.IMP_EM_SwigPyIterator_incr(self, n)
84 
85  def decr(self, n=1):
86  r"""decr(IMP_EM_SwigPyIterator self, size_t n=1) -> IMP_EM_SwigPyIterator"""
87  return _IMP_em.IMP_EM_SwigPyIterator_decr(self, n)
88 
89  def distance(self, x):
90  r"""distance(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> ptrdiff_t"""
91  return _IMP_em.IMP_EM_SwigPyIterator_distance(self, x)
92 
93  def equal(self, x):
94  r"""equal(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> bool"""
95  return _IMP_em.IMP_EM_SwigPyIterator_equal(self, x)
96 
97  def copy(self):
98  r"""copy(IMP_EM_SwigPyIterator self) -> IMP_EM_SwigPyIterator"""
99  return _IMP_em.IMP_EM_SwigPyIterator_copy(self)
100 
101  def next(self):
102  r"""next(IMP_EM_SwigPyIterator self) -> PyObject *"""
103  return _IMP_em.IMP_EM_SwigPyIterator_next(self)
104 
105  def __next__(self):
106  r"""__next__(IMP_EM_SwigPyIterator self) -> PyObject *"""
107  return _IMP_em.IMP_EM_SwigPyIterator___next__(self)
108 
109  def previous(self):
110  r"""previous(IMP_EM_SwigPyIterator self) -> PyObject *"""
111  return _IMP_em.IMP_EM_SwigPyIterator_previous(self)
112 
113  def advance(self, n):
114  r"""advance(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator"""
115  return _IMP_em.IMP_EM_SwigPyIterator_advance(self, n)
116 
117  def __eq__(self, x):
118  r"""__eq__(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> bool"""
119  return _IMP_em.IMP_EM_SwigPyIterator___eq__(self, x)
120 
121  def __ne__(self, x):
122  r"""__ne__(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> bool"""
123  return _IMP_em.IMP_EM_SwigPyIterator___ne__(self, x)
124 
125  def __iadd__(self, n):
126  r"""__iadd__(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator"""
127  return _IMP_em.IMP_EM_SwigPyIterator___iadd__(self, n)
128 
129  def __isub__(self, n):
130  r"""__isub__(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator"""
131  return _IMP_em.IMP_EM_SwigPyIterator___isub__(self, n)
132 
133  def __add__(self, n):
134  r"""__add__(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator"""
135  return _IMP_em.IMP_EM_SwigPyIterator___add__(self, n)
136 
137  def __sub__(self, *args):
138  r"""
139  __sub__(IMP_EM_SwigPyIterator self, ptrdiff_t n) -> IMP_EM_SwigPyIterator
140  __sub__(IMP_EM_SwigPyIterator self, IMP_EM_SwigPyIterator x) -> ptrdiff_t
141  """
142  return _IMP_em.IMP_EM_SwigPyIterator___sub__(self, *args)
143  def __iter__(self):
144  return self
145 
146 # Register IMP_EM_SwigPyIterator in _IMP_em:
147 _IMP_em.IMP_EM_SwigPyIterator_swigregister(IMP_EM_SwigPyIterator)
148 
149 _value_types=[]
150 _object_types=[]
151 _raii_types=[]
152 _plural_types=[]
153 
154 IMP_DEBUG = _IMP_em.IMP_DEBUG
155 
156 IMP_RELEASE = _IMP_em.IMP_RELEASE
157 
158 IMP_SILENT = _IMP_em.IMP_SILENT
159 
160 IMP_PROGRESS = _IMP_em.IMP_PROGRESS
161 
162 IMP_TERSE = _IMP_em.IMP_TERSE
163 
164 IMP_VERBOSE = _IMP_em.IMP_VERBOSE
165 
166 IMP_MEMORY = _IMP_em.IMP_MEMORY
167 
168 IMP_NONE = _IMP_em.IMP_NONE
169 
170 IMP_USAGE = _IMP_em.IMP_USAGE
171 
172 IMP_INTERNAL = _IMP_em.IMP_INTERNAL
173 
174 IMP_KERNEL_HAS_LOG4CXX = _IMP_em.IMP_KERNEL_HAS_LOG4CXX
175 
176 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_em.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
177 
178 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_em.IMP_COMPILER_HAS_DEBUG_VECTOR
179 
180 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_em.IMP_COMPILER_HAS_RANDOM_SHUFFLE
181 
182 IMP_COMPILER_HAS_THREE_WAY = _IMP_em.IMP_COMPILER_HAS_THREE_WAY
183 
184 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_em.IMP_KERNEL_HAS_BOOST_RANDOM
185 
186 IMP_KERNEL_HAS_NUMPY = _IMP_em.IMP_KERNEL_HAS_NUMPY
187 
188 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_em.IMP_KERNEL_HAS_GPERFTOOLS
189 
190 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_em.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
191 
192 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_em.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
193 
194 IMPKERNEL_SHOW_WARNINGS = _IMP_em.IMPKERNEL_SHOW_WARNINGS
195 
196 
197 import sys
198 class _DirectorObjects(object):
199  """@internal Simple class to keep references to director objects
200  to prevent premature deletion."""
201  def __init__(self):
202  self._objects = []
203  def register(self, obj):
204  """Take a reference to a director object; will only work for
205  refcounted C++ classes"""
206  if hasattr(obj, 'get_ref_count'):
207  self._objects.append(obj)
208  def cleanup(self):
209  """Only drop our reference and allow cleanup by Python if no other
210  Python references exist (we hold 3 references: one in self._objects,
211  one in x, and one in the argument list for getrefcount) *and* no
212  other C++ references exist (the Python object always holds one)"""
213  objs = [x for x in self._objects if sys.getrefcount(x) > 3 \
214  or x.get_ref_count() > 1]
215 # Do in two steps so the references are kept until the end of the
216 # function (deleting references may trigger a fresh call to this method)
217  self._objects = objs
218  def get_object_count(self):
219  """Get number of director objects (useful for testing only)"""
220  return len(self._objects)
221 _director_objects = _DirectorObjects()
222 
223 class _ostream(object):
224  r"""Proxy of C++ std::ostream class."""
225 
226  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
227 
228  def __init__(self, *args, **kwargs):
229  raise AttributeError("No constructor defined")
230  __repr__ = _swig_repr
231 
232  def write(self, osa_buf):
233  r"""write(_ostream self, char const * osa_buf)"""
234  return _IMP_em._ostream_write(self, osa_buf)
235 
236 # Register _ostream in _IMP_em:
237 _IMP_em._ostream_swigregister(_ostream)
238 IMP_C_OPEN_BINARY = _IMP_em.IMP_C_OPEN_BINARY
239 
240 import IMP
241 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_CGAL_HAS_BOOST_FILESYSTEM
242 
243 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
244 
245 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_em.IMP_CGAL_HAS_BOOST_RANDOM
246 
247 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_em.IMP_CGAL_HAS_BOOST_SYSTEM
248 
249 IMP_CGAL_HAS_NUMPY = _IMP_em.IMP_CGAL_HAS_NUMPY
250 
251 IMPCGAL_SHOW_WARNINGS = _IMP_em.IMPCGAL_SHOW_WARNINGS
252 
253 import IMP.cgal
254 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_em.IMP_ALGEBRA_HAS_IMP_CGAL
255 
256 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
257 
258 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
259 
260 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_em.IMP_ALGEBRA_HAS_BOOST_RANDOM
261 
262 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_em.IMP_ALGEBRA_HAS_BOOST_SYSTEM
263 
264 IMP_ALGEBRA_HAS_CGAL = _IMP_em.IMP_ALGEBRA_HAS_CGAL
265 
266 IMP_ALGEBRA_HAS_NUMPY = _IMP_em.IMP_ALGEBRA_HAS_NUMPY
267 
268 IMP_ALGEBRA_HAS_ANN = _IMP_em.IMP_ALGEBRA_HAS_ANN
269 
270 IMPALGEBRA_SHOW_WARNINGS = _IMP_em.IMPALGEBRA_SHOW_WARNINGS
271 
272 import IMP.algebra
273 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_em.IMP_DISPLAY_HAS_IMP_CGAL
274 
275 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
276 
277 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
278 
279 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_em.IMP_DISPLAY_HAS_BOOST_RANDOM
280 
281 IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_em.IMP_DISPLAY_HAS_BOOST_SYSTEM
282 
283 IMP_DISPLAY_HAS_CGAL = _IMP_em.IMP_DISPLAY_HAS_CGAL
284 
285 IMP_DISPLAY_HAS_NUMPY = _IMP_em.IMP_DISPLAY_HAS_NUMPY
286 
287 IMPDISPLAY_SHOW_WARNINGS = _IMP_em.IMPDISPLAY_SHOW_WARNINGS
288 
289 import IMP.display
290 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_em.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
291 
292 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
293 
294 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
295 
296 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_em.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
297 
298 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_em.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
299 
300 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_em.IMP_SCORE_FUNCTOR_HAS_CGAL
301 
302 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_em.IMP_SCORE_FUNCTOR_HAS_HDF5
303 
304 IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_em.IMP_SCORE_FUNCTOR_HAS_NUMPY
305 
306 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_em.IMPSCOREFUNCTOR_SHOW_WARNINGS
307 
308 import IMP.score_functor
309 IMP_STATISTICS_HAS_IMP_CGAL = _IMP_em.IMP_STATISTICS_HAS_IMP_CGAL
310 
311 IMP_STATISTICS_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_STATISTICS_HAS_BOOST_FILESYSTEM
312 
313 IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS
314 
315 IMP_STATISTICS_HAS_BOOST_RANDOM = _IMP_em.IMP_STATISTICS_HAS_BOOST_RANDOM
316 
317 IMP_STATISTICS_HAS_BOOST_SYSTEM = _IMP_em.IMP_STATISTICS_HAS_BOOST_SYSTEM
318 
319 IMP_STATISTICS_HAS_CGAL = _IMP_em.IMP_STATISTICS_HAS_CGAL
320 
321 IMP_STATISTICS_HAS_NUMPY = _IMP_em.IMP_STATISTICS_HAS_NUMPY
322 
323 IMPSTATISTICS_SHOW_WARNINGS = _IMP_em.IMPSTATISTICS_SHOW_WARNINGS
324 
325 import IMP.statistics
326 IMP_CORE_HAS_IMP_CGAL = _IMP_em.IMP_CORE_HAS_IMP_CGAL
327 
328 IMP_CORE_HAS_IMP_KERNEL = _IMP_em.IMP_CORE_HAS_IMP_KERNEL
329 
330 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_CORE_HAS_BOOST_FILESYSTEM
331 
332 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
333 
334 IMP_CORE_HAS_BOOST_RANDOM = _IMP_em.IMP_CORE_HAS_BOOST_RANDOM
335 
336 IMP_CORE_HAS_BOOST_SYSTEM = _IMP_em.IMP_CORE_HAS_BOOST_SYSTEM
337 
338 IMP_CORE_HAS_CGAL = _IMP_em.IMP_CORE_HAS_CGAL
339 
340 IMP_CORE_HAS_HDF5 = _IMP_em.IMP_CORE_HAS_HDF5
341 
342 IMP_CORE_HAS_NUMPY = _IMP_em.IMP_CORE_HAS_NUMPY
343 
344 IMPCORE_SHOW_WARNINGS = _IMP_em.IMPCORE_SHOW_WARNINGS
345 
346 import IMP.core
347 IMP_CONTAINER_HAS_IMP_ALGEBRA = _IMP_em.IMP_CONTAINER_HAS_IMP_ALGEBRA
348 
349 IMP_CONTAINER_HAS_IMP_CGAL = _IMP_em.IMP_CONTAINER_HAS_IMP_CGAL
350 
351 IMP_CONTAINER_HAS_IMP_DISPLAY = _IMP_em.IMP_CONTAINER_HAS_IMP_DISPLAY
352 
353 IMP_CONTAINER_HAS_IMP_KERNEL = _IMP_em.IMP_CONTAINER_HAS_IMP_KERNEL
354 
355 IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_em.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR
356 
357 IMP_CONTAINER_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_CONTAINER_HAS_BOOST_FILESYSTEM
358 
359 IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS
360 
361 IMP_CONTAINER_HAS_BOOST_RANDOM = _IMP_em.IMP_CONTAINER_HAS_BOOST_RANDOM
362 
363 IMP_CONTAINER_HAS_BOOST_SYSTEM = _IMP_em.IMP_CONTAINER_HAS_BOOST_SYSTEM
364 
365 IMP_CONTAINER_HAS_CGAL = _IMP_em.IMP_CONTAINER_HAS_CGAL
366 
367 IMP_CONTAINER_HAS_HDF5 = _IMP_em.IMP_CONTAINER_HAS_HDF5
368 
369 IMP_CONTAINER_HAS_NUMPY = _IMP_em.IMP_CONTAINER_HAS_NUMPY
370 
371 IMP_CONTAINER_HAS_PYTHON_IHM = _IMP_em.IMP_CONTAINER_HAS_PYTHON_IHM
372 
373 IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP = _IMP_em.IMP_CONTAINER_HAS_GOOGLE_DENSE_HASH_MAP
374 
375 IMP_CONTAINER_HAS_ROBIN_MAP = _IMP_em.IMP_CONTAINER_HAS_ROBIN_MAP
376 
377 IMPCONTAINER_SHOW_WARNINGS = _IMP_em.IMPCONTAINER_SHOW_WARNINGS
378 
379 import IMP.container
380 IMP_ATOM_HAS_IMP_CGAL = _IMP_em.IMP_ATOM_HAS_IMP_CGAL
381 
382 IMP_ATOM_HAS_IMP_KERNEL = _IMP_em.IMP_ATOM_HAS_IMP_KERNEL
383 
384 IMP_ATOM_HAS_IMP_SCORE_FUNCTOR = _IMP_em.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR
385 
386 IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS
387 
388 IMP_ATOM_HAS_BOOST_RANDOM = _IMP_em.IMP_ATOM_HAS_BOOST_RANDOM
389 
390 IMP_ATOM_HAS_BOOST_REGEX = _IMP_em.IMP_ATOM_HAS_BOOST_REGEX
391 
392 IMP_ATOM_HAS_BOOST_SYSTEM = _IMP_em.IMP_ATOM_HAS_BOOST_SYSTEM
393 
394 IMP_ATOM_HAS_CGAL = _IMP_em.IMP_ATOM_HAS_CGAL
395 
396 IMP_ATOM_HAS_HDF5 = _IMP_em.IMP_ATOM_HAS_HDF5
397 
398 IMP_ATOM_HAS_NUMPY = _IMP_em.IMP_ATOM_HAS_NUMPY
399 
400 IMP_ATOM_HAS_PYTHON_IHM = _IMP_em.IMP_ATOM_HAS_PYTHON_IHM
401 
402 IMPATOM_SHOW_WARNINGS = _IMP_em.IMPATOM_SHOW_WARNINGS
403 
404 IMP_ATOM_TYPE_INDEX = _IMP_em.IMP_ATOM_TYPE_INDEX
405 
406 IMP_RESIDUE_TYPE_INDEX = _IMP_em.IMP_RESIDUE_TYPE_INDEX
407 
408 IMP_HIERARCHY_TYPE_INDEX = _IMP_em.IMP_HIERARCHY_TYPE_INDEX
409 
410 IMP_CHAIN_TYPE_INDEX = _IMP_em.IMP_CHAIN_TYPE_INDEX
411 
412 import IMP.atom
413 IMP_EM_HAS_IMP_CGAL = _IMP_em.IMP_EM_HAS_IMP_CGAL
414 
415 IMP_EM_HAS_IMP_CONTAINER = _IMP_em.IMP_EM_HAS_IMP_CONTAINER
416 
417 IMP_EM_HAS_IMP_DISPLAY = _IMP_em.IMP_EM_HAS_IMP_DISPLAY
418 
419 IMP_EM_HAS_IMP_SCORE_FUNCTOR = _IMP_em.IMP_EM_HAS_IMP_SCORE_FUNCTOR
420 
421 IMP_EM_HAS_BOOST_FILESYSTEM = _IMP_em.IMP_EM_HAS_BOOST_FILESYSTEM
422 
423 IMP_EM_HAS_BOOST_PROGRAMOPTIONS = _IMP_em.IMP_EM_HAS_BOOST_PROGRAMOPTIONS
424 
425 IMP_EM_HAS_BOOST_RANDOM = _IMP_em.IMP_EM_HAS_BOOST_RANDOM
426 
427 IMP_EM_HAS_BOOST_REGEX = _IMP_em.IMP_EM_HAS_BOOST_REGEX
428 
429 IMP_EM_HAS_BOOST_SYSTEM = _IMP_em.IMP_EM_HAS_BOOST_SYSTEM
430 
431 IMP_EM_HAS_CGAL = _IMP_em.IMP_EM_HAS_CGAL
432 
433 IMP_EM_HAS_HDF5 = _IMP_em.IMP_EM_HAS_HDF5
434 
435 IMP_EM_HAS_NUMPY = _IMP_em.IMP_EM_HAS_NUMPY
436 
437 IMP_EM_HAS_PYTHON_IHM = _IMP_em.IMP_EM_HAS_PYTHON_IHM
438 
439 IMPEM_SHOW_WARNINGS = _IMP_em.IMPEM_SHOW_WARNINGS
440 
441 
442 _object_types.append("DensityMap")
443 
444 
445 def _object_cast_to_DensityMap(o):
446  r"""_object_cast_to_DensityMap(Object o) -> DensityMap"""
447  return _IMP_em._object_cast_to_DensityMap(o)
448 
449 _object_types.append("SampledDensityMap")
450 
451 
452 def _object_cast_to_SampledDensityMap(o):
453  r"""_object_cast_to_SampledDensityMap(Object o) -> SampledDensityMap"""
454  return _IMP_em._object_cast_to_SampledDensityMap(o)
455 
456 _object_types.append("SurfaceShellDensityMap")
457 
458 
459 def _object_cast_to_SurfaceShellDensityMap(o):
460  r"""_object_cast_to_SurfaceShellDensityMap(Object o) -> SurfaceShellDensityMap"""
461  return _IMP_em._object_cast_to_SurfaceShellDensityMap(o)
462 
463 _object_types.append("FitRestraint")
464 
465 
466 def _object_cast_to_FitRestraint(o):
467  r"""_object_cast_to_FitRestraint(Object o) -> FitRestraint"""
468  return _IMP_em._object_cast_to_FitRestraint(o)
469 
470 _object_types.append("FitRestraintBayesEM3D")
471 
472 
473 def _object_cast_to_FitRestraintBayesEM3D(o):
474  r"""_object_cast_to_FitRestraintBayesEM3D(Object o) -> FitRestraintBayesEM3D"""
475  return _IMP_em._object_cast_to_FitRestraintBayesEM3D(o)
476 
477 _object_types.append("PCAFitRestraint")
478 
479 
480 def _object_cast_to_PCAFitRestraint(o):
481  r"""_object_cast_to_PCAFitRestraint(Object o) -> PCAFitRestraint"""
482  return _IMP_em._object_cast_to_PCAFitRestraint(o)
483 
484 _object_types.append("EnvelopePenetrationRestraint")
485 
486 
487 def _object_cast_to_EnvelopePenetrationRestraint(o):
488  r"""_object_cast_to_EnvelopePenetrationRestraint(Object o) -> EnvelopePenetrationRestraint"""
489  return _IMP_em._object_cast_to_EnvelopePenetrationRestraint(o)
490 
491 _object_types.append("EnvelopeFitRestraint")
492 
493 
494 def _object_cast_to_EnvelopeFitRestraint(o):
495  r"""_object_cast_to_EnvelopeFitRestraint(Object o) -> EnvelopeFitRestraint"""
496  return _IMP_em._object_cast_to_EnvelopeFitRestraint(o)
497 
498 KernelParametersList=list
499 _plural_types.append("KernelParametersList")
500 _value_types.append("KernelParameters")
501 
502 
503 _object_types.append("HighDensityEmbedding")
504 
505 
506 def _object_cast_to_HighDensityEmbedding(o):
507  r"""_object_cast_to_HighDensityEmbedding(Object o) -> HighDensityEmbedding"""
508  return _IMP_em._object_cast_to_HighDensityEmbedding(o)
509 
510 _object_types.append("MapReaderWriter")
511 
512 
513 def _object_cast_to_MapReaderWriter(o):
514  r"""_object_cast_to_MapReaderWriter(Object o) -> MapReaderWriter"""
515  return _IMP_em._object_cast_to_MapReaderWriter(o)
516 
517 _object_types.append("MRCReaderWriter")
518 
519 
520 def _object_cast_to_MRCReaderWriter(o):
521  r"""_object_cast_to_MRCReaderWriter(Object o) -> MRCReaderWriter"""
522  return _IMP_em._object_cast_to_MRCReaderWriter(o)
523 
524 _object_types.append("SpiderMapReaderWriter")
525 
526 
527 def _object_cast_to_SpiderMapReaderWriter(o):
528  r"""_object_cast_to_SpiderMapReaderWriter(Object o) -> SpiderMapReaderWriter"""
529  return _IMP_em._object_cast_to_SpiderMapReaderWriter(o)
530 
531 _object_types.append("EMReaderWriter")
532 
533 
534 def _object_cast_to_EMReaderWriter(o):
535  r"""_object_cast_to_EMReaderWriter(Object o) -> EMReaderWriter"""
536  return _IMP_em._object_cast_to_EMReaderWriter(o)
537 
538 _object_types.append("XplorReaderWriter")
539 
540 
541 def _object_cast_to_XplorReaderWriter(o):
542  r"""_object_cast_to_XplorReaderWriter(Object o) -> XplorReaderWriter"""
543  return _IMP_em._object_cast_to_XplorReaderWriter(o)
544 
545 _object_types.append("CoarseCCatIntervals")
546 
547 
548 def _object_cast_to_CoarseCCatIntervals(o):
549  r"""_object_cast_to_CoarseCCatIntervals(Object o) -> CoarseCCatIntervals"""
550  return _IMP_em._object_cast_to_CoarseCCatIntervals(o)
551 
552 FittingSolutionsList=list
553 _plural_types.append("FittingSolutionsList")
554 _value_types.append("FittingSolutions")
555 
556 
557 _object_types.append("MapDistanceTransform")
558 
559 
560 def _object_cast_to_MapDistanceTransform(o):
561  r"""_object_cast_to_MapDistanceTransform(Object o) -> MapDistanceTransform"""
562  return _IMP_em._object_cast_to_MapDistanceTransform(o)
563 
564 _object_types.append("EnvelopeScore")
565 
566 
567 def _object_cast_to_EnvelopeScore(o):
568  r"""_object_cast_to_EnvelopeScore(Object o) -> EnvelopeScore"""
569  return _IMP_em._object_cast_to_EnvelopeScore(o)
570 
571 def _get_density_map_x_loc(m, pyobj):
572  r"""_get_density_map_x_loc(DensityMap m, PyObject * pyobj) -> PyObject *"""
573  return _IMP_em._get_density_map_x_loc(m, pyobj)
574 
575 def _get_density_map_y_loc(m, pyobj):
576  r"""_get_density_map_y_loc(DensityMap m, PyObject * pyobj) -> PyObject *"""
577  return _IMP_em._get_density_map_y_loc(m, pyobj)
578 
579 def _get_density_map_z_loc(m, pyobj):
580  r"""_get_density_map_z_loc(DensityMap m, PyObject * pyobj) -> PyObject *"""
581  return _IMP_em._get_density_map_z_loc(m, pyobj)
582 
583 def _get_density_map_data(m, pyobj):
584  r"""_get_density_map_data(DensityMap m, PyObject * pyobj) -> PyObject *"""
585  return _IMP_em._get_density_map_data(m, pyobj)
586 class MapReaderWriter(IMP.Object):
587  r"""Proxy of C++ IMP::em::MapReaderWriter class."""
588 
589  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
590 
591  def __init__(self):
592  r"""__init__(MapReaderWriter self) -> MapReaderWriter"""
593  _IMP_em.MapReaderWriter_swiginit(self, _IMP_em.new_MapReaderWriter())
594 
595  def get_version_info(self):
596  r"""get_version_info(MapReaderWriter self) -> VersionInfo"""
597  return _IMP_em.MapReaderWriter_get_version_info(self)
598  __swig_destroy__ = _IMP_em.delete_MapReaderWriter
599 
600  def __str__(self):
601  r"""__str__(MapReaderWriter self) -> std::string"""
602  return _IMP_em.MapReaderWriter___str__(self)
603 
604  def __repr__(self):
605  r"""__repr__(MapReaderWriter self) -> std::string"""
606  return _IMP_em.MapReaderWriter___repr__(self)
607 
608  @staticmethod
609  def get_from(o):
610  return _object_cast_to_MapReaderWriter(o)
611 
612 
613 # Register MapReaderWriter in _IMP_em:
614 _IMP_em.MapReaderWriter_swigregister(MapReaderWriter)
615 cvar = _IMP_em.cvar
616 EPS = cvar.EPS
617 
618 class DensityHeader(object):
619  r"""Proxy of C++ IMP::em::DensityHeader class."""
620 
621  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
622  __repr__ = _swig_repr
623 
624  def __init__(self):
625  r"""__init__(DensityHeader self) -> DensityHeader"""
626  _IMP_em.DensityHeader_swiginit(self, _IMP_em.new_DensityHeader())
627 
628  def get_top(self, ind):
629  r"""get_top(DensityHeader self, int ind) -> double"""
630  return _IMP_em.DensityHeader_get_top(self, ind)
631 
632  def compute_xyz_top(self, force=False):
633  r"""compute_xyz_top(DensityHeader self, bool force=False)"""
634  return _IMP_em.DensityHeader_compute_xyz_top(self, force)
635 
636  def update_map_dimensions(self, nnx, nny, nnz):
637  r"""update_map_dimensions(DensityHeader self, int nnx, int nny, int nnz)"""
638  return _IMP_em.DensityHeader_update_map_dimensions(self, nnx, nny, nnz)
639 
640  def update_cell_dimensions(self):
641  r"""update_cell_dimensions(DensityHeader self)"""
642  return _IMP_em.DensityHeader_update_cell_dimensions(self)
643 
644  def show(self, *args):
645  r"""show(DensityHeader self, _ostream out=std::cout)"""
646  return _IMP_em.DensityHeader_show(self, *args)
647  MAP_FIELD_SIZE = _IMP_em.DensityHeader_MAP_FIELD_SIZE
648 
649  USER_FIELD_SIZE = _IMP_em.DensityHeader_USER_FIELD_SIZE
650 
651  COMMENT_FIELD_NUM_OF = _IMP_em.DensityHeader_COMMENT_FIELD_NUM_OF
652 
653  COMMENT_FIELD_SINGLE_SIZE = _IMP_em.DensityHeader_COMMENT_FIELD_SINGLE_SIZE
654 
655  nxstart = property(_IMP_em.DensityHeader_nxstart_get, _IMP_em.DensityHeader_nxstart_set, doc=r"""nxstart : int""")
656  nystart = property(_IMP_em.DensityHeader_nystart_get, _IMP_em.DensityHeader_nystart_set, doc=r"""nystart : int""")
657  nzstart = property(_IMP_em.DensityHeader_nzstart_get, _IMP_em.DensityHeader_nzstart_set, doc=r"""nzstart : int""")
658  mx = property(_IMP_em.DensityHeader_mx_get, _IMP_em.DensityHeader_mx_set, doc=r"""mx : int""")
659  my = property(_IMP_em.DensityHeader_my_get, _IMP_em.DensityHeader_my_set, doc=r"""my : int""")
660  mz = property(_IMP_em.DensityHeader_mz_get, _IMP_em.DensityHeader_mz_set, doc=r"""mz : int""")
661  xlen = property(_IMP_em.DensityHeader_xlen_get, _IMP_em.DensityHeader_xlen_set, doc=r"""xlen : float""")
662  ylen = property(_IMP_em.DensityHeader_ylen_get, _IMP_em.DensityHeader_ylen_set, doc=r"""ylen : float""")
663  zlen = property(_IMP_em.DensityHeader_zlen_get, _IMP_em.DensityHeader_zlen_set, doc=r"""zlen : float""")
664  alpha = property(_IMP_em.DensityHeader_alpha_get, _IMP_em.DensityHeader_alpha_set, doc=r"""alpha : float""")
665  beta = property(_IMP_em.DensityHeader_beta_get, _IMP_em.DensityHeader_beta_set, doc=r"""beta : float""")
666  gamma = property(_IMP_em.DensityHeader_gamma_get, _IMP_em.DensityHeader_gamma_set, doc=r"""gamma : float""")
667  mapc = property(_IMP_em.DensityHeader_mapc_get, _IMP_em.DensityHeader_mapc_set, doc=r"""mapc : int""")
668  mapr = property(_IMP_em.DensityHeader_mapr_get, _IMP_em.DensityHeader_mapr_set, doc=r"""mapr : int""")
669  maps = property(_IMP_em.DensityHeader_maps_get, _IMP_em.DensityHeader_maps_set, doc=r"""maps : int""")
670  dmin = property(_IMP_em.DensityHeader_dmin_get, _IMP_em.DensityHeader_dmin_set, doc=r"""dmin : float""")
671  dmax = property(_IMP_em.DensityHeader_dmax_get, _IMP_em.DensityHeader_dmax_set, doc=r"""dmax : float""")
672  dmean = property(_IMP_em.DensityHeader_dmean_get, _IMP_em.DensityHeader_dmean_set, doc=r"""dmean : float""")
673  ispg = property(_IMP_em.DensityHeader_ispg_get, _IMP_em.DensityHeader_ispg_set, doc=r"""ispg : int""")
674  nsymbt = property(_IMP_em.DensityHeader_nsymbt_get, _IMP_em.DensityHeader_nsymbt_set, doc=r"""nsymbt : int""")
675  user = property(_IMP_em.DensityHeader_user_get, _IMP_em.DensityHeader_user_set, doc=r"""user : a(IMP::em::DensityHeader::USER_FIELD_SIZE).int""")
676  map = property(_IMP_em.DensityHeader_map_get, _IMP_em.DensityHeader_map_set, doc=r"""map : a(IMP::em::DensityHeader::MAP_FIELD_SIZE).char""")
677  machinestamp = property(_IMP_em.DensityHeader_machinestamp_get, _IMP_em.DensityHeader_machinestamp_set, doc=r"""machinestamp : int""")
678  rms = property(_IMP_em.DensityHeader_rms_get, _IMP_em.DensityHeader_rms_set, doc=r"""rms : float""")
679  nlabl = property(_IMP_em.DensityHeader_nlabl_get, _IMP_em.DensityHeader_nlabl_set, doc=r"""nlabl : int""")
680  comments = property(_IMP_em.DensityHeader_comments_get, _IMP_em.DensityHeader_comments_set, doc=r"""comments : a(IMP::em::DensityHeader::COMMENT_FIELD_NUM_OF).a(IMP::em::DensityHeader::COMMENT_FIELD_SINGLE_SIZE).char""")
681  magic = property(_IMP_em.DensityHeader_magic_get, _IMP_em.DensityHeader_magic_set, doc=r"""magic : int""")
682  voltage = property(_IMP_em.DensityHeader_voltage_get, _IMP_em.DensityHeader_voltage_set, doc=r"""voltage : float""")
683  Cs = property(_IMP_em.DensityHeader_Cs_get, _IMP_em.DensityHeader_Cs_set, doc=r"""Cs : float""")
684  Aperture = property(_IMP_em.DensityHeader_Aperture_get, _IMP_em.DensityHeader_Aperture_set, doc=r"""Aperture : float""")
685  Magnification = property(_IMP_em.DensityHeader_Magnification_get, _IMP_em.DensityHeader_Magnification_set, doc=r"""Magnification : float""")
686  Postmagnification = property(_IMP_em.DensityHeader_Postmagnification_get, _IMP_em.DensityHeader_Postmagnification_set, doc=r"""Postmagnification : float""")
687  Exposuretime = property(_IMP_em.DensityHeader_Exposuretime_get, _IMP_em.DensityHeader_Exposuretime_set, doc=r"""Exposuretime : float""")
688  Microscope = property(_IMP_em.DensityHeader_Microscope_get, _IMP_em.DensityHeader_Microscope_set, doc=r"""Microscope : float""")
689  Pixelsize = property(_IMP_em.DensityHeader_Pixelsize_get, _IMP_em.DensityHeader_Pixelsize_set, doc=r"""Pixelsize : float""")
690  CCDArea = property(_IMP_em.DensityHeader_CCDArea_get, _IMP_em.DensityHeader_CCDArea_set, doc=r"""CCDArea : float""")
691  Defocus = property(_IMP_em.DensityHeader_Defocus_get, _IMP_em.DensityHeader_Defocus_set, doc=r"""Defocus : float""")
692  Astigmatism = property(_IMP_em.DensityHeader_Astigmatism_get, _IMP_em.DensityHeader_Astigmatism_set, doc=r"""Astigmatism : float""")
693  AstigmatismAngle = property(_IMP_em.DensityHeader_AstigmatismAngle_get, _IMP_em.DensityHeader_AstigmatismAngle_set, doc=r"""AstigmatismAngle : float""")
694  FocusIncrement = property(_IMP_em.DensityHeader_FocusIncrement_get, _IMP_em.DensityHeader_FocusIncrement_set, doc=r"""FocusIncrement : float""")
695  CountsPerElectron = property(_IMP_em.DensityHeader_CountsPerElectron_get, _IMP_em.DensityHeader_CountsPerElectron_set, doc=r"""CountsPerElectron : float""")
696  Intensity = property(_IMP_em.DensityHeader_Intensity_get, _IMP_em.DensityHeader_Intensity_set, doc=r"""Intensity : float""")
697  EnergySlitwidth = property(_IMP_em.DensityHeader_EnergySlitwidth_get, _IMP_em.DensityHeader_EnergySlitwidth_set, doc=r"""EnergySlitwidth : float""")
698  EnergyOffset = property(_IMP_em.DensityHeader_EnergyOffset_get, _IMP_em.DensityHeader_EnergyOffset_set, doc=r"""EnergyOffset : float""")
699  Tiltangle = property(_IMP_em.DensityHeader_Tiltangle_get, _IMP_em.DensityHeader_Tiltangle_set, doc=r"""Tiltangle : float""")
700  Tiltaxis = property(_IMP_em.DensityHeader_Tiltaxis_get, _IMP_em.DensityHeader_Tiltaxis_set, doc=r"""Tiltaxis : float""")
701  MarkerX = property(_IMP_em.DensityHeader_MarkerX_get, _IMP_em.DensityHeader_MarkerX_set, doc=r"""MarkerX : float""")
702  MarkerY = property(_IMP_em.DensityHeader_MarkerY_get, _IMP_em.DensityHeader_MarkerY_set, doc=r"""MarkerY : float""")
703  lswap = property(_IMP_em.DensityHeader_lswap_get, _IMP_em.DensityHeader_lswap_set, doc=r"""lswap : int""")
704 
705  def get_resolution(self):
706  r"""get_resolution(DensityHeader self) -> float"""
707  return _IMP_em.DensityHeader_get_resolution(self)
708 
709  def get_has_resolution(self):
710  r"""get_has_resolution(DensityHeader self) -> bool"""
711  return _IMP_em.DensityHeader_get_has_resolution(self)
712 
713  def set_resolution(self, resolution):
714  r"""set_resolution(DensityHeader self, float resolution)"""
715  return _IMP_em.DensityHeader_set_resolution(self, resolution)
716 
717  def get_spacing(self):
718  r"""get_spacing(DensityHeader self) -> float"""
719  return _IMP_em.DensityHeader_get_spacing(self)
720 
721  def get_xorigin(self):
722  r"""get_xorigin(DensityHeader self) -> float"""
723  return _IMP_em.DensityHeader_get_xorigin(self)
724 
725  def get_yorigin(self):
726  r"""get_yorigin(DensityHeader self) -> float"""
727  return _IMP_em.DensityHeader_get_yorigin(self)
728 
729  def get_zorigin(self):
730  r"""get_zorigin(DensityHeader self) -> float"""
731  return _IMP_em.DensityHeader_get_zorigin(self)
732 
733  def get_origin(self, i):
734  r"""get_origin(DensityHeader self, int i) -> float"""
735  return _IMP_em.DensityHeader_get_origin(self, i)
736 
737  def set_xorigin(self, x):
738  r"""set_xorigin(DensityHeader self, float x)"""
739  return _IMP_em.DensityHeader_set_xorigin(self, x)
740 
741  def set_yorigin(self, y):
742  r"""set_yorigin(DensityHeader self, float y)"""
743  return _IMP_em.DensityHeader_set_yorigin(self, y)
744 
745  def set_zorigin(self, z):
746  r"""set_zorigin(DensityHeader self, float z)"""
747  return _IMP_em.DensityHeader_set_zorigin(self, z)
748 
749  def is_top_calculated(self):
750  r"""is_top_calculated(DensityHeader self) -> bool"""
751  return _IMP_em.DensityHeader_is_top_calculated(self)
752  Objectpixelsize_ = property(_IMP_em.DensityHeader_Objectpixelsize__get, _IMP_em.DensityHeader_Objectpixelsize__set, doc=r"""Objectpixelsize_ : float""")
753 
754  def get_nx(self):
755  r"""get_nx(DensityHeader self) -> int"""
756  return _IMP_em.DensityHeader_get_nx(self)
757 
758  def get_ny(self):
759  r"""get_ny(DensityHeader self) -> int"""
760  return _IMP_em.DensityHeader_get_ny(self)
761 
762  def get_nz(self):
763  r"""get_nz(DensityHeader self) -> int"""
764  return _IMP_em.DensityHeader_get_nz(self)
765 
766  def get_number_of_voxels(self):
767  r"""get_number_of_voxels(DensityHeader self) -> int"""
768  return _IMP_em.DensityHeader_get_number_of_voxels(self)
769 
770  def get_data_type(self):
771  r"""get_data_type(DensityHeader self) -> int"""
772  return _IMP_em.DensityHeader_get_data_type(self)
773 
774  def set_data_type(self, data_type):
775  r"""set_data_type(DensityHeader self, int data_type)"""
776  return _IMP_em.DensityHeader_set_data_type(self, data_type)
777  __swig_destroy__ = _IMP_em.delete_DensityHeader
778 
779 # Register DensityHeader in _IMP_em:
780 _IMP_em.DensityHeader_swigregister(DensityHeader)
781 
782 def create_density_header(bb, spacing):
783  r"""create_density_header(BoundingBox3D bb, float spacing) -> DensityHeader"""
784  return _IMP_em.create_density_header(bb, spacing)
785 
786 def read_map(*args):
787  r"""
788  read_map(std::string filename, MapReaderWriter reader) -> DensityMap
789  read_map(std::string filename) -> DensityMap
790  """
791  return _IMP_em.read_map(*args)
792 
793 def write_map(*args):
794  r"""
795  write_map(DensityMap m, std::string filename, MapReaderWriter writer)
796  write_map(DensityMap m, std::string filename)
797  """
798  return _IMP_em.write_map(*args)
799 
800 def approximate_molecular_mass(m, threshold):
801  r"""approximate_molecular_mass(DensityMap m, IMP::Float threshold) -> IMP::Float"""
802  return _IMP_em.approximate_molecular_mass(m, threshold)
803 class DensityMap(IMP.Object):
804  r"""Proxy of C++ IMP::em::DensityMap class."""
805 
806  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
807 
808  def __init__(self, *args):
809  r"""
810  __init__(DensityMap self, std::string name="DensityMap%1%") -> DensityMap
811  __init__(DensityMap self, DensityHeader header, std::string name="DensityMap%1%") -> DensityMap
812  """
813  _IMP_em.DensityMap_swiginit(self, _IMP_em.new_DensityMap(*args))
814 
815  def reset_data(self, value=0.0):
816  r"""reset_data(DensityMap self, float value=0.0)"""
817  return _IMP_em.DensityMap_reset_data(self, value)
818 
819  def calcRMS(self):
820  r"""calcRMS(DensityMap self) -> double"""
821  return _IMP_em.DensityMap_calcRMS(self)
822 
823  def std_normalize(self):
824  r"""std_normalize(DensityMap self)"""
825  return _IMP_em.DensityMap_std_normalize(self)
826 
827  def is_normalized(self):
828  r"""is_normalized(DensityMap self) -> bool"""
829  return _IMP_em.DensityMap_is_normalized(self)
830 
831  def get_location_in_dim_by_voxel(self, index, dim):
832  r"""get_location_in_dim_by_voxel(DensityMap self, long index, int dim) -> float"""
833  return _IMP_em.DensityMap_get_location_in_dim_by_voxel(self, index, dim)
834 
835  def xyz_ind2voxel(self, x, y, z):
836  r"""xyz_ind2voxel(DensityMap self, int x, int y, int z) -> long"""
837  return _IMP_em.DensityMap_xyz_ind2voxel(self, x, y, z)
838 
839  def get_voxel_by_location(self, *args):
840  r"""
841  get_voxel_by_location(DensityMap self, float x, float y, float z) -> long
842  get_voxel_by_location(DensityMap self, Vector3D v) -> long
843  """
844  return _IMP_em.DensityMap_get_voxel_by_location(self, *args)
845 
846  def get_location_by_voxel(self, index):
847  r"""get_location_by_voxel(DensityMap self, long index) -> Vector3D"""
848  return _IMP_em.DensityMap_get_location_by_voxel(self, index)
849 
850  def is_xyz_ind_part_of_volume(self, ix, iy, iz):
851  r"""is_xyz_ind_part_of_volume(DensityMap self, int ix, int iy, int iz) -> bool"""
852  return _IMP_em.DensityMap_is_xyz_ind_part_of_volume(self, ix, iy, iz)
853 
854  def is_part_of_volume(self, *args):
855  r"""
856  is_part_of_volume(DensityMap self, float x, float y, float z) -> bool
857  is_part_of_volume(DensityMap self, Vector3D v) -> bool
858  """
859  return _IMP_em.DensityMap_is_part_of_volume(self, *args)
860 
861  def get_value(self, *args):
862  r"""
863  get_value(DensityMap self, float x, float y, float z) -> double
864  get_value(DensityMap self, Vector3D point) -> double
865  get_value(DensityMap self, long index) -> double
866  """
867  return _IMP_em.DensityMap_get_value(self, *args)
868 
869  def set_value(self, *args):
870  r"""
871  set_value(DensityMap self, long index, double value)
872  set_value(DensityMap self, float x, float y, float z, double value)
873  """
874  return _IMP_em.DensityMap_set_value(self, *args)
875 
876  def set_origin(self, *args):
877  r"""
878  set_origin(DensityMap self, float x, float y, float z)
879  set_origin(DensityMap self, Vector3D v)
880  """
881  return _IMP_em.DensityMap_set_origin(self, *args)
882 
883  def get_origin(self):
884  r"""get_origin(DensityMap self) -> Vector3D"""
885  return _IMP_em.DensityMap_get_origin(self)
886 
887  def get_top(self):
888  r"""get_top(DensityMap self) -> Vector3D"""
889  return _IMP_em.DensityMap_get_top(self)
890 
891  def get_header(self):
892  h = _IMP_em.DensityMap_get_header(self)
893  h._owner = self
894  return h
895 
896 
897 
898  def get_header_writable(self):
899  h = _IMP_em.DensityMap_get_header_writable(self)
900  h._owner = self
901  return h
902 
903 
904 
905  def same_origin(self, other):
906  r"""same_origin(DensityMap self, DensityMap other) -> bool"""
907  return _IMP_em.DensityMap_same_origin(self, other)
908 
909  def same_dimensions(self, other):
910  r"""same_dimensions(DensityMap self, DensityMap other) -> bool"""
911  return _IMP_em.DensityMap_same_dimensions(self, other)
912 
913  def same_voxel_size(self, other):
914  r"""same_voxel_size(DensityMap self, DensityMap other) -> bool"""
915  return _IMP_em.DensityMap_same_voxel_size(self, other)
916 
917  def get_centroid(self, threshold=0.0):
918  r"""get_centroid(DensityMap self, double threshold=0.0) -> Vector3D"""
919  return _IMP_em.DensityMap_get_centroid(self, threshold)
920 
921  def get_max_value(self):
922  r"""get_max_value(DensityMap self) -> double"""
923  return _IMP_em.DensityMap_get_max_value(self)
924 
925  def get_min_value(self):
926  r"""get_min_value(DensityMap self) -> double"""
927  return _IMP_em.DensityMap_get_min_value(self)
928 
929  def add(self, *args):
930  r"""
931  add(DensityMap self, DensityMap other)
932  add(DensityMap self, IMP::Float d)
933  """
934  return _IMP_em.DensityMap_add(self, *args)
935 
936  def pick_max(self, other):
937  r"""pick_max(DensityMap self, DensityMap other)"""
938  return _IMP_em.DensityMap_pick_max(self, other)
939 
940  def get_number_of_voxels(self):
941  r"""get_number_of_voxels(DensityMap self) -> long"""
942  return _IMP_em.DensityMap_get_number_of_voxels(self)
943 
944  def set_void_map(self, nx, ny, nz):
945  r"""set_void_map(DensityMap self, int nx, int ny, int nz)"""
946  return _IMP_em.DensityMap_set_void_map(self, nx, ny, nz)
947 
948  def pad(self, nx, ny, nz, val=0.0):
949  r"""pad(DensityMap self, int nx, int ny, int nz, float val=0.0)"""
950  return _IMP_em.DensityMap_pad(self, nx, ny, nz, val)
951 
952  def pad_margin(self, mrg_x, mrg_y, mrg_z, val=0.0):
953  r"""pad_margin(DensityMap self, int mrg_x, int mrg_y, int mrg_z, float val=0.0) -> DensityMap"""
954  return _IMP_em.DensityMap_pad_margin(self, mrg_x, mrg_y, mrg_z, val)
955 
956  def get_cropped(self, *args):
957  r"""
958  get_cropped(DensityMap self, float threshold) -> DensityMap
959  get_cropped(DensityMap self, IMP::Particles ps, double distance, bool inverse=False, bool keep_map_dimensions=False) -> DensityMap
960  get_cropped(DensityMap self, BoundingBox3D bb) -> DensityMap
961  """
962  return _IMP_em.DensityMap_get_cropped(self, *args)
963 
964  def get_maximum_value_in_xy_plane(self, z_ind):
965  r"""get_maximum_value_in_xy_plane(DensityMap self, int z_ind) -> float"""
966  return _IMP_em.DensityMap_get_maximum_value_in_xy_plane(self, z_ind)
967 
968  def get_maximum_value_in_xz_plane(self, y_ind):
969  r"""get_maximum_value_in_xz_plane(DensityMap self, int y_ind) -> float"""
970  return _IMP_em.DensityMap_get_maximum_value_in_xz_plane(self, y_ind)
971 
972  def get_maximum_value_in_yz_plane(self, x_ind):
973  r"""get_maximum_value_in_yz_plane(DensityMap self, int x_ind) -> float"""
974  return _IMP_em.DensityMap_get_maximum_value_in_yz_plane(self, x_ind)
975 
976  def multiply(self, factor):
977  r"""multiply(DensityMap self, float factor)"""
978  return _IMP_em.DensityMap_multiply(self, factor)
979 
980  def get_locations_string(self, t):
981  r"""get_locations_string(DensityMap self, float t) -> std::string"""
982  return _IMP_em.DensityMap_get_locations_string(self, t)
983 
984  def update_voxel_size(self, new_apix):
985  r"""update_voxel_size(DensityMap self, float new_apix)"""
986  return _IMP_em.DensityMap_update_voxel_size(self, new_apix)
987 
988  def get_spacing(self):
989  r"""get_spacing(DensityMap self) -> IMP::Float"""
990  return _IMP_em.DensityMap_get_spacing(self)
991 
992  def calc_all_voxel2loc(self):
993  r"""calc_all_voxel2loc(DensityMap self)"""
994  return _IMP_em.DensityMap_calc_all_voxel2loc(self)
995 
996  def copy_map(self, other):
997  r"""copy_map(DensityMap self, DensityMap other)"""
998  return _IMP_em.DensityMap_copy_map(self, other)
999 
1000  def get_version_info(self):
1001  r"""get_version_info(DensityMap self) -> VersionInfo"""
1002  return _IMP_em.DensityMap_get_version_info(self)
1003  __swig_destroy__ = _IMP_em.delete_DensityMap
1004 
1005  def lower_voxel_shift(self, loc, kdist, orig, ndim):
1006  r"""lower_voxel_shift(DensityMap self, double loc, double kdist, double orig, int ndim) -> int"""
1007  return _IMP_em.DensityMap_lower_voxel_shift(self, loc, kdist, orig, ndim)
1008 
1009  def upper_voxel_shift(self, loc, kdist, orig, ndim):
1010  r"""upper_voxel_shift(DensityMap self, double loc, double kdist, double orig, int ndim) -> int"""
1011  return _IMP_em.DensityMap_upper_voxel_shift(self, loc, kdist, orig, ndim)
1012 
1013  def get_rms_calculated(self):
1014  r"""get_rms_calculated(DensityMap self) -> bool"""
1015  return _IMP_em.DensityMap_get_rms_calculated(self)
1016 
1017  def get_dim_index_by_location(self, *args):
1018  r"""
1019  get_dim_index_by_location(DensityMap self, Vector3D v, int ind) -> int
1020  get_dim_index_by_location(DensityMap self, float loc_val, int ind) -> int
1021  """
1022  return _IMP_em.DensityMap_get_dim_index_by_location(self, *args)
1023 
1024  def __str__(self):
1025  r"""__str__(DensityMap self) -> std::string"""
1026  return _IMP_em.DensityMap___str__(self)
1027 
1028  def __repr__(self):
1029  r"""__repr__(DensityMap self) -> std::string"""
1030  return _IMP_em.DensityMap___repr__(self)
1031 
1032  @staticmethod
1033  def get_from(o):
1034  return _object_cast_to_DensityMap(o)
1035 
1036 
1037  def _get_as_binary(self):
1038  r"""_get_as_binary(DensityMap self) -> PyObject *"""
1039  return _IMP_em.DensityMap__get_as_binary(self)
1040 
1041  def _set_from_binary(self, p):
1042  r"""_set_from_binary(DensityMap self, PyObject * p)"""
1043  return _IMP_em.DensityMap__set_from_binary(self, p)
1044 
1045  def __getstate__(self):
1046  p = self._get_as_binary()
1047  if len(self.__dict__) > 1:
1048  d = self.__dict__.copy()
1049  del d['this']
1050  p = (d, p)
1051  return p
1052 
1053  def __setstate__(self, p):
1054  if not hasattr(self, 'this'):
1055  self.__init__()
1056  if isinstance(p, tuple):
1057  d, p = p
1058  self.__dict__.update(d)
1059  return self._set_from_binary(p)
1060 
1061 
1062  def get_x_loc(self):
1063  return _get_density_map_x_loc(self, self)
1064 
1065  def get_y_loc(self):
1066  return _get_density_map_y_loc(self, self)
1067 
1068  def get_z_loc(self):
1069  return _get_density_map_z_loc(self, self)
1070 
1071  def get_data(self):
1072  return _get_density_map_data(self, self)
1073 
1074 
1075 # Register DensityMap in _IMP_em:
1076 _IMP_em.DensityMap_swigregister(DensityMap)
1077 
1078 def get_bounding_box(*args):
1079  r"""
1080  get_bounding_box(DensityMap m, IMP::Float threshold) -> BoundingBox3D
1081  get_bounding_box(DensityMap m) -> BoundingBox3D
1082  """
1083  return _IMP_em.get_bounding_box(*args)
1084 
1085 def get_density(m, v):
1086  r"""get_density(DensityMap m, Vector3D v) -> double"""
1087  return _IMP_em.get_density(m, v)
1088 
1089 def get_transformed(*args):
1090  r"""
1091  get_transformed(DensityMap input, Transformation3D tr, double threshold) -> DensityMap
1092  get_transformed(DensityMap input, Transformation3D tr) -> DensityMap
1093  """
1094  return _IMP_em.get_transformed(*args)
1095 
1096 def get_resampled(input, scaling):
1097  r"""get_resampled(DensityMap input, double scaling) -> DensityMap"""
1098  return _IMP_em.get_resampled(input, scaling)
1099 
1100 def get_transformed_into(source, tr, into, calc_rms=True):
1101  r"""get_transformed_into(DensityMap source, Transformation3D tr, DensityMap into, bool calc_rms=True)"""
1102  return _IMP_em.get_transformed_into(source, tr, into, calc_rms)
1103 
1104 def get_transformed_into2(source, tr, into):
1105  r"""get_transformed_into2(DensityMap source, Transformation3D tr, DensityMap into)"""
1106  return _IMP_em.get_transformed_into2(source, tr, into)
1107 
1108 def get_interiors_intersect(d1, d2):
1109  r"""get_interiors_intersect(DensityMap d1, DensityMap d2) -> bool"""
1110  return _IMP_em.get_interiors_intersect(d1, d2)
1111 
1112 def get_segment(*args):
1113  r"""
1114  get_segment(DensityMap map_to_segment, int nx_start, int nx_end, int ny_start, int ny_end, int nz_start, int nz_end) -> DensityMap
1115  get_segment(DensityMap map_to_segment, IMP::algebra::Vector3Ds vecs, float dist) -> DensityMap
1116  """
1117  return _IMP_em.get_segment(*args)
1118 
1119 def get_segment_by_masking(map_to_segment, mask, mas_threshold):
1120  r"""get_segment_by_masking(DensityMap map_to_segment, DensityMap mask, float mas_threshold) -> DensityMap"""
1121  return _IMP_em.get_segment_by_masking(map_to_segment, mask, mas_threshold)
1122 
1123 def binarize(orig_map, threshold, reverse=False):
1124  r"""binarize(DensityMap orig_map, float threshold, bool reverse=False) -> DensityMap"""
1125  return _IMP_em.binarize(orig_map, threshold, reverse)
1126 
1127 def get_threshold_map(orig_map, threshold):
1128  r"""get_threshold_map(DensityMap orig_map, float threshold) -> DensityMap"""
1129  return _IMP_em.get_threshold_map(orig_map, threshold)
1130 
1131 def multiply(m1, m2):
1132  r"""multiply(DensityMap m1, DensityMap m2) -> DensityMap"""
1133  return _IMP_em.multiply(m1, m2)
1134 
1135 def convolute(m1, m2):
1136  r"""convolute(DensityMap m1, DensityMap m2) -> double"""
1137  return _IMP_em.convolute(m1, m2)
1138 
1139 def get_sum(m1):
1140  r"""get_sum(DensityMap m1) -> double"""
1141  return _IMP_em.get_sum(m1)
1142 
1143 def get_max_map(maps):
1144  r"""get_max_map(IMP::em::DensityMaps maps) -> DensityMap"""
1145  return _IMP_em.get_max_map(maps)
1146 
1147 def interpolate_map(in_map, new_spacing):
1148  r"""interpolate_map(DensityMap in_map, double new_spacing) -> DensityMap"""
1149  return _IMP_em.interpolate_map(in_map, new_spacing)
1150 
1151 def get_grid(in_map):
1152  r"""get_grid(DensityMap in_map) -> IMP::algebra::GridD< 3,IMP::algebra::DenseGridStorageD< 3,float >,float,IMP::algebra::DefaultEmbeddingD< 3 > >"""
1153  return _IMP_em.get_grid(in_map)
1154 
1155 def create_density_map(*args):
1156  r"""
1157  create_density_map(DensityMap other) -> DensityMap
1158  create_density_map(BoundingBox3D bb, double spacing) -> DensityMap
1159  create_density_map(int nx, int ny, int nz, double spacing) -> DensityMap
1160  create_density_map(DenseFloatGrid3D grid) -> DensityMap
1161  create_density_map(DenseDoubleGrid3D grid) -> DensityMap
1162  """
1163  return _IMP_em.create_density_map(*args)
1164 
1165 def get_binarized_interior(dmap):
1166  r"""get_binarized_interior(DensityMap dmap) -> DensityMap"""
1167  return _IMP_em.get_binarized_interior(dmap)
1168 
1169 def add_to_map(dm, pis):
1170  r"""add_to_map(DensityMap dm, IMP::Particles const & pis)"""
1171  return _IMP_em.add_to_map(dm, pis)
1172 class RadiusDependentDistanceMask(object):
1173  r"""Proxy of C++ IMP::em::RadiusDependentDistanceMask class."""
1174 
1175  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1176  __repr__ = _swig_repr
1177 
1178  def __init__(self, sampling_radius, header):
1179  r"""__init__(RadiusDependentDistanceMask self, float sampling_radius, DensityHeader header) -> RadiusDependentDistanceMask"""
1180  _IMP_em.RadiusDependentDistanceMask_swiginit(self, _IMP_em.new_RadiusDependentDistanceMask(sampling_radius, header))
1181 
1182  def get_neighbor_shift(self):
1183  r"""get_neighbor_shift(RadiusDependentDistanceMask self) -> std::vector< double,std::allocator< double > > const *"""
1184  return _IMP_em.RadiusDependentDistanceMask_get_neighbor_shift(self)
1185 
1186  def get_neighbor_dist(self):
1187  r"""get_neighbor_dist(RadiusDependentDistanceMask self) -> std::vector< double,std::allocator< double > > const *"""
1188  return _IMP_em.RadiusDependentDistanceMask_get_neighbor_dist(self)
1189 
1190  def get_neighbor_dist_exp(self):
1191  r"""get_neighbor_dist_exp(RadiusDependentDistanceMask self) -> std::vector< double,std::allocator< double > > const *"""
1192  return _IMP_em.RadiusDependentDistanceMask_get_neighbor_dist_exp(self)
1193 
1194  def show(self, out):
1195  r"""show(RadiusDependentDistanceMask self, _ostream out)"""
1196  return _IMP_em.RadiusDependentDistanceMask_show(self, out)
1197  __swig_destroy__ = _IMP_em.delete_RadiusDependentDistanceMask
1198 
1199 # Register RadiusDependentDistanceMask in _IMP_em:
1200 _IMP_em.RadiusDependentDistanceMask_swigregister(RadiusDependentDistanceMask)
1201 class DistanceMask(object):
1202  r"""Proxy of C++ IMP::em::DistanceMask class."""
1203 
1204  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1205  __repr__ = _swig_repr
1206 
1207  def __init__(self, *args):
1208  r"""
1209  __init__(DistanceMask self) -> DistanceMask
1210  __init__(DistanceMask self, DensityHeader header) -> DistanceMask
1211  """
1212  _IMP_em.DistanceMask_swiginit(self, _IMP_em.new_DistanceMask(*args))
1213 
1214  def show(self, out):
1215  r"""show(DistanceMask self, _ostream out)"""
1216  return _IMP_em.DistanceMask_show(self, out)
1217 
1218  def is_mask_set(self, radius, eps=0.001):
1219  r"""is_mask_set(DistanceMask self, float radius, float eps=0.001) -> bool"""
1220  return _IMP_em.DistanceMask_is_mask_set(self, radius, eps)
1221  __swig_destroy__ = _IMP_em.delete_DistanceMask
1222 
1223 # Register DistanceMask in _IMP_em:
1224 _IMP_em.DistanceMask_swigregister(DistanceMask)
1225 class EMReaderWriter(MapReaderWriter):
1226  r"""Proxy of C++ IMP::em::EMReaderWriter class."""
1227 
1228  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1229  __swig_destroy__ = _IMP_em.delete_EMReaderWriter
1230 
1231  def __str__(self):
1232  r"""__str__(EMReaderWriter self) -> std::string"""
1233  return _IMP_em.EMReaderWriter___str__(self)
1234 
1235  def __repr__(self):
1236  r"""__repr__(EMReaderWriter self) -> std::string"""
1237  return _IMP_em.EMReaderWriter___repr__(self)
1238 
1239  @staticmethod
1240  def get_from(o):
1241  return _object_cast_to_EMReaderWriter(o)
1242 
1243 
1244  def __init__(self):
1245  r"""__init__(EMReaderWriter self) -> EMReaderWriter"""
1246  _IMP_em.EMReaderWriter_swiginit(self, _IMP_em.new_EMReaderWriter())
1247 
1248 # Register EMReaderWriter in _IMP_em:
1249 _IMP_em.EMReaderWriter_swigregister(EMReaderWriter)
1250 class XplorReaderWriter(MapReaderWriter):
1251  r"""Proxy of C++ IMP::em::XplorReaderWriter class."""
1252 
1253  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1254  __swig_destroy__ = _IMP_em.delete_XplorReaderWriter
1255 
1256  def __str__(self):
1257  r"""__str__(XplorReaderWriter self) -> std::string"""
1258  return _IMP_em.XplorReaderWriter___str__(self)
1259 
1260  def __repr__(self):
1261  r"""__repr__(XplorReaderWriter self) -> std::string"""
1262  return _IMP_em.XplorReaderWriter___repr__(self)
1263 
1264  @staticmethod
1265  def get_from(o):
1266  return _object_cast_to_XplorReaderWriter(o)
1267 
1268 
1269  def __init__(self):
1270  r"""__init__(XplorReaderWriter self) -> XplorReaderWriter"""
1271  _IMP_em.XplorReaderWriter_swiginit(self, _IMP_em.new_XplorReaderWriter())
1272 
1273 # Register XplorReaderWriter in _IMP_em:
1274 _IMP_em.XplorReaderWriter_swigregister(XplorReaderWriter)
1275 class MRCReaderWriter(MapReaderWriter):
1276  r"""Proxy of C++ IMP::em::MRCReaderWriter class."""
1277 
1278  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1279 
1280  def __init__(self, *args):
1281  r"""
1282  __init__(MRCReaderWriter self) -> MRCReaderWriter
1283  __init__(MRCReaderWriter self, std::string fn) -> MRCReaderWriter
1284  """
1285  _IMP_em.MRCReaderWriter_swiginit(self, _IMP_em.new_MRCReaderWriter(*args))
1286  __swig_destroy__ = _IMP_em.delete_MRCReaderWriter
1287 
1288  def __str__(self):
1289  r"""__str__(MRCReaderWriter self) -> std::string"""
1290  return _IMP_em.MRCReaderWriter___str__(self)
1291 
1292  def __repr__(self):
1293  r"""__repr__(MRCReaderWriter self) -> std::string"""
1294  return _IMP_em.MRCReaderWriter___repr__(self)
1295 
1296  @staticmethod
1297  def get_from(o):
1298  return _object_cast_to_MRCReaderWriter(o)
1299 
1300 
1301 # Register MRCReaderWriter in _IMP_em:
1302 _IMP_em.MRCReaderWriter_swigregister(MRCReaderWriter)
1303 class KernelParameters(object):
1304  r"""Proxy of C++ IMP::em::KernelParameters class."""
1305 
1306  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1307 
1308  def __init__(self, *args):
1309  r"""
1310  __init__(KernelParameters self) -> KernelParameters
1311  __init__(KernelParameters self, float resolution) -> KernelParameters
1312  """
1313  _IMP_em.KernelParameters_swiginit(self, _IMP_em.new_KernelParameters(*args))
1314  __swig_destroy__ = _IMP_em.delete_KernelParameters
1315 
1316  def get_rsig(self):
1317  r"""get_rsig(KernelParameters self) -> float"""
1318  return _IMP_em.KernelParameters_get_rsig(self)
1319 
1320  def get_rsigsq(self):
1321  r"""get_rsigsq(KernelParameters self) -> float"""
1322  return _IMP_em.KernelParameters_get_rsigsq(self)
1323 
1324  def get_inv_rsigsq(self):
1325  r"""get_inv_rsigsq(KernelParameters self) -> float"""
1326  return _IMP_em.KernelParameters_get_inv_rsigsq(self)
1327 
1328  def get_timessig(self):
1329  r"""get_timessig(KernelParameters self) -> float"""
1330  return _IMP_em.KernelParameters_get_timessig(self)
1331 
1332  def get_sq2pi3(self):
1333  r"""get_sq2pi3(KernelParameters self) -> float"""
1334  return _IMP_em.KernelParameters_get_sq2pi3(self)
1335 
1336  def get_rnormfac(self):
1337  r"""get_rnormfac(KernelParameters self) -> float"""
1338  return _IMP_em.KernelParameters_get_rnormfac(self)
1339 
1340  def get_rkdist(self):
1341  r"""get_rkdist(KernelParameters self) -> float"""
1342  return _IMP_em.KernelParameters_get_rkdist(self)
1343 
1344  def get_rkdistsq(self):
1345  r"""get_rkdistsq(KernelParameters self) -> float"""
1346  return _IMP_em.KernelParameters_get_rkdistsq(self)
1347 
1348  def get_lim(self):
1349  r"""get_lim(KernelParameters self) -> float"""
1350  return _IMP_em.KernelParameters_get_lim(self)
1351 
1352  def show(self, *args):
1353  r"""show(KernelParameters self, _ostream out=std::cout)"""
1354  return _IMP_em.KernelParameters_show(self, *args)
1355 
1356  def __str__(self):
1357  r"""__str__(KernelParameters self) -> std::string"""
1358  return _IMP_em.KernelParameters___str__(self)
1359 
1360  def __repr__(self):
1361  r"""__repr__(KernelParameters self) -> std::string"""
1362  return _IMP_em.KernelParameters___repr__(self)
1363 
1364  def _get_as_binary(self):
1365  r"""_get_as_binary(KernelParameters self) -> PyObject *"""
1366  return _IMP_em.KernelParameters__get_as_binary(self)
1367 
1368  def _set_from_binary(self, p):
1369  r"""_set_from_binary(KernelParameters self, PyObject * p)"""
1370  return _IMP_em.KernelParameters__set_from_binary(self, p)
1371 
1372  def __getstate__(self):
1373  p = self._get_as_binary()
1374  if len(self.__dict__) > 1:
1375  d = self.__dict__.copy()
1376  del d['this']
1377  p = (d, p)
1378  return p
1379 
1380  def __setstate__(self, p):
1381  if not hasattr(self, 'this'):
1382  self.__init__()
1383  if isinstance(p, tuple):
1384  d, p = p
1385  self.__dict__.update(d)
1386  return self._set_from_binary(p)
1387 
1388 
1389 # Register KernelParameters in _IMP_em:
1390 _IMP_em.KernelParameters_swigregister(KernelParameters)
1391 GAUSSIAN = _IMP_em.GAUSSIAN
1392 
1393 BINARIZED_SPHERE = _IMP_em.BINARIZED_SPHERE
1394 
1395 SPHERE = _IMP_em.SPHERE
1396 
1397 class SampledDensityMap(DensityMap):
1398  r"""Proxy of C++ IMP::em::SampledDensityMap class."""
1399 
1400  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1401 
1402  def __init__(self, *args):
1403  r"""
1404  __init__(SampledDensityMap self, IMP::em::KernelType kt=GAUSSIAN) -> SampledDensityMap
1405  __init__(SampledDensityMap self, DensityHeader header, IMP::em::KernelType kt=GAUSSIAN) -> SampledDensityMap
1406  __init__(SampledDensityMap self, IMP::ParticlesTemp const & ps, double resolution, double voxel_size, FloatKey mass_key=IMP::atom::Mass::get_mass_key(), int sig_cutoff=3, IMP::em::KernelType kt=GAUSSIAN) -> SampledDensityMap
1407  """
1408  _IMP_em.SampledDensityMap_swiginit(self, _IMP_em.new_SampledDensityMap(*args))
1409 
1410  def resample(self):
1411  r"""resample(SampledDensityMap self)"""
1412  return _IMP_em.SampledDensityMap_resample(self)
1413 
1414  def project(self, *args):
1415  r"""project(SampledDensityMap self, IMP::ParticlesTemp const & ps, int x_margin, int y_margin, int z_margin, Vector3D shift=IMP::algebra::Vector3D(0., 0., 0.), FloatKey mass_key=IMP::atom::Mass::get_mass_key())"""
1416  return _IMP_em.SampledDensityMap_project(self, *args)
1417 
1418  def set_particles(self, *args):
1419  r"""set_particles(SampledDensityMap self, IMP::ParticlesTemp const & ps, FloatKey mass_key=IMP::atom::Mass::get_mass_key())"""
1420  return _IMP_em.SampledDensityMap_set_particles(self, *args)
1421 
1422  def get_xyzr_particles(self):
1423  r"""get_xyzr_particles(SampledDensityMap self) -> IMP::core::XYZRs const &"""
1424  return _IMP_em.SampledDensityMap_get_xyzr_particles(self)
1425 
1426  def get_sampled_particles(self):
1427  r"""get_sampled_particles(SampledDensityMap self) -> IMP::Particles const &"""
1428  return _IMP_em.SampledDensityMap_get_sampled_particles(self)
1429 
1430  def get_weight_key(self):
1431  r"""get_weight_key(SampledDensityMap self) -> FloatKey"""
1432  return _IMP_em.SampledDensityMap_get_weight_key(self)
1433 
1434  def get_minimum_resampled_value(self):
1435  r"""get_minimum_resampled_value(SampledDensityMap self) -> float"""
1436  return _IMP_em.SampledDensityMap_get_minimum_resampled_value(self)
1437 
1438  def update_resolution(self, res):
1439  r"""update_resolution(SampledDensityMap self, IMP::Float res)"""
1440  return _IMP_em.SampledDensityMap_update_resolution(self, res)
1441  __swig_destroy__ = _IMP_em.delete_SampledDensityMap
1442 
1443  def __str__(self):
1444  r"""__str__(SampledDensityMap self) -> std::string"""
1445  return _IMP_em.SampledDensityMap___str__(self)
1446 
1447  def __repr__(self):
1448  r"""__repr__(SampledDensityMap self) -> std::string"""
1449  return _IMP_em.SampledDensityMap___repr__(self)
1450 
1451  @staticmethod
1452  def get_from(o):
1453  return _object_cast_to_SampledDensityMap(o)
1454 
1455 
1456 # Register SampledDensityMap in _IMP_em:
1457 _IMP_em.SampledDensityMap_swigregister(SampledDensityMap)
1458 IMP_DEFAULT_NUM_SHELLS = _IMP_em.IMP_DEFAULT_NUM_SHELLS
1459 
1460 IMP_SIG_CUTOFF = _IMP_em.IMP_SIG_CUTOFF
1461 
1462 class SurfaceShellDensityMap(SampledDensityMap):
1463  r"""Proxy of C++ IMP::em::SurfaceShellDensityMap class."""
1464 
1465  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1466 
1467  def __init__(self, *args):
1468  r"""
1469  __init__(SurfaceShellDensityMap self) -> SurfaceShellDensityMap
1470  __init__(SurfaceShellDensityMap self, DensityHeader header) -> SurfaceShellDensityMap
1471  __init__(SurfaceShellDensityMap self, IMP::ParticlesTemp const & ps, float voxel_size, FloatKey mass_key=IMP::atom::Mass::get_mass_key(), int num_shells=5) -> SurfaceShellDensityMap
1472  """
1473  _IMP_em.SurfaceShellDensityMap_swiginit(self, _IMP_em.new_SurfaceShellDensityMap(*args))
1474 
1475  def binarize(self, scene_val):
1476  r"""binarize(SurfaceShellDensityMap self, float scene_val)"""
1477  return _IMP_em.SurfaceShellDensityMap_binarize(self, scene_val)
1478 
1479  def has_background_neighbor(self, voxel_ind):
1480  r"""has_background_neighbor(SurfaceShellDensityMap self, long voxel_ind) -> bool"""
1481  return _IMP_em.SurfaceShellDensityMap_has_background_neighbor(self, voxel_ind)
1482  __swig_destroy__ = _IMP_em.delete_SurfaceShellDensityMap
1483 
1484  def __str__(self):
1485  r"""__str__(SurfaceShellDensityMap self) -> std::string"""
1486  return _IMP_em.SurfaceShellDensityMap___str__(self)
1487 
1488  def __repr__(self):
1489  r"""__repr__(SurfaceShellDensityMap self) -> std::string"""
1490  return _IMP_em.SurfaceShellDensityMap___repr__(self)
1491 
1492  @staticmethod
1493  def get_from(o):
1494  return _object_cast_to_SurfaceShellDensityMap(o)
1495 
1496 
1497 # Register SurfaceShellDensityMap in _IMP_em:
1498 _IMP_em.SurfaceShellDensityMap_swigregister(SurfaceShellDensityMap)
1499 
1500 def get_coarse_cc_score(*args):
1501  r"""get_coarse_cc_score(DensityMap data, SampledDensityMap model_map, double scalefactor, bool recalc_rms=True, bool resample=True, IMP::FloatPair norm_factors=IMP::FloatPair(0., 0.)) -> double"""
1502  return _IMP_em.get_coarse_cc_score(*args)
1503 
1504 def get_coarse_cc_coefficient(*args):
1505  r"""get_coarse_cc_coefficient(DensityMap grid1, DensityMap grid2, double grid2_voxel_data_threshold, bool allow_padding=False, IMP::FloatPair norm_factors=IMP::FloatPair(0., 0.)) -> double"""
1506  return _IMP_em.get_coarse_cc_coefficient(*args)
1507 
1508 def get_coarse_cc_local_coefficient(em_map, model_map, voxel_data_threshold):
1509  r"""get_coarse_cc_local_coefficient(DensityMap em_map, DensityMap model_map, double voxel_data_threshold) -> double"""
1510  return _IMP_em.get_coarse_cc_local_coefficient(em_map, model_map, voxel_data_threshold)
1511 class CoarseConvolution(object):
1512  r"""Proxy of C++ IMP::em::CoarseConvolution class."""
1513 
1514  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1515  __repr__ = _swig_repr
1516 
1517  @staticmethod
1518  def convolution(em_map, model_map, voxel_data_threshold, recalc_ccnormfac=True):
1519  r"""convolution(DensityMap em_map, DensityMap model_map, float voxel_data_threshold, bool recalc_ccnormfac=True) -> float"""
1520  return _IMP_em.CoarseConvolution_convolution(em_map, model_map, voxel_data_threshold, recalc_ccnormfac)
1521 
1522  def __init__(self):
1523  r"""__init__(CoarseConvolution self) -> CoarseConvolution"""
1524  _IMP_em.CoarseConvolution_swiginit(self, _IMP_em.new_CoarseConvolution())
1525  __swig_destroy__ = _IMP_em.delete_CoarseConvolution
1526 
1527 # Register CoarseConvolution in _IMP_em:
1528 _IMP_em.CoarseConvolution_swigregister(CoarseConvolution)
1529 class CoarseCCatIntervals(IMP.Object):
1530  r"""Proxy of C++ IMP::em::CoarseCCatIntervals class."""
1531 
1532  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1533 
1534  def __init__(self, *args):
1535  r"""
1536  __init__(CoarseCCatIntervals self, int const & ncd) -> CoarseCCatIntervals
1537  __init__(CoarseCCatIntervals self) -> CoarseCCatIntervals
1538  """
1539  _IMP_em.CoarseCCatIntervals_swiginit(self, _IMP_em.new_CoarseCCatIntervals(*args))
1540 
1541  def evaluate(self, em_map, model_map, deriv, scalefac, lderiv, eval_interval):
1542  r"""evaluate(CoarseCCatIntervals self, DensityMap em_map, SampledDensityMap model_map, IMP::algebra::Vector3Ds const & deriv, float scalefac, bool lderiv, unsigned long eval_interval) -> std::pair< double,IMP::algebra::Vector3Ds >"""
1543  return _IMP_em.CoarseCCatIntervals_evaluate(self, em_map, model_map, deriv, scalefac, lderiv, eval_interval)
1544 
1545  def get_version_info(self):
1546  r"""get_version_info(CoarseCCatIntervals self) -> VersionInfo"""
1547  return _IMP_em.CoarseCCatIntervals_get_version_info(self)
1548  __swig_destroy__ = _IMP_em.delete_CoarseCCatIntervals
1549 
1550  def __str__(self):
1551  r"""__str__(CoarseCCatIntervals self) -> std::string"""
1552  return _IMP_em.CoarseCCatIntervals___str__(self)
1553 
1554  def __repr__(self):
1555  r"""__repr__(CoarseCCatIntervals self) -> std::string"""
1556  return _IMP_em.CoarseCCatIntervals___repr__(self)
1557 
1558  @staticmethod
1559  def get_from(o):
1560  return _object_cast_to_CoarseCCatIntervals(o)
1561 
1562 
1563 # Register CoarseCCatIntervals in _IMP_em:
1564 _IMP_em.CoarseCCatIntervals_swigregister(CoarseCCatIntervals)
1565 
1567  r"""bayesem3d_get_distinct_and_counts(DensityMap em) -> std::map< double,int >"""
1568  return _IMP_em.bayesem3d_get_distinct_and_counts(em)
1569 
1571  r"""bayesem3d_get_cumulative_sum(DensityMap em) -> IMP::Floats"""
1572  return _IMP_em.bayesem3d_get_cumulative_sum(em)
1573 
1575  r"""bayesem3d_get_cumulative_sum_with_reference(DensityMap em) -> std::map< double,double >"""
1576  return _IMP_em.bayesem3d_get_cumulative_sum_with_reference(em)
1577 
1578 def bayesem3d_linear_interpolate(x_data, y_data, x, extrapolate):
1579  r"""bayesem3d_linear_interpolate(IMP::Floats const & x_data, IMP::Floats const & y_data, double x, bool extrapolate) -> double"""
1580  return _IMP_em.bayesem3d_linear_interpolate(x_data, y_data, x, extrapolate)
1581 
1582 def bayesem3d_get_logabssumexp(x, y, sx, sy):
1583  r"""bayesem3d_get_logabssumexp(double x, double y, double sx, double sy) -> IMP::FloatPair"""
1584  return _IMP_em.bayesem3d_get_logabssumexp(x, y, sx, sy)
1585 
1586 def bayesem3d_get_logabssumprodexp(x, y, wx, wy):
1587  r"""bayesem3d_get_logabssumprodexp(double x, double y, double wx, double wy) -> IMP::FloatPair"""
1588  return _IMP_em.bayesem3d_get_logabssumprodexp(x, y, wx, wy)
1589 
1590 def bayesem3d_get_logsumexp(x, y):
1591  r"""bayesem3d_get_logsumexp(double x, double y) -> double"""
1592  return _IMP_em.bayesem3d_get_logsumexp(x, y)
1593 
1594 def bayesem3d_get_logsumprodexp(x, y, wx, wy):
1595  r"""bayesem3d_get_logsumprodexp(double x, double y, double wx, double wy) -> double"""
1596  return _IMP_em.bayesem3d_get_logsumprodexp(x, y, wx, wy)
1597 
1598 def bayesem3d_get_em_density_squared(em, number_of_voxels):
1599  r"""bayesem3d_get_em_density_squared(DensityMap em, long number_of_voxels) -> IMP::FloatPair"""
1600  return _IMP_em.bayesem3d_get_em_density_squared(em, number_of_voxels)
1601 
1602 def bayesem3d_get_value(p, pt, mass_ii, kps):
1603  r"""bayesem3d_get_value(Particle p, Vector3D pt, double mass_ii, KernelParameters kps) -> std::vector< double,std::allocator< double > >"""
1604  return _IMP_em.bayesem3d_get_value(p, pt, mass_ii, kps)
1605 
1606 def bayesem3d_get_value_no_deriv(p, pt, mass_ii, kps):
1607  r"""bayesem3d_get_value_no_deriv(Particle p, Vector3D pt, double mass_ii, KernelParameters kps) -> std::vector< double,std::allocator< double > >"""
1608  return _IMP_em.bayesem3d_get_value_no_deriv(p, pt, mass_ii, kps)
1609 
1610 def bayesem3d_get_density_from_particle(em, ps, resolution, window_size=1.0):
1611  r"""bayesem3d_get_density_from_particle(DensityMap em, IMP::ParticlesTemp const & ps, double resolution, double const window_size=1.0) -> DensityMap"""
1612  return _IMP_em.bayesem3d_get_density_from_particle(em, ps, resolution, window_size)
1613 
1615  r"""bayesem3d_get_cross_correlation_coefficient(DensityMap em1, DensityMap em2) -> double"""
1616  return _IMP_em.bayesem3d_get_cross_correlation_coefficient(em1, em2)
1617 
1618 def bayesem3d_get_score_and_derivative(em, ps, resolution, sigma, window_size=1.0):
1619  r"""bayesem3d_get_score_and_derivative(DensityMap em, IMP::ParticlesTemp const & ps, double resolution, double sigma, double const window_size=1.0) -> std::pair< double,IMP::algebra::Vector3Ds >"""
1620  return _IMP_em.bayesem3d_get_score_and_derivative(em, ps, resolution, sigma, window_size)
1621 
1622 def bayesem3d_get_normalized_intensities(em, ps, resolution):
1623  r"""bayesem3d_get_normalized_intensities(DensityMap em, IMP::ParticlesTemp const & ps, double resolution)"""
1624  return _IMP_em.bayesem3d_get_normalized_intensities(em, ps, resolution)
1625 class FitRestraint(IMP.Restraint):
1626  r"""Proxy of C++ IMP::em::FitRestraint class."""
1627 
1628  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1629 
1630  def __init__(self, *args):
1631  r"""__init__(FitRestraint self, IMP::ParticlesTemp ps, DensityMap em_map, IMP::FloatPair norm_factors=IMP::FloatPair(0., 0.), FloatKey weight_key=IMP::atom::Mass::get_mass_key(), float scale=1, bool use_rigid_bodies=True, IMP::em::KernelType kt=GAUSSIAN) -> FitRestraint"""
1632  _IMP_em.FitRestraint_swiginit(self, _IMP_em.new_FitRestraint(*args))
1633 
1634  def get_model_dens_map(self):
1635  r"""get_model_dens_map(FitRestraint self) -> SampledDensityMap"""
1636  return _IMP_em.FitRestraint_get_model_dens_map(self)
1637 
1638  def set_scale_factor(self, scale):
1639  r"""set_scale_factor(FitRestraint self, float scale)"""
1640  return _IMP_em.FitRestraint_set_scale_factor(self, scale)
1641 
1642  def get_scale_factor(self):
1643  r"""get_scale_factor(FitRestraint self) -> float"""
1644  return _IMP_em.FitRestraint_get_scale_factor(self)
1645 
1646  def do_get_inputs(self):
1647  r"""do_get_inputs(FitRestraint self) -> IMP::ModelObjectsTemp"""
1648  return _IMP_em.FitRestraint_do_get_inputs(self)
1649 
1650  def get_version_info(self):
1651  r"""get_version_info(FitRestraint self) -> VersionInfo"""
1652  return _IMP_em.FitRestraint_get_version_info(self)
1653  __swig_destroy__ = _IMP_em.delete_FitRestraint
1654 
1655  def __str__(self):
1656  r"""__str__(FitRestraint self) -> std::string"""
1657  return _IMP_em.FitRestraint___str__(self)
1658 
1659  def __repr__(self):
1660  r"""__repr__(FitRestraint self) -> std::string"""
1661  return _IMP_em.FitRestraint___repr__(self)
1662 
1663  @staticmethod
1664  def get_from(o):
1665  return _object_cast_to_FitRestraint(o)
1666 
1667 
1668 # Register FitRestraint in _IMP_em:
1669 _IMP_em.FitRestraint_swigregister(FitRestraint)
1670 class FitRestraintBayesEM3D(IMP.Restraint):
1671  r"""Proxy of C++ IMP::em::FitRestraintBayesEM3D class."""
1672 
1673  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1674 
1675  def __init__(self, *args):
1676  r"""__init__(FitRestraintBayesEM3D self, IMP::ParticlesTemp ps, DensityMap em_map, FloatKey weight_key=IMP::atom::Mass::get_mass_key(), bool use_rigid_bodies=True, double sigma=.1, double window_size=1.0) -> FitRestraintBayesEM3D"""
1677  _IMP_em.FitRestraintBayesEM3D_swiginit(self, _IMP_em.new_FitRestraintBayesEM3D(*args))
1678 
1679  def do_get_inputs(self):
1680  r"""do_get_inputs(FitRestraintBayesEM3D self) -> IMP::ModelObjectsTemp"""
1681  return _IMP_em.FitRestraintBayesEM3D_do_get_inputs(self)
1682 
1683  def get_version_info(self):
1684  r"""get_version_info(FitRestraintBayesEM3D self) -> VersionInfo"""
1685  return _IMP_em.FitRestraintBayesEM3D_get_version_info(self)
1686  __swig_destroy__ = _IMP_em.delete_FitRestraintBayesEM3D
1687 
1688  def __str__(self):
1689  r"""__str__(FitRestraintBayesEM3D self) -> std::string"""
1690  return _IMP_em.FitRestraintBayesEM3D___str__(self)
1691 
1692  def __repr__(self):
1693  r"""__repr__(FitRestraintBayesEM3D self) -> std::string"""
1694  return _IMP_em.FitRestraintBayesEM3D___repr__(self)
1695 
1696  @staticmethod
1697  def get_from(o):
1698  return _object_cast_to_FitRestraintBayesEM3D(o)
1699 
1700 
1701 # Register FitRestraintBayesEM3D in _IMP_em:
1702 _IMP_em.FitRestraintBayesEM3D_swigregister(FitRestraintBayesEM3D)
1703 
1704 def density2particles(dmap, threshold, m, step=1):
1705  r"""density2particles(DensityMap dmap, IMP::Float threshold, Model m, int step=1) -> IMP::Particles"""
1706  return _IMP_em.density2particles(dmap, threshold, m, step)
1707 
1708 def density2vectors(dmap, threshold):
1709  r"""density2vectors(DensityMap dmap, IMP::Float threshold) -> IMP::algebra::Vector3Ds"""
1710  return _IMP_em.density2vectors(dmap, threshold)
1711 
1712 def particles2density(*args):
1713  r"""particles2density(IMP::ParticlesTemp const & ps, IMP::Float resolution, IMP::Float apix, int sig_cutoff=3, FloatKey weight_key=IMP::atom::Mass::get_mass_key()) -> SampledDensityMap"""
1714  return _IMP_em.particles2density(*args)
1715 
1716 def particles2binarized_density(*args):
1717  r"""particles2binarized_density(IMP::ParticlesTemp const & ps, IMP::Float resolution, IMP::Float apix, int sig_cutoff=3, FloatKey weight_key=IMP::atom::Mass::get_mass_key()) -> SampledDensityMap"""
1718  return _IMP_em.particles2binarized_density(*args)
1719 
1720 def particles2surface(*args):
1721  r"""particles2surface(IMP::ParticlesTemp const & ps, IMP::Float apix, FloatKey weight_key=IMP::atom::Mass::get_mass_key()) -> SurfaceShellDensityMap"""
1722  return _IMP_em.particles2surface(*args)
1723 
1724 def calculate_intersection_score(d1, d2):
1725  r"""calculate_intersection_score(SurfaceShellDensityMap d1, SurfaceShellDensityMap d2) -> IMP::Float"""
1726  return _IMP_em.calculate_intersection_score(d1, d2)
1727 class SpiderHeader(object):
1728  r"""Proxy of C++ IMP::em::SpiderHeader class."""
1729 
1730  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1731  __repr__ = _swig_repr
1732  fNslice = property(_IMP_em.SpiderHeader_fNslice_get, _IMP_em.SpiderHeader_fNslice_set, doc=r"""fNslice : float""")
1733  fNrow = property(_IMP_em.SpiderHeader_fNrow_get, _IMP_em.SpiderHeader_fNrow_set, doc=r"""fNrow : float""")
1734  fNrec = property(_IMP_em.SpiderHeader_fNrec_get, _IMP_em.SpiderHeader_fNrec_set, doc=r"""fNrec : float""")
1735  fNlabel = property(_IMP_em.SpiderHeader_fNlabel_get, _IMP_em.SpiderHeader_fNlabel_set, doc=r"""fNlabel : float""")
1736  fIform = property(_IMP_em.SpiderHeader_fIform_get, _IMP_em.SpiderHeader_fIform_set, doc=r"""fIform : float""")
1737  fImami = property(_IMP_em.SpiderHeader_fImami_get, _IMP_em.SpiderHeader_fImami_set, doc=r"""fImami : float""")
1738  fFmax = property(_IMP_em.SpiderHeader_fFmax_get, _IMP_em.SpiderHeader_fFmax_set, doc=r"""fFmax : float""")
1739  fFmin = property(_IMP_em.SpiderHeader_fFmin_get, _IMP_em.SpiderHeader_fFmin_set, doc=r"""fFmin : float""")
1740  fAv = property(_IMP_em.SpiderHeader_fAv_get, _IMP_em.SpiderHeader_fAv_set, doc=r"""fAv : float""")
1741  fSig = property(_IMP_em.SpiderHeader_fSig_get, _IMP_em.SpiderHeader_fSig_set, doc=r"""fSig : float""")
1742  fIhist = property(_IMP_em.SpiderHeader_fIhist_get, _IMP_em.SpiderHeader_fIhist_set, doc=r"""fIhist : float""")
1743  fNcol = property(_IMP_em.SpiderHeader_fNcol_get, _IMP_em.SpiderHeader_fNcol_set, doc=r"""fNcol : float""")
1744  fLabrec = property(_IMP_em.SpiderHeader_fLabrec_get, _IMP_em.SpiderHeader_fLabrec_set, doc=r"""fLabrec : float""")
1745  fIangle = property(_IMP_em.SpiderHeader_fIangle_get, _IMP_em.SpiderHeader_fIangle_set, doc=r"""fIangle : float""")
1746  fPhi = property(_IMP_em.SpiderHeader_fPhi_get, _IMP_em.SpiderHeader_fPhi_set, doc=r"""fPhi : float""")
1747  fTheta = property(_IMP_em.SpiderHeader_fTheta_get, _IMP_em.SpiderHeader_fTheta_set, doc=r"""fTheta : float""")
1748  fPsi = property(_IMP_em.SpiderHeader_fPsi_get, _IMP_em.SpiderHeader_fPsi_set, doc=r"""fPsi : float""")
1749  fXoff = property(_IMP_em.SpiderHeader_fXoff_get, _IMP_em.SpiderHeader_fXoff_set, doc=r"""fXoff : float""")
1750  fYoff = property(_IMP_em.SpiderHeader_fYoff_get, _IMP_em.SpiderHeader_fYoff_set, doc=r"""fYoff : float""")
1751  fZoff = property(_IMP_em.SpiderHeader_fZoff_get, _IMP_em.SpiderHeader_fZoff_set, doc=r"""fZoff : float""")
1752  fScale = property(_IMP_em.SpiderHeader_fScale_get, _IMP_em.SpiderHeader_fScale_set, doc=r"""fScale : float""")
1753  fLabbyt = property(_IMP_em.SpiderHeader_fLabbyt_get, _IMP_em.SpiderHeader_fLabbyt_set, doc=r"""fLabbyt : float""")
1754  fLenbyt = property(_IMP_em.SpiderHeader_fLenbyt_get, _IMP_em.SpiderHeader_fLenbyt_set, doc=r"""fLenbyt : float""")
1755  fNothing = property(_IMP_em.SpiderHeader_fNothing_get, _IMP_em.SpiderHeader_fNothing_set, doc=r"""fNothing : a(24).char""")
1756  fFlag = property(_IMP_em.SpiderHeader_fFlag_get, _IMP_em.SpiderHeader_fFlag_set, doc=r"""fFlag : float""")
1757  fPhi1 = property(_IMP_em.SpiderHeader_fPhi1_get, _IMP_em.SpiderHeader_fPhi1_set, doc=r"""fPhi1 : float""")
1758  fTheta1 = property(_IMP_em.SpiderHeader_fTheta1_get, _IMP_em.SpiderHeader_fTheta1_set, doc=r"""fTheta1 : float""")
1759  fPsi1 = property(_IMP_em.SpiderHeader_fPsi1_get, _IMP_em.SpiderHeader_fPsi1_set, doc=r"""fPsi1 : float""")
1760  fPhi2 = property(_IMP_em.SpiderHeader_fPhi2_get, _IMP_em.SpiderHeader_fPhi2_set, doc=r"""fPhi2 : float""")
1761  fTheta2 = property(_IMP_em.SpiderHeader_fTheta2_get, _IMP_em.SpiderHeader_fTheta2_set, doc=r"""fTheta2 : float""")
1762  fPsi2 = property(_IMP_em.SpiderHeader_fPsi2_get, _IMP_em.SpiderHeader_fPsi2_set, doc=r"""fPsi2 : float""")
1763  fGeo_matrix = property(_IMP_em.SpiderHeader_fGeo_matrix_get, _IMP_em.SpiderHeader_fGeo_matrix_set, doc=r"""fGeo_matrix : a(3).a(3).double""")
1764  fAngle1 = property(_IMP_em.SpiderHeader_fAngle1_get, _IMP_em.SpiderHeader_fAngle1_set, doc=r"""fAngle1 : float""")
1765  fr1 = property(_IMP_em.SpiderHeader_fr1_get, _IMP_em.SpiderHeader_fr1_set, doc=r"""fr1 : float""")
1766  fr2 = property(_IMP_em.SpiderHeader_fr2_get, _IMP_em.SpiderHeader_fr2_set, doc=r"""fr2 : float""")
1767  RTflag = property(_IMP_em.SpiderHeader_RTflag_get, _IMP_em.SpiderHeader_RTflag_set, doc=r"""RTflag : float""")
1768  Astart = property(_IMP_em.SpiderHeader_Astart_get, _IMP_em.SpiderHeader_Astart_set, doc=r"""Astart : float""")
1769  Aend = property(_IMP_em.SpiderHeader_Aend_get, _IMP_em.SpiderHeader_Aend_set, doc=r"""Aend : float""")
1770  Ainc = property(_IMP_em.SpiderHeader_Ainc_get, _IMP_em.SpiderHeader_Ainc_set, doc=r"""Ainc : float""")
1771  Rsigma = property(_IMP_em.SpiderHeader_Rsigma_get, _IMP_em.SpiderHeader_Rsigma_set, doc=r"""Rsigma : float""")
1772  Tstart = property(_IMP_em.SpiderHeader_Tstart_get, _IMP_em.SpiderHeader_Tstart_set, doc=r"""Tstart : float""")
1773  Tend = property(_IMP_em.SpiderHeader_Tend_get, _IMP_em.SpiderHeader_Tend_set, doc=r"""Tend : float""")
1774  Tinc = property(_IMP_em.SpiderHeader_Tinc_get, _IMP_em.SpiderHeader_Tinc_set, doc=r"""Tinc : float""")
1775  Weight = property(_IMP_em.SpiderHeader_Weight_get, _IMP_em.SpiderHeader_Weight_set, doc=r"""Weight : float""")
1776  Flip = property(_IMP_em.SpiderHeader_Flip_get, _IMP_em.SpiderHeader_Flip_set, doc=r"""Flip : float""")
1777  empty = property(_IMP_em.SpiderHeader_empty_get, _IMP_em.SpiderHeader_empty_set, doc=r"""empty : a(576).char""")
1778  szIDat = property(_IMP_em.SpiderHeader_szIDat_get, _IMP_em.SpiderHeader_szIDat_set, doc=r"""szIDat : a(12).char""")
1779  szITim = property(_IMP_em.SpiderHeader_szITim_get, _IMP_em.SpiderHeader_szITim_set, doc=r"""szITim : a(8).char""")
1780  szITit = property(_IMP_em.SpiderHeader_szITit_get, _IMP_em.SpiderHeader_szITit_set, doc=r"""szITit : a(160).char""")
1781 
1782  def show(self, out):
1783  r"""show(SpiderHeader self, _ostream out)"""
1784  return _IMP_em.SpiderHeader_show(self, out)
1785 
1786  def __init__(self):
1787  r"""__init__(SpiderHeader self) -> SpiderHeader"""
1788  _IMP_em.SpiderHeader_swiginit(self, _IMP_em.new_SpiderHeader())
1789  __swig_destroy__ = _IMP_em.delete_SpiderHeader
1790 
1791 # Register SpiderHeader in _IMP_em:
1792 _IMP_em.SpiderHeader_swigregister(SpiderHeader)
1793 class ImageHeader(object):
1794  r"""Proxy of C++ IMP::em::ImageHeader class."""
1795 
1796  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1797  __repr__ = _swig_repr
1798  IMG_BYTE = _IMP_em.ImageHeader_IMG_BYTE
1799 
1800  IMG_IMPEM = _IMP_em.ImageHeader_IMG_IMPEM
1801 
1802  IMG_INT = _IMP_em.ImageHeader_IMG_INT
1803 
1804  VOL_BYTE = _IMP_em.ImageHeader_VOL_BYTE
1805 
1806  VOL_IMPEM = _IMP_em.ImageHeader_VOL_IMPEM
1807 
1808  VOL_INT = _IMP_em.ImageHeader_VOL_INT
1809 
1810  IMG_FOURIER = _IMP_em.ImageHeader_IMG_FOURIER
1811 
1812  VOL_FOURIER = _IMP_em.ImageHeader_VOL_FOURIER
1813 
1814 
1815  def __init__(self, *args):
1816  r"""
1817  __init__(ImageHeader self) -> ImageHeader
1818  __init__(ImageHeader self, IMP::em::ImageHeader::img_type im) -> ImageHeader
1819  __init__(ImageHeader self, float im) -> ImageHeader
1820  """
1821  _IMP_em.ImageHeader_swiginit(self, _IMP_em.new_ImageHeader(*args))
1822 
1823  def get_image_type(self):
1824  r"""get_image_type(ImageHeader self) -> float"""
1825  return _IMP_em.ImageHeader_get_image_type(self)
1826 
1827  def set_image_type(self, *args):
1828  r"""
1829  set_image_type(ImageHeader self, IMP::em::ImageHeader::img_type im)
1830  set_image_type(ImageHeader self, float im)
1831  """
1832  return _IMP_em.ImageHeader_set_image_type(self, *args)
1833 
1834  def do_show(self, out):
1835  r"""do_show(ImageHeader self, _ostream out)"""
1836  return _IMP_em.ImageHeader_do_show(self, out)
1837 
1838  def show(self, *args):
1839  r"""show(ImageHeader self, _ostream out=std::cout)"""
1840  return _IMP_em.ImageHeader_show(self, *args)
1841 
1842  def print_hard(self, out):
1843  r"""print_hard(ImageHeader self, _ostream out)"""
1844  return _IMP_em.ImageHeader_print_hard(self, out)
1845 
1846  def show_projection_params(self, out):
1847  r"""show_projection_params(ImageHeader self, _ostream out)"""
1848  return _IMP_em.ImageHeader_show_projection_params(self, out)
1849 
1850  def read(self, *args):
1851  r"""
1852  read(ImageHeader self, IMP::String const filename, bool skip_type_check=False, bool force_reversed=False, bool skip_extra_checkings=False) -> int
1853  read(ImageHeader self, std::ifstream & f, bool skip_type_check=False, bool force_reversed=False, bool skip_extra_checkings=False) -> bool
1854  """
1855  return _IMP_em.ImageHeader_read(self, *args)
1856 
1857  def write(self, *args):
1858  r"""
1859  write(ImageHeader self, IMP::String const & filename, bool force_reversed=False)
1860  write(ImageHeader self, std::ofstream & f, bool force_reversed=False)
1861  """
1862  return _IMP_em.ImageHeader_write(self, *args)
1863 
1864  def clear(self):
1865  r"""clear(ImageHeader self)"""
1866  return _IMP_em.ImageHeader_clear(self)
1867 
1868  def set_header(self):
1869  r"""set_header(ImageHeader self)"""
1870  return _IMP_em.ImageHeader_set_header(self)
1871 
1872  def get_reversed(self):
1873  r"""get_reversed(ImageHeader self) -> bool"""
1874  return _IMP_em.ImageHeader_get_reversed(self)
1875 
1876  def set_reversed(self, value):
1877  r"""set_reversed(ImageHeader self, bool value)"""
1878  return _IMP_em.ImageHeader_set_reversed(self, value)
1879 
1880  def get_number_of_slices(self):
1881  r"""get_number_of_slices(ImageHeader self) -> unsigned int"""
1882  return _IMP_em.ImageHeader_get_number_of_slices(self)
1883 
1884  def set_number_of_slices(self, n):
1885  r"""set_number_of_slices(ImageHeader self, unsigned int n)"""
1886  return _IMP_em.ImageHeader_set_number_of_slices(self, n)
1887 
1888  def get_number_of_rows(self):
1889  r"""get_number_of_rows(ImageHeader self) -> unsigned int"""
1890  return _IMP_em.ImageHeader_get_number_of_rows(self)
1891 
1892  def set_number_of_rows(self, n):
1893  r"""set_number_of_rows(ImageHeader self, unsigned int n)"""
1894  return _IMP_em.ImageHeader_set_number_of_rows(self, n)
1895 
1896  def get_number_of_columns(self):
1897  r"""get_number_of_columns(ImageHeader self) -> unsigned int"""
1898  return _IMP_em.ImageHeader_get_number_of_columns(self)
1899 
1900  def set_number_of_columns(self, n):
1901  r"""set_number_of_columns(ImageHeader self, unsigned int n)"""
1902  return _IMP_em.ImageHeader_set_number_of_columns(self, n)
1903 
1904  def get_old_rot(self):
1905  r"""get_old_rot(ImageHeader self) -> float"""
1906  return _IMP_em.ImageHeader_get_old_rot(self)
1907 
1908  def set_old_rot(self, value):
1909  r"""set_old_rot(ImageHeader self, float value)"""
1910  return _IMP_em.ImageHeader_set_old_rot(self, value)
1911 
1912  def get_fAngle1(self):
1913  r"""get_fAngle1(ImageHeader self) -> float"""
1914  return _IMP_em.ImageHeader_get_fAngle1(self)
1915 
1916  def set_fAngle1(self, value):
1917  r"""set_fAngle1(ImageHeader self, float value)"""
1918  return _IMP_em.ImageHeader_set_fAngle1(self, value)
1919 
1920  def get_Scale(self):
1921  r"""get_Scale(ImageHeader self) -> float"""
1922  return _IMP_em.ImageHeader_get_Scale(self)
1923 
1924  def set_Scale(self, value):
1925  r"""set_Scale(ImageHeader self, float value)"""
1926  return _IMP_em.ImageHeader_set_Scale(self, value)
1927 
1928  def get_Flip(self):
1929  r"""get_Flip(ImageHeader self) -> float"""
1930  return _IMP_em.ImageHeader_get_Flip(self)
1931 
1932  def set_Flip(self, value):
1933  r"""set_Flip(ImageHeader self, float value)"""
1934  return _IMP_em.ImageHeader_set_Flip(self, value)
1935 
1936  def get_Weight(self):
1937  r"""get_Weight(ImageHeader self) -> float"""
1938  return _IMP_em.ImageHeader_get_Weight(self)
1939 
1940  def set_Weight(self, value):
1941  r"""set_Weight(ImageHeader self, float value)"""
1942  return _IMP_em.ImageHeader_set_Weight(self, value)
1943 
1944  def get_fNrec(self):
1945  r"""get_fNrec(ImageHeader self) -> float"""
1946  return _IMP_em.ImageHeader_get_fNrec(self)
1947 
1948  def set_fNrec(self, value):
1949  r"""set_fNrec(ImageHeader self, float value)"""
1950  return _IMP_em.ImageHeader_set_fNrec(self, value)
1951 
1952  def get_fNlabel(self):
1953  r"""get_fNlabel(ImageHeader self) -> float"""
1954  return _IMP_em.ImageHeader_get_fNlabel(self)
1955 
1956  def set_fNlabel(self, value):
1957  r"""set_fNlabel(ImageHeader self, float value)"""
1958  return _IMP_em.ImageHeader_set_fNlabel(self, value)
1959 
1960  def get_fIform(self):
1961  r"""get_fIform(ImageHeader self) -> float"""
1962  return _IMP_em.ImageHeader_get_fIform(self)
1963 
1964  def set_fIform(self, value):
1965  r"""set_fIform(ImageHeader self, float value)"""
1966  return _IMP_em.ImageHeader_set_fIform(self, value)
1967 
1968  def get_fImami(self):
1969  r"""get_fImami(ImageHeader self) -> float"""
1970  return _IMP_em.ImageHeader_get_fImami(self)
1971 
1972  def set_fImami(self, value):
1973  r"""set_fImami(ImageHeader self, float value)"""
1974  return _IMP_em.ImageHeader_set_fImami(self, value)
1975 
1976  def get_fFmax(self):
1977  r"""get_fFmax(ImageHeader self) -> float"""
1978  return _IMP_em.ImageHeader_get_fFmax(self)
1979 
1980  def set_fFmax(self, value):
1981  r"""set_fFmax(ImageHeader self, float value)"""
1982  return _IMP_em.ImageHeader_set_fFmax(self, value)
1983 
1984  def get_fFmin(self):
1985  r"""get_fFmin(ImageHeader self) -> float"""
1986  return _IMP_em.ImageHeader_get_fFmin(self)
1987 
1988  def set_fFmin(self, value):
1989  r"""set_fFmin(ImageHeader self, float value)"""
1990  return _IMP_em.ImageHeader_set_fFmin(self, value)
1991 
1992  def get_fAv(self):
1993  r"""get_fAv(ImageHeader self) -> float"""
1994  return _IMP_em.ImageHeader_get_fAv(self)
1995 
1996  def set_fAv(self, value):
1997  r"""set_fAv(ImageHeader self, float value)"""
1998  return _IMP_em.ImageHeader_set_fAv(self, value)
1999 
2000  def get_fSig(self):
2001  r"""get_fSig(ImageHeader self) -> float"""
2002  return _IMP_em.ImageHeader_get_fSig(self)
2003 
2004  def set_fSig(self, value):
2005  r"""set_fSig(ImageHeader self, float value)"""
2006  return _IMP_em.ImageHeader_set_fSig(self, value)
2007 
2008  def get_fIhist(self):
2009  r"""get_fIhist(ImageHeader self) -> float"""
2010  return _IMP_em.ImageHeader_get_fIhist(self)
2011 
2012  def set_fIhist(self, value):
2013  r"""set_fIhist(ImageHeader self, float value)"""
2014  return _IMP_em.ImageHeader_set_fIhist(self, value)
2015 
2016  def get_fLabrec(self):
2017  r"""get_fLabrec(ImageHeader self) -> float"""
2018  return _IMP_em.ImageHeader_get_fLabrec(self)
2019 
2020  def set_fLabrec(self, value):
2021  r"""set_fLabrec(ImageHeader self, float value)"""
2022  return _IMP_em.ImageHeader_set_fLabrec(self, value)
2023 
2024  def get_fIangle(self):
2025  r"""get_fIangle(ImageHeader self) -> float"""
2026  return _IMP_em.ImageHeader_get_fIangle(self)
2027 
2028  def set_fIangle(self, value):
2029  r"""set_fIangle(ImageHeader self, float value)"""
2030  return _IMP_em.ImageHeader_set_fIangle(self, value)
2031 
2032  def get_origin(self):
2033  r"""get_origin(ImageHeader self) -> Vector3D"""
2034  return _IMP_em.ImageHeader_get_origin(self)
2035 
2036  def set_origin(self, *args):
2037  r"""
2038  set_origin(ImageHeader self, Vector3D v)
2039  set_origin(ImageHeader self, Vector2D v)
2040  """
2041  return _IMP_em.ImageHeader_set_origin(self, *args)
2042 
2043  def get_object_pixel_size(self):
2044  r"""get_object_pixel_size(ImageHeader self) -> float"""
2045  return _IMP_em.ImageHeader_get_object_pixel_size(self)
2046 
2047  def set_object_pixel_size(self, value):
2048  r"""set_object_pixel_size(ImageHeader self, float value)"""
2049  return _IMP_em.ImageHeader_set_object_pixel_size(self, value)
2050 
2051  def get_fLabbyt(self):
2052  r"""get_fLabbyt(ImageHeader self) -> float"""
2053  return _IMP_em.ImageHeader_get_fLabbyt(self)
2054 
2055  def set_fLabbyt(self, value):
2056  r"""set_fLabbyt(ImageHeader self, float value)"""
2057  return _IMP_em.ImageHeader_set_fLabbyt(self, value)
2058 
2059  def get_fLenbyt(self):
2060  r"""get_fLenbyt(ImageHeader self) -> float"""
2061  return _IMP_em.ImageHeader_get_fLenbyt(self)
2062 
2063  def set_fLenbyt(self, value):
2064  r"""set_fLenbyt(ImageHeader self, float value)"""
2065  return _IMP_em.ImageHeader_set_fLenbyt(self, value)
2066 
2067  def get_fGeo_matrix(self, i, j):
2068  r"""get_fGeo_matrix(ImageHeader self, unsigned int i, unsigned int j) -> double"""
2069  return _IMP_em.ImageHeader_get_fGeo_matrix(self, i, j)
2070 
2071  def get_fFlag(self):
2072  r"""get_fFlag(ImageHeader self) -> float"""
2073  return _IMP_em.ImageHeader_get_fFlag(self)
2074 
2075  def set_fFlag(self, value):
2076  r"""set_fFlag(ImageHeader self, float value)"""
2077  return _IMP_em.ImageHeader_set_fFlag(self, value)
2078 
2079  def get_euler_angles(self):
2080  r"""get_euler_angles(ImageHeader self) -> Vector3D"""
2081  return _IMP_em.ImageHeader_get_euler_angles(self)
2082 
2083  def get_euler_angles1(self):
2084  r"""get_euler_angles1(ImageHeader self) -> Vector3D"""
2085  return _IMP_em.ImageHeader_get_euler_angles1(self)
2086 
2087  def get_euler_angles2(self):
2088  r"""get_euler_angles2(ImageHeader self) -> Vector3D"""
2089  return _IMP_em.ImageHeader_get_euler_angles2(self)
2090 
2091  def set_euler_angles(self, euler):
2092  r"""set_euler_angles(ImageHeader self, Vector3D euler)"""
2093  return _IMP_em.ImageHeader_set_euler_angles(self, euler)
2094 
2095  def set_euler_angles1(self, euler):
2096  r"""set_euler_angles1(ImageHeader self, Vector3D euler)"""
2097  return _IMP_em.ImageHeader_set_euler_angles1(self, euler)
2098 
2099  def set_euler_angles2(self, euler):
2100  r"""set_euler_angles2(ImageHeader self, Vector3D euler)"""
2101  return _IMP_em.ImageHeader_set_euler_angles2(self, euler)
2102 
2103  def is_normalized(self):
2104  r"""is_normalized(ImageHeader self) -> bool"""
2105  return _IMP_em.ImageHeader_is_normalized(self)
2106 
2107  def set_date(self):
2108  r"""set_date(ImageHeader self)"""
2109  return _IMP_em.ImageHeader_set_date(self)
2110 
2111  def set_time(self):
2112  r"""set_time(ImageHeader self)"""
2113  return _IMP_em.ImageHeader_set_time(self)
2114 
2115  def set_title(self, newName):
2116  r"""set_title(ImageHeader self, IMP::String newName)"""
2117  return _IMP_em.ImageHeader_set_title(self, newName)
2118  __swig_destroy__ = _IMP_em.delete_ImageHeader
2119 
2120 # Register ImageHeader in _IMP_em:
2121 _IMP_em.ImageHeader_swigregister(ImageHeader)
2122 class SpiderMapReaderWriter(MapReaderWriter):
2123  r"""Proxy of C++ IMP::em::SpiderMapReaderWriter class."""
2124 
2125  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2126  filename_ = property(_IMP_em.SpiderMapReaderWriter_filename__get, _IMP_em.SpiderMapReaderWriter_filename__set, doc=r"""filename_ : IMP::String""")
2127  skip_type_check_ = property(_IMP_em.SpiderMapReaderWriter_skip_type_check__get, _IMP_em.SpiderMapReaderWriter_skip_type_check__set, doc=r"""skip_type_check_ : bool""")
2128  force_reversed_ = property(_IMP_em.SpiderMapReaderWriter_force_reversed__get, _IMP_em.SpiderMapReaderWriter_force_reversed__set, doc=r"""force_reversed_ : bool""")
2129  skip_extra_checkings_ = property(_IMP_em.SpiderMapReaderWriter_skip_extra_checkings__get, _IMP_em.SpiderMapReaderWriter_skip_extra_checkings__set, doc=r"""skip_extra_checkings_ : bool""")
2130 
2131  def __init__(self, *args):
2132  r"""
2133  __init__(SpiderMapReaderWriter self) -> SpiderMapReaderWriter
2134  __init__(SpiderMapReaderWriter self, IMP::String filename, bool skip_type_check, bool force_reversed, bool skip_extra_checkings) -> SpiderMapReaderWriter
2135  """
2136  _IMP_em.SpiderMapReaderWriter_swiginit(self, _IMP_em.new_SpiderMapReaderWriter(*args))
2137  __swig_destroy__ = _IMP_em.delete_SpiderMapReaderWriter
2138 
2139  def __str__(self):
2140  r"""__str__(SpiderMapReaderWriter self) -> std::string"""
2141  return _IMP_em.SpiderMapReaderWriter___str__(self)
2142 
2143  def __repr__(self):
2144  r"""__repr__(SpiderMapReaderWriter self) -> std::string"""
2145  return _IMP_em.SpiderMapReaderWriter___repr__(self)
2146 
2147  @staticmethod
2148  def get_from(o):
2149  return _object_cast_to_SpiderMapReaderWriter(o)
2150 
2151 
2152 # Register SpiderMapReaderWriter in _IMP_em:
2153 _IMP_em.SpiderMapReaderWriter_swigregister(SpiderMapReaderWriter)
2154 class FittingSolutions(object):
2155  r"""Proxy of C++ IMP::em::FittingSolutions class."""
2156 
2157  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2158 
2159  def __init__(self):
2160  r"""__init__(FittingSolutions self) -> FittingSolutions"""
2161  _IMP_em.FittingSolutions_swiginit(self, _IMP_em.new_FittingSolutions())
2162 
2163  def get_number_of_solutions(self):
2164  r"""get_number_of_solutions(FittingSolutions self) -> int"""
2165  return _IMP_em.FittingSolutions_get_number_of_solutions(self)
2166 
2167  def get_transformation(self, i):
2168  r"""get_transformation(FittingSolutions self, unsigned int i) -> Transformation3D"""
2169  return _IMP_em.FittingSolutions_get_transformation(self, i)
2170 
2171  def get_score(self, i):
2172  r"""get_score(FittingSolutions self, unsigned int i) -> IMP::Float"""
2173  return _IMP_em.FittingSolutions_get_score(self, i)
2174 
2175  def set_score(self, i, score):
2176  r"""set_score(FittingSolutions self, unsigned int i, IMP::Float score)"""
2177  return _IMP_em.FittingSolutions_set_score(self, i, score)
2178 
2179  def add_solution(self, t, score):
2180  r"""add_solution(FittingSolutions self, Transformation3D t, IMP::Float score)"""
2181  return _IMP_em.FittingSolutions_add_solution(self, t, score)
2182 
2183  def sort(self, reverse=False):
2184  r"""sort(FittingSolutions self, bool reverse=False)"""
2185  return _IMP_em.FittingSolutions_sort(self, reverse)
2186 
2187  def multiply(self, t):
2188  r"""multiply(FittingSolutions self, Transformation3D t)"""
2189  return _IMP_em.FittingSolutions_multiply(self, t)
2190 
2191  def get_transformations(self):
2192  r"""get_transformations(FittingSolutions self) -> IMP::algebra::Transformation3Ds"""
2193  return _IMP_em.FittingSolutions_get_transformations(self)
2194 
2195  def show(self, *args):
2196  r"""show(FittingSolutions self, _ostream out=std::cout)"""
2197  return _IMP_em.FittingSolutions_show(self, *args)
2198 
2199  def __str__(self):
2200  r"""__str__(FittingSolutions self) -> std::string"""
2201  return _IMP_em.FittingSolutions___str__(self)
2202 
2203  def __repr__(self):
2204  r"""__repr__(FittingSolutions self) -> std::string"""
2205  return _IMP_em.FittingSolutions___repr__(self)
2206 
2207  def _get_as_binary(self):
2208  r"""_get_as_binary(FittingSolutions self) -> PyObject *"""
2209  return _IMP_em.FittingSolutions__get_as_binary(self)
2210 
2211  def _set_from_binary(self, p):
2212  r"""_set_from_binary(FittingSolutions self, PyObject * p)"""
2213  return _IMP_em.FittingSolutions__set_from_binary(self, p)
2214 
2215  def __getstate__(self):
2216  p = self._get_as_binary()
2217  if len(self.__dict__) > 1:
2218  d = self.__dict__.copy()
2219  del d['this']
2220  p = (d, p)
2221  return p
2222 
2223  def __setstate__(self, p):
2224  if not hasattr(self, 'this'):
2225  self.__init__()
2226  if isinstance(p, tuple):
2227  d, p = p
2228  self.__dict__.update(d)
2229  return self._set_from_binary(p)
2230 
2231  __swig_destroy__ = _IMP_em.delete_FittingSolutions
2232 
2233 # Register FittingSolutions in _IMP_em:
2234 _IMP_em.FittingSolutions_swigregister(FittingSolutions)
2235 
2236 def local_rigid_fitting_around_point(p, refiner, weight_key, dmap, anchor_centroid, display_log, number_of_optimization_runs=5, number_of_mc_steps=10, number_of_cg_steps=100, max_translation=2., max_rotation=.3, fast=False):
2237  r"""local_rigid_fitting_around_point(Particle p, Refiner refiner, FloatKey weight_key, DensityMap dmap, Vector3D anchor_centroid, IMP::OptimizerStates display_log, IMP::Int number_of_optimization_runs=5, IMP::Int number_of_mc_steps=10, IMP::Int number_of_cg_steps=100, IMP::Float max_translation=2., IMP::Float max_rotation=.3, bool fast=False) -> FittingSolutions"""
2238  return _IMP_em.local_rigid_fitting_around_point(p, refiner, weight_key, dmap, anchor_centroid, display_log, number_of_optimization_runs, number_of_mc_steps, number_of_cg_steps, max_translation, max_rotation, fast)
2239 
2240 def local_rigid_fitting(p, refiner, weight_key, dmap, display_log, number_of_optimization_runs=5, number_of_mc_steps=10, number_of_cg_steps=100, max_translation=2., max_rotation=.3, fast=True):
2241  r"""local_rigid_fitting(Particle p, Refiner refiner, FloatKey weight_key, DensityMap dmap, IMP::OptimizerStates display_log, IMP::Int number_of_optimization_runs=5, IMP::Int number_of_mc_steps=10, IMP::Int number_of_cg_steps=100, IMP::Float max_translation=2., IMP::Float max_rotation=.3, bool fast=True) -> FittingSolutions"""
2242  return _IMP_em.local_rigid_fitting(p, refiner, weight_key, dmap, display_log, number_of_optimization_runs, number_of_mc_steps, number_of_cg_steps, max_translation, max_rotation, fast)
2243 
2244 def local_rigid_fitting_around_points(p, refiner, wei_key, dmap, anchor_centroids, display_log, number_of_optimization_runs=5, number_of_mc_steps=10, number_of_cg_steps=100, max_translation=2., max_rotation=.3):
2245  r"""local_rigid_fitting_around_points(Particle p, Refiner refiner, FloatKey wei_key, DensityMap dmap, IMP::algebra::Vector3Ds const & anchor_centroids, IMP::OptimizerStates display_log, IMP::Int number_of_optimization_runs=5, IMP::Int number_of_mc_steps=10, IMP::Int number_of_cg_steps=100, IMP::Float max_translation=2., IMP::Float max_rotation=.3) -> FittingSolutions"""
2246  return _IMP_em.local_rigid_fitting_around_points(p, refiner, wei_key, dmap, anchor_centroids, display_log, number_of_optimization_runs, number_of_mc_steps, number_of_cg_steps, max_translation, max_rotation)
2247 
2248 def local_rigid_fitting_grid_search(ps, wei_key, dmap, max_voxels_translation=2, translation_step=1, max_angle_in_radians=0.174, number_of_rotations=100):
2249  r"""local_rigid_fitting_grid_search(IMP::ParticlesTemp const & ps, FloatKey wei_key, DensityMap dmap, IMP::Int max_voxels_translation=2, IMP::Int translation_step=1, IMP::Float max_angle_in_radians=0.174, IMP::Int number_of_rotations=100) -> FittingSolutions"""
2250  return _IMP_em.local_rigid_fitting_grid_search(ps, wei_key, dmap, max_voxels_translation, translation_step, max_angle_in_radians, number_of_rotations)
2251 
2252 def compute_fitting_scores(*args):
2253  r"""
2254  compute_fitting_scores(IMP::ParticlesTemp const & ps, DensityMap em_map, IMP::algebra::Transformation3Ds const & transformations, bool fast_version=False, bool local_score=False, FloatKey wei_key=IMP::atom::Mass::get_mass_key()) -> FittingSolutions
2255  compute_fitting_scores(DensityMap em_map, RigidBody rb, Refiner refiner, IMP::algebra::Transformation3Ds const & transformations) -> FittingSolutions
2256  """
2257  return _IMP_em.compute_fitting_scores(*args)
2258 
2259 def compute_fitting_score(*args):
2260  r"""compute_fitting_score(IMP::ParticlesTemp const & ps, DensityMap em_map, FloatKey wei_key=IMP::atom::Mass::get_mass_key()) -> IMP::Float"""
2261  return _IMP_em.compute_fitting_score(*args)
2262 
2264  r"""get_number_of_particles_outside_of_the_density(DensityMap dmap, IMP::Particles const & ps, Transformation3D t=IMP::algebra::get_identity_transformation_3d(), float thr=0.0) -> long"""
2265  return _IMP_em.get_number_of_particles_outside_of_the_density(*args)
2266 
2267 def get_numbers_of_particles_outside_of_the_density(dmap, ps, transformations, thr=0.0):
2268  r"""get_numbers_of_particles_outside_of_the_density(DensityMap dmap, IMP::Particles const & ps, IMP::algebra::Transformation3Ds const & transformations, float thr=0.0) -> IMP::Ints"""
2269  return _IMP_em.get_numbers_of_particles_outside_of_the_density(dmap, ps, transformations, thr)
2270 
2272  r"""get_percentage_of_voxels_covered_by_particles(DensityMap dmap, IMP::Particles const & ps, float smoothing_radius=3., Transformation3D t=IMP::algebra::get_identity_transformation_3d(), float thr=0.0) -> double"""
2273  return _IMP_em.get_percentage_of_voxels_covered_by_particles(*args)
2274 class HighDensityEmbedding(IMP.statistics.Embedding):
2275  r"""Proxy of C++ IMP::em::HighDensityEmbedding class."""
2276 
2277  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2278 
2279  def __init__(self, dm, threshold):
2280  r"""__init__(HighDensityEmbedding self, DensityMap dm, double threshold) -> HighDensityEmbedding"""
2281  _IMP_em.HighDensityEmbedding_swiginit(self, _IMP_em.new_HighDensityEmbedding(dm, threshold))
2282 
2283  def get_version_info(self):
2284  r"""get_version_info(HighDensityEmbedding self) -> VersionInfo"""
2285  return _IMP_em.HighDensityEmbedding_get_version_info(self)
2286  __swig_destroy__ = _IMP_em.delete_HighDensityEmbedding
2287 
2288  def __str__(self):
2289  r"""__str__(HighDensityEmbedding self) -> std::string"""
2290  return _IMP_em.HighDensityEmbedding___str__(self)
2291 
2292  def __repr__(self):
2293  r"""__repr__(HighDensityEmbedding self) -> std::string"""
2294  return _IMP_em.HighDensityEmbedding___repr__(self)
2295 
2296  @staticmethod
2297  def get_from(o):
2298  return _object_cast_to_HighDensityEmbedding(o)
2299 
2300 
2301 # Register HighDensityEmbedding in _IMP_em:
2302 _IMP_em.HighDensityEmbedding_swigregister(HighDensityEmbedding)
2303 
2304 def mask_and_norm(dmap, mask):
2305  r"""mask_and_norm(DensityMap dmap, DensityMap mask) -> DensityMap"""
2306  return _IMP_em.mask_and_norm(dmap, mask)
2307 
2308 def get_volume_at_threshold(m, threshold):
2309  r"""get_volume_at_threshold(DensityMap m, IMP::Float threshold) -> IMP::Float"""
2310  return _IMP_em.get_volume_at_threshold(m, threshold)
2311 
2313  r"""get_molecular_mass_at_threshold(DensityMap m, IMP::Float threshold, IMP::atom::ProteinDensityReference ref=HARPAZ) -> IMP::Float"""
2314  return _IMP_em.get_molecular_mass_at_threshold(*args)
2315 
2316 def get_threshold_for_approximate_volume(m, desired_volume):
2317  r"""get_threshold_for_approximate_volume(DensityMap m, IMP::Float desired_volume) -> IMP::Float"""
2318  return _IMP_em.get_threshold_for_approximate_volume(m, desired_volume)
2319 
2321  r"""get_threshold_for_approximate_mass(DensityMap m, IMP::Float desired_mass, IMP::atom::ProteinDensityReference ref=HARPAZ) -> IMP::Float"""
2322  return _IMP_em.get_threshold_for_approximate_mass(*args)
2323 class EnvelopePenetrationRestraint(IMP.Restraint):
2324  r"""Proxy of C++ IMP::em::EnvelopePenetrationRestraint class."""
2325 
2326  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2327 
2328  def __init__(self, ps, em_map, threshold):
2329  r"""__init__(EnvelopePenetrationRestraint self, IMP::Particles ps, DensityMap em_map, IMP::Float threshold) -> EnvelopePenetrationRestraint"""
2330  _IMP_em.EnvelopePenetrationRestraint_swiginit(self, _IMP_em.new_EnvelopePenetrationRestraint(ps, em_map, threshold))
2331 
2332  def do_get_inputs(self):
2333  r"""do_get_inputs(EnvelopePenetrationRestraint self) -> IMP::ModelObjectsTemp"""
2334  return _IMP_em.EnvelopePenetrationRestraint_do_get_inputs(self)
2335 
2336  def get_version_info(self):
2337  r"""get_version_info(EnvelopePenetrationRestraint self) -> VersionInfo"""
2338  return _IMP_em.EnvelopePenetrationRestraint_get_version_info(self)
2339  __swig_destroy__ = _IMP_em.delete_EnvelopePenetrationRestraint
2340 
2341  def __str__(self):
2342  r"""__str__(EnvelopePenetrationRestraint self) -> std::string"""
2343  return _IMP_em.EnvelopePenetrationRestraint___str__(self)
2344 
2345  def __repr__(self):
2346  r"""__repr__(EnvelopePenetrationRestraint self) -> std::string"""
2347  return _IMP_em.EnvelopePenetrationRestraint___repr__(self)
2348 
2349  @staticmethod
2350  def get_from(o):
2351  return _object_cast_to_EnvelopePenetrationRestraint(o)
2352 
2353 
2354 # Register EnvelopePenetrationRestraint in _IMP_em:
2355 _IMP_em.EnvelopePenetrationRestraint_swigregister(EnvelopePenetrationRestraint)
2356 class PCAFitRestraint(IMP.Restraint):
2357  r"""Proxy of C++ IMP::em::PCAFitRestraint class."""
2358 
2359  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2360 
2361  def __init__(self, *args):
2362  r"""__init__(PCAFitRestraint self, IMP::ParticlesTemp ps, DensityMap em_map, float threshold, float max_pca_size_diff, float max_angle_diff, float max_centroid_diff, FloatKey weight_key=IMP::atom::Mass::get_mass_key()) -> PCAFitRestraint"""
2363  _IMP_em.PCAFitRestraint_swiginit(self, _IMP_em.new_PCAFitRestraint(*args))
2364 
2365  def do_get_inputs(self):
2366  r"""do_get_inputs(PCAFitRestraint self) -> IMP::ModelObjectsTemp"""
2367  return _IMP_em.PCAFitRestraint_do_get_inputs(self)
2368 
2369  def get_version_info(self):
2370  r"""get_version_info(PCAFitRestraint self) -> VersionInfo"""
2371  return _IMP_em.PCAFitRestraint_get_version_info(self)
2372  __swig_destroy__ = _IMP_em.delete_PCAFitRestraint
2373 
2374  def __str__(self):
2375  r"""__str__(PCAFitRestraint self) -> std::string"""
2376  return _IMP_em.PCAFitRestraint___str__(self)
2377 
2378  def __repr__(self):
2379  r"""__repr__(PCAFitRestraint self) -> std::string"""
2380  return _IMP_em.PCAFitRestraint___repr__(self)
2381 
2382  @staticmethod
2383  def get_from(o):
2384  return _object_cast_to_PCAFitRestraint(o)
2385 
2386 
2387 # Register PCAFitRestraint in _IMP_em:
2388 _IMP_em.PCAFitRestraint_swigregister(PCAFitRestraint)
2389 class EnvelopeFitRestraint(IMP.Restraint):
2390  r"""Proxy of C++ IMP::em::EnvelopeFitRestraint class."""
2391 
2392  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2393 
2394  def __init__(self, particles, em_map, density_threshold, penetration_threshold):
2395  r"""__init__(EnvelopeFitRestraint self, IMP::Particles particles, DensityMap em_map, double density_threshold, double penetration_threshold) -> EnvelopeFitRestraint"""
2396  _IMP_em.EnvelopeFitRestraint_swiginit(self, _IMP_em.new_EnvelopeFitRestraint(particles, em_map, density_threshold, penetration_threshold))
2397 
2398  def get_transformation(self):
2399  r"""get_transformation(EnvelopeFitRestraint self) -> Transformation3D"""
2400  return _IMP_em.EnvelopeFitRestraint_get_transformation(self)
2401 
2402  def apply_transformation(self):
2403  r"""apply_transformation(EnvelopeFitRestraint self)"""
2404  return _IMP_em.EnvelopeFitRestraint_apply_transformation(self)
2405 
2406  def do_get_inputs(self):
2407  r"""do_get_inputs(EnvelopeFitRestraint self) -> IMP::ModelObjectsTemp"""
2408  return _IMP_em.EnvelopeFitRestraint_do_get_inputs(self)
2409 
2410  def get_version_info(self):
2411  r"""get_version_info(EnvelopeFitRestraint self) -> VersionInfo"""
2412  return _IMP_em.EnvelopeFitRestraint_get_version_info(self)
2413  __swig_destroy__ = _IMP_em.delete_EnvelopeFitRestraint
2414 
2415  def __str__(self):
2416  r"""__str__(EnvelopeFitRestraint self) -> std::string"""
2417  return _IMP_em.EnvelopeFitRestraint___str__(self)
2418 
2419  def __repr__(self):
2420  r"""__repr__(EnvelopeFitRestraint self) -> std::string"""
2421  return _IMP_em.EnvelopeFitRestraint___repr__(self)
2422 
2423  @staticmethod
2424  def get_from(o):
2425  return _object_cast_to_EnvelopeFitRestraint(o)
2426 
2427 
2428 # Register EnvelopeFitRestraint in _IMP_em:
2429 _IMP_em.EnvelopeFitRestraint_swigregister(EnvelopeFitRestraint)
2430 class MapDistanceTransform(DensityMap):
2431  r"""Proxy of C++ IMP::em::MapDistanceTransform class."""
2432 
2433  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2434 
2435  def __init__(self, map, density_threshold, max_distance):
2436  r"""__init__(MapDistanceTransform self, DensityMap map, float density_threshold, float max_distance) -> MapDistanceTransform"""
2437  _IMP_em.MapDistanceTransform_swiginit(self, _IMP_em.new_MapDistanceTransform(map, density_threshold, max_distance))
2438 
2439  def get_distance_from_envelope(self, v):
2440  r"""get_distance_from_envelope(MapDistanceTransform self, Vector3D v) -> float"""
2441  return _IMP_em.MapDistanceTransform_get_distance_from_envelope(self, v)
2442 
2443  def __str__(self):
2444  r"""__str__(MapDistanceTransform self) -> std::string"""
2445  return _IMP_em.MapDistanceTransform___str__(self)
2446 
2447  def __repr__(self):
2448  r"""__repr__(MapDistanceTransform self) -> std::string"""
2449  return _IMP_em.MapDistanceTransform___repr__(self)
2450 
2451  @staticmethod
2452  def get_from(o):
2453  return _object_cast_to_MapDistanceTransform(o)
2454 
2455  __swig_destroy__ = _IMP_em.delete_MapDistanceTransform
2456 
2457 # Register MapDistanceTransform in _IMP_em:
2458 _IMP_em.MapDistanceTransform_swigregister(MapDistanceTransform)
2459 class EnvelopeScore(IMP.Object):
2460  r"""Proxy of C++ IMP::em::EnvelopeScore class."""
2461 
2462  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
2463 
2464  def __init__(self, mdt):
2465  r"""__init__(EnvelopeScore self, MapDistanceTransform mdt) -> EnvelopeScore"""
2466  _IMP_em.EnvelopeScore_swiginit(self, _IMP_em.new_EnvelopeScore(mdt))
2467 
2468  def is_penetrating(self, *args):
2469  r"""
2470  is_penetrating(EnvelopeScore self, IMP::algebra::Vector3Ds const & points, float penetration_thr) -> bool
2471  is_penetrating(EnvelopeScore self, IMP::algebra::Vector3Ds const & points, Transformation3D trans, float penetration_thr) -> bool
2472  """
2473  return _IMP_em.EnvelopeScore_is_penetrating(self, *args)
2474 
2475  def score(self, *args):
2476  r"""
2477  score(EnvelopeScore self, IMP::algebra::Vector3Ds const & points) -> double
2478  score(EnvelopeScore self, IMP::algebra::Vector3Ds const & points, Transformation3D trans) -> double
2479  """
2480  return _IMP_em.EnvelopeScore_score(self, *args)
2481  __swig_destroy__ = _IMP_em.delete_EnvelopeScore
2482 
2483  def __str__(self):
2484  r"""__str__(EnvelopeScore self) -> std::string"""
2485  return _IMP_em.EnvelopeScore___str__(self)
2486 
2487  def __repr__(self):
2488  r"""__repr__(EnvelopeScore self) -> std::string"""
2489  return _IMP_em.EnvelopeScore___repr__(self)
2490 
2491  @staticmethod
2492  def get_from(o):
2493  return _object_cast_to_EnvelopeScore(o)
2494 
2495 
2496 # Register EnvelopeScore in _IMP_em:
2497 _IMP_em.EnvelopeScore_swigregister(EnvelopeScore)
2498 
2499 import math
2500 
2501 def write_pca_cmm(pca, fh):
2502  """Write out principal components to a file in Chimera Marker format"""
2503  eigen_values = pca.get_principal_values()
2504  eigen_vecs = pca.get_principal_components()
2505  centroid = pca.get_centroid()
2506 
2507  fh.write("<marker_set>\n")
2508  fh.write("<!-- PCA with eigen values: (%g,%g,%g) and "
2509  "centroid (%g,%g,%g) -->\n"
2510  % (math.sqrt(eigen_values[0]),
2511  math.sqrt(eigen_values[1]),
2512  math.sqrt(eigen_values[2]),
2513  centroid[0], centroid[1], centroid[2]))
2514 
2515  radius = 2.
2516 
2517  for i in range(3):
2518  val = math.sqrt(eigen_values[i])
2519  v1 = centroid - val * eigen_vecs[i]
2520  v2 = centroid + val * eigen_vecs[i]
2521  for markerid, v in ((i*2+1, v1), (i*2+2, v2)):
2522  fh.write("<marker id=\"%d\" x=\"%g\" y=\"%g\" z=\"%g\" "
2523  "radius=\"%g\"/>\n"
2524  % (markerid, v[0], v[1], v[2], radius))
2525 
2526  for i in range(1, 7, 2):
2527  fh.write("<link id1= \"%d\" id2=\"%d\" radius=\"%g\"/>\n"
2528  % (i, i+1, radius))
2529  fh.write("</marker_set>\n")
2530 
2531 
2532 def get_module_version():
2533  r"""get_module_version() -> std::string const"""
2534  return _IMP_em.get_module_version()
2535 
2536 def get_example_path(fname):
2537  r"""get_example_path(std::string fname) -> std::string"""
2538  return _IMP_em.get_example_path(fname)
2539 
2540 def get_data_path(fname):
2541  r"""get_data_path(std::string fname) -> std::string"""
2542  return _IMP_em.get_data_path(fname)
2543 
2544 from . import _version_check
2545 _version_check.check_version(get_module_version())
2546 __version__ = get_module_version()
2547 
2548 
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())
Definition: converters.h:76
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.
Definition: Object.h:111
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.
Definition: Vector3D.h:68
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.
Definition: Restraint.h:56
FloatPair bayesem3d_get_logabssumprodexp(double x, double y, double wx, double wy)
Numerically stable logabssumprodexp.