11 from __future__
import print_function, division, absolute_import
15 from sys
import version_info
as _swig_python_version_info
16 import _IMP_score_functor
19 import builtins
as __builtin__
25 strthis =
"proxy of " + self.this.__repr__()
26 except __builtin__.Exception:
28 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
31 def _swig_setattr_nondynamic_instance_variable(set):
32 def set_instance_attr(self, name, value):
34 set(self, name, value)
35 elif name ==
"thisown":
37 elif hasattr(self, name)
and isinstance(getattr(type(self), name), property):
38 set(self, name, value)
40 raise AttributeError(
"You cannot add instance attributes to %s" % self)
41 return set_instance_attr
44 def _swig_setattr_nondynamic_class_variable(set):
45 def set_class_attr(cls, name, value):
46 if hasattr(cls, name)
and not isinstance(getattr(cls, name), property):
49 raise AttributeError(
"You cannot add class attributes to %s" % cls)
53 def _swig_add_metaclass(metaclass):
54 """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
56 return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
60 class _SwigNonDynamicMeta(type):
61 """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
62 __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
67 class IMP_SCORE_FUNCTOR_SwigPyIterator(object):
68 r"""Proxy of C++ swig::IMP_SCORE_FUNCTOR_SwigPyIterator class."""
70 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
72 def __init__(self, *args, **kwargs):
73 raise AttributeError(
"No constructor defined - class is abstract")
75 __swig_destroy__ = _IMP_score_functor.delete_IMP_SCORE_FUNCTOR_SwigPyIterator
78 r"""value(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> PyObject *"""
79 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_value(self)
82 r"""incr(IMP_SCORE_FUNCTOR_SwigPyIterator self, size_t n=1) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
83 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_incr(self, n)
86 r"""decr(IMP_SCORE_FUNCTOR_SwigPyIterator self, size_t n=1) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
87 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_decr(self, n)
89 def distance(self, x):
90 r"""distance(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> ptrdiff_t"""
91 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_distance(self, x)
94 r"""equal(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> bool"""
95 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_equal(self, x)
98 r"""copy(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
99 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_copy(self)
102 r"""next(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> PyObject *"""
103 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_next(self)
106 r"""__next__(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> PyObject *"""
107 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___next__(self)
110 r"""previous(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> PyObject *"""
111 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_previous(self)
113 def advance(self, n):
114 r"""advance(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
115 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_advance(self, n)
118 r"""__eq__(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> bool"""
119 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___eq__(self, x)
122 r"""__ne__(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> bool"""
123 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___ne__(self, x)
125 def __iadd__(self, n):
126 r"""__iadd__(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
127 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___iadd__(self, n)
129 def __isub__(self, n):
130 r"""__isub__(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
131 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___isub__(self, n)
133 def __add__(self, n):
134 r"""__add__(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
135 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___add__(self, n)
137 def __sub__(self, *args):
139 __sub__(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator
140 __sub__(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> ptrdiff_t
142 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___sub__(self, *args)
147 _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_swigregister(IMP_SCORE_FUNCTOR_SwigPyIterator)
154 IMP_DEBUG = _IMP_score_functor.IMP_DEBUG
156 IMP_RELEASE = _IMP_score_functor.IMP_RELEASE
158 IMP_SILENT = _IMP_score_functor.IMP_SILENT
160 IMP_PROGRESS = _IMP_score_functor.IMP_PROGRESS
162 IMP_TERSE = _IMP_score_functor.IMP_TERSE
164 IMP_VERBOSE = _IMP_score_functor.IMP_VERBOSE
166 IMP_MEMORY = _IMP_score_functor.IMP_MEMORY
168 IMP_NONE = _IMP_score_functor.IMP_NONE
170 IMP_USAGE = _IMP_score_functor.IMP_USAGE
172 IMP_INTERNAL = _IMP_score_functor.IMP_INTERNAL
174 IMP_KERNEL_HAS_LOG4CXX = _IMP_score_functor.IMP_KERNEL_HAS_LOG4CXX
176 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_score_functor.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
178 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_score_functor.IMP_COMPILER_HAS_DEBUG_VECTOR
180 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_score_functor.IMP_COMPILER_HAS_RANDOM_SHUFFLE
182 IMP_COMPILER_HAS_THREE_WAY = _IMP_score_functor.IMP_COMPILER_HAS_THREE_WAY
184 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_score_functor.IMP_KERNEL_HAS_BOOST_RANDOM
186 IMP_KERNEL_HAS_NUMPY = _IMP_score_functor.IMP_KERNEL_HAS_NUMPY
188 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_score_functor.IMP_KERNEL_HAS_GPERFTOOLS
190 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_score_functor.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
192 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_score_functor.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
194 IMPKERNEL_SHOW_WARNINGS = _IMP_score_functor.IMPKERNEL_SHOW_WARNINGS
198 class _DirectorObjects(object):
199 """@internal Simple class to keep references to director objects
200 to prevent premature deletion."""
203 def register(self, obj):
204 """Take a reference to a director object; will only work for
205 refcounted C++ classes"""
206 if hasattr(obj,
'get_ref_count'):
207 self._objects.append(obj)
209 """Only drop our reference and allow cleanup by Python if no other
210 Python references exist (we hold 3 references: one in self._objects,
211 one in x, and one in the argument list for getrefcount) *and* no
212 other C++ references exist (the Python object always holds one)"""
213 objs = [x
for x
in self._objects
if sys.getrefcount(x) > 3 \
214 or x.get_ref_count() > 1]
218 def get_object_count(self):
219 """Get number of director objects (useful for testing only)"""
220 return len(self._objects)
221 _director_objects = _DirectorObjects()
223 class _ostream(object):
224 r"""Proxy of C++ std::ostream class."""
226 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
228 def __init__(self, *args, **kwargs):
229 raise AttributeError(
"No constructor defined")
230 __repr__ = _swig_repr
232 def write(self, osa_buf):
233 r"""write(_ostream self, char const * osa_buf)"""
234 return _IMP_score_functor._ostream_write(self, osa_buf)
237 _IMP_score_functor._ostream_swigregister(_ostream)
238 IMP_C_OPEN_BINARY = _IMP_score_functor.IMP_C_OPEN_BINARY
241 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_score_functor.IMP_CGAL_HAS_BOOST_FILESYSTEM
243 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_score_functor.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
245 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_score_functor.IMP_CGAL_HAS_BOOST_RANDOM
247 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_score_functor.IMP_CGAL_HAS_BOOST_SYSTEM
249 IMP_CGAL_HAS_NUMPY = _IMP_score_functor.IMP_CGAL_HAS_NUMPY
251 IMPCGAL_SHOW_WARNINGS = _IMP_score_functor.IMPCGAL_SHOW_WARNINGS
254 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_score_functor.IMP_ALGEBRA_HAS_IMP_CGAL
256 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_score_functor.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
258 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_score_functor.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
260 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_score_functor.IMP_ALGEBRA_HAS_BOOST_RANDOM
262 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_score_functor.IMP_ALGEBRA_HAS_BOOST_SYSTEM
264 IMP_ALGEBRA_HAS_CGAL = _IMP_score_functor.IMP_ALGEBRA_HAS_CGAL
266 IMP_ALGEBRA_HAS_NUMPY = _IMP_score_functor.IMP_ALGEBRA_HAS_NUMPY
268 IMP_ALGEBRA_HAS_ANN = _IMP_score_functor.IMP_ALGEBRA_HAS_ANN
270 IMPALGEBRA_SHOW_WARNINGS = _IMP_score_functor.IMPALGEBRA_SHOW_WARNINGS
273 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
275 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
277 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
279 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
281 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
283 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_CGAL
285 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_HDF5
287 IMP_SCORE_FUNCTOR_HAS_NUMPY = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_NUMPY
289 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_score_functor.IMPSCOREFUNCTOR_SHOW_WARNINGS
292 r"""Proxy of C++ IMP::score_functor::Score class."""
294 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
295 __repr__ = _swig_repr
298 r"""__init__(Score self) -> Score"""
299 _IMP_score_functor.Score_swiginit(self, _IMP_score_functor.new_Score())
301 def get_inputs(self, m, pis):
302 r"""get_inputs(Score self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
303 return _IMP_score_functor.Score_get_inputs(self, m, pis)
305 def show(self, arg2):
306 r"""show(Score self, _ostream arg2)"""
307 return _IMP_score_functor.Score_show(self, arg2)
308 __swig_destroy__ = _IMP_score_functor.delete_Score
311 _IMP_score_functor.Score_swigregister(Score)
312 class ScoreWithCache(object):
313 r"""Proxy of C++ IMP::score_functor::ScoreWithCache class."""
315 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
316 __repr__ = _swig_repr
319 r"""__init__(ScoreWithCache self) -> ScoreWithCache"""
320 _IMP_score_functor.ScoreWithCache_swiginit(self, _IMP_score_functor.new_ScoreWithCache())
322 def get_inputs(self, m, pis):
323 r"""get_inputs(ScoreWithCache self, Model m, IMP::ParticleIndexes const & pis) -> IMP::ModelObjectsTemp"""
324 return _IMP_score_functor.ScoreWithCache_get_inputs(self, m, pis)
326 def show(self, arg2):
327 r"""show(ScoreWithCache self, _ostream arg2)"""
328 return _IMP_score_functor.ScoreWithCache_show(self, arg2)
329 __swig_destroy__ = _IMP_score_functor.delete_ScoreWithCache
332 _IMP_score_functor.ScoreWithCache_swigregister(ScoreWithCache)
333 class _DopeBase(Score):
334 r"""Proxy of C++ IMP::score_functor::Statistical< IMP::score_functor::DopeType,false,true > class."""
336 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
337 __repr__ = _swig_repr
339 def __init__(self, *args):
341 __init__(_DopeBase self, IntKey k, double threshold, TextInput data_file) -> _DopeBase
342 __init__(_DopeBase self, IntKey k, double threshold, TextInput data_file, unsigned int shift) -> _DopeBase
343 __init__(_DopeBase self) -> _DopeBase
345 _IMP_score_functor._DopeBase_swiginit(self, _IMP_score_functor.new__DopeBase(*args))
347 def get_score(self, m, pp, distance):
348 r"""get_score(_DopeBase self, Model m, IMP::ParticleIndexPair const & pp, double distance) -> double"""
349 return _IMP_score_functor._DopeBase_get_score(self, m, pp, distance)
351 def get_score_and_derivative(self, m, pp, distance):
352 r"""get_score_and_derivative(_DopeBase self, Model m, IMP::Array< 2,IMP::ParticleIndex > const & pp, double distance) -> IMP::DerivativePair"""
353 return _IMP_score_functor._DopeBase_get_score_and_derivative(self, m, pp, distance)
355 def get_maximum_range(self, arg2, arg3):
356 r"""get_maximum_range(_DopeBase self, Model arg2, IMP::ParticleIndexPair const & arg3) -> double"""
357 return _IMP_score_functor._DopeBase_get_maximum_range(self, arg2, arg3)
359 def get_is_trivially_zero(self, m, p, squared_distance):
360 r"""get_is_trivially_zero(_DopeBase self, Model m, IMP::ParticleIndexPair const & p, double squared_distance) -> bool"""
361 return _IMP_score_functor._DopeBase_get_is_trivially_zero(self, m, p, squared_distance)
362 __swig_destroy__ = _IMP_score_functor.delete__DopeBase
365 _IMP_score_functor._DopeBase_swigregister(_DopeBase)
366 class _LoopStatisticalBase(Score):
367 r"""Proxy of C++ IMP::score_functor::Statistical< IMP::score_functor::LoopStatisticalType,false,true > class."""
369 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
370 __repr__ = _swig_repr
372 def __init__(self, *args):
374 __init__(_LoopStatisticalBase self, IntKey k, double threshold, TextInput data_file) -> _LoopStatisticalBase
375 __init__(_LoopStatisticalBase self, IntKey k, double threshold, TextInput data_file, unsigned int shift) -> _LoopStatisticalBase
376 __init__(_LoopStatisticalBase self) -> _LoopStatisticalBase
378 _IMP_score_functor._LoopStatisticalBase_swiginit(self, _IMP_score_functor.new__LoopStatisticalBase(*args))
380 def get_score(self, m, pp, distance):
381 r"""get_score(_LoopStatisticalBase self, Model m, IMP::ParticleIndexPair const & pp, double distance) -> double"""
382 return _IMP_score_functor._LoopStatisticalBase_get_score(self, m, pp, distance)
384 def get_score_and_derivative(self, m, pp, distance):
385 r"""get_score_and_derivative(_LoopStatisticalBase self, Model m, IMP::Array< 2,IMP::ParticleIndex > const & pp, double distance) -> IMP::DerivativePair"""
386 return _IMP_score_functor._LoopStatisticalBase_get_score_and_derivative(self, m, pp, distance)
388 def get_maximum_range(self, arg2, arg3):
389 r"""get_maximum_range(_LoopStatisticalBase self, Model arg2, IMP::ParticleIndexPair const & arg3) -> double"""
390 return _IMP_score_functor._LoopStatisticalBase_get_maximum_range(self, arg2, arg3)
392 def get_is_trivially_zero(self, m, p, squared_distance):
393 r"""get_is_trivially_zero(_LoopStatisticalBase self, Model m, IMP::ParticleIndexPair const & p, double squared_distance) -> bool"""
394 return _IMP_score_functor._LoopStatisticalBase_get_is_trivially_zero(self, m, p, squared_distance)
395 __swig_destroy__ = _IMP_score_functor.delete__LoopStatisticalBase
398 _IMP_score_functor._LoopStatisticalBase_swigregister(_LoopStatisticalBase)
399 class Dope(_DopeBase):
400 r"""Proxy of C++ IMP::score_functor::Dope class."""
402 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
403 __repr__ = _swig_repr
405 def __init__(self, *args):
407 __init__(Dope self, double threshold=std::numeric_limits< double >::max()) -> Dope
408 __init__(Dope self, double threshold, TextInput data_file) -> Dope
410 _IMP_score_functor.Dope_swiginit(self, _IMP_score_functor.new_Dope(*args))
413 def get_dope_type_key():
414 r"""get_dope_type_key() -> IntKey"""
415 return _IMP_score_functor.Dope_get_dope_type_key()
416 __swig_destroy__ = _IMP_score_functor.delete_Dope
419 _IMP_score_functor.Dope_swigregister(Dope)
420 class LoopStatistical(_LoopStatisticalBase):
421 r"""Proxy of C++ IMP::score_functor::LoopStatistical class."""
423 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
424 __repr__ = _swig_repr
426 def __init__(self, *args):
428 __init__(LoopStatistical self, double threshold=std::numeric_limits< double >::max()) -> LoopStatistical
429 __init__(LoopStatistical self, double threshold, TextInput data_file) -> LoopStatistical
431 _IMP_score_functor.LoopStatistical_swiginit(self, _IMP_score_functor.new_LoopStatistical(*args))
434 def get_loop_type_key():
435 r"""get_loop_type_key() -> IntKey"""
436 return _IMP_score_functor.LoopStatistical_get_loop_type_key()
437 __swig_destroy__ = _IMP_score_functor.delete_LoopStatistical
440 _IMP_score_functor.LoopStatistical_swigregister(LoopStatistical)
441 class UnaryFunctionEvaluate(Score):
442 r"""Proxy of C++ IMP::score_functor::UnaryFunctionEvaluate class."""
444 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
445 __repr__ = _swig_repr
447 def __init__(self, *args):
449 __init__(UnaryFunctionEvaluate self, UnaryFunction uf) -> UnaryFunctionEvaluate
450 __init__(UnaryFunctionEvaluate self) -> UnaryFunctionEvaluate
452 _IMP_score_functor.UnaryFunctionEvaluate_swiginit(self, _IMP_score_functor.new_UnaryFunctionEvaluate(*args))
453 __swig_destroy__ = _IMP_score_functor.delete_UnaryFunctionEvaluate
456 _IMP_score_functor.UnaryFunctionEvaluate_swigregister(UnaryFunctionEvaluate)
459 r"""get_module_version() -> std::string const"""
460 return _IMP_score_functor.get_module_version()
463 r"""get_example_path(std::string fname) -> std::string"""
464 return _IMP_score_functor.get_example_path(fname)
467 r"""get_data_path(std::string fname) -> std::string"""
468 return _IMP_score_functor.get_data_path(fname)
470 from .
import _version_check
def get_data_path
Return the full path to one of this module's data files.
def get_module_version
Return the version of this module, as a string.
def get_example_path
Return the full path to one of this module's example files.
Make CGAL functionality available to IMP.
std::ostream & show(Hierarchy h, std::ostream &out=std::cout)
Print the hierarchy using a given decorator to display each node.
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...