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