11 from sys
import version_info
12 if version_info >= (2,6,0):
13 def swig_import_helper():
14 from os.path
import dirname
18 fp, pathname, description = imp.find_module(
'_IMP_score_functor', [dirname(__file__)])
20 import _IMP_score_functor
21 return _IMP_score_functor
24 _mod = imp.load_module(
'_IMP_score_functor', fp, pathname, description)
28 _IMP_score_functor = swig_import_helper()
29 del swig_import_helper
31 import _IMP_score_functor
34 _swig_property = property
37 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
38 if (name ==
"thisown"):
return self.this.own(value)
40 if type(value).__name__ ==
'SwigPyObject':
41 self.__dict__[name] = value
43 method = class_type.__swig_setmethods__.get(name,
None)
44 if method:
return method(self,value)
46 self.__dict__[name] = value
48 raise AttributeError(
"You cannot add attributes to %s" % self)
50 def _swig_setattr(self,class_type,name,value):
51 return _swig_setattr_nondynamic(self,class_type,name,value,0)
53 def _swig_getattr(self,class_type,name):
54 if (name ==
"thisown"):
return self.this.own()
55 method = class_type.__swig_getmethods__.get(name,
None)
56 if method:
return method(self)
57 raise AttributeError(name)
60 try: strthis =
"proxy of " + self.this.__repr__()
62 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
67 except AttributeError:
74 weakref_proxy = weakref.proxy
76 weakref_proxy =
lambda x: x
79 class IMP_SCORE_FUNCTOR_SwigPyIterator(_object):
80 """Proxy of C++ swig::IMP_SCORE_FUNCTOR_SwigPyIterator class"""
81 __swig_setmethods__ = {}
82 __setattr__ =
lambda self, name, value: _swig_setattr(self, IMP_SCORE_FUNCTOR_SwigPyIterator, name, value)
83 __swig_getmethods__ = {}
84 __getattr__ =
lambda self, name: _swig_getattr(self, IMP_SCORE_FUNCTOR_SwigPyIterator, name)
85 def __init__(self, *args, **kwargs):
raise AttributeError(
"No constructor defined - class is abstract")
87 __swig_destroy__ = _IMP_score_functor.delete_IMP_SCORE_FUNCTOR_SwigPyIterator
88 __del__ =
lambda self :
None;
90 """value(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> PyObject *"""
91 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_value(self)
95 incr(IMP_SCORE_FUNCTOR_SwigPyIterator self, size_t n=1) -> IMP_SCORE_FUNCTOR_SwigPyIterator
96 incr(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> IMP_SCORE_FUNCTOR_SwigPyIterator
98 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_incr(self, n)
102 decr(IMP_SCORE_FUNCTOR_SwigPyIterator self, size_t n=1) -> IMP_SCORE_FUNCTOR_SwigPyIterator
103 decr(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> IMP_SCORE_FUNCTOR_SwigPyIterator
105 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_decr(self, n)
107 def distance(self, *args):
108 """distance(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> ptrdiff_t"""
109 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_distance(self, *args)
111 def equal(self, *args):
112 """equal(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> bool"""
113 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_equal(self, *args)
116 """copy(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
117 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_copy(self)
120 """next(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> PyObject *"""
121 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_next(self)
124 """__next__(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> PyObject *"""
125 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___next__(self)
128 """previous(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> PyObject *"""
129 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_previous(self)
131 def advance(self, *args):
132 """advance(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
133 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_advance(self, *args)
135 def __eq__(self, *args):
136 """__eq__(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> bool"""
137 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___eq__(self, *args)
139 def __ne__(self, *args):
140 """__ne__(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> bool"""
141 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___ne__(self, *args)
143 def __iadd__(self, *args):
144 """__iadd__(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
145 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___iadd__(self, *args)
147 def __isub__(self, *args):
148 """__isub__(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
149 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___isub__(self, *args)
151 def __add__(self, *args):
152 """__add__(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
153 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___add__(self, *args)
155 def __sub__(self, *args):
157 __sub__(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator
158 __sub__(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> ptrdiff_t
160 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___sub__(self, *args)
162 def __iter__(self):
return self
163 IMP_SCORE_FUNCTOR_SwigPyIterator_swigregister = _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_swigregister
164 IMP_SCORE_FUNCTOR_SwigPyIterator_swigregister(IMP_SCORE_FUNCTOR_SwigPyIterator)
171 IMP_DEBUG = _IMP_score_functor.IMP_DEBUG
172 IMP_RELEASE = _IMP_score_functor.IMP_RELEASE
173 IMP_SILENT = _IMP_score_functor.IMP_SILENT
174 IMP_PROGRESS = _IMP_score_functor.IMP_PROGRESS
175 IMP_TERSE = _IMP_score_functor.IMP_TERSE
176 IMP_VERBOSE = _IMP_score_functor.IMP_VERBOSE
177 IMP_MEMORY = _IMP_score_functor.IMP_MEMORY
178 IMP_NONE = _IMP_score_functor.IMP_NONE
179 IMP_USAGE = _IMP_score_functor.IMP_USAGE
180 IMP_INTERNAL = _IMP_score_functor.IMP_INTERNAL
181 IMP_BASE_HAS_LOG4CXX = _IMP_score_functor.IMP_BASE_HAS_LOG4CXX
182 IMP_COMPILER_HAS_AUTO = _IMP_score_functor.IMP_COMPILER_HAS_AUTO
183 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_score_functor.IMP_COMPILER_HAS_DEBUG_VECTOR
184 IMP_BASE_HAS_BOOST_RANDOM = _IMP_score_functor.IMP_BASE_HAS_BOOST_RANDOM
185 IMP_BASE_HAS_GPERFTOOLS = _IMP_score_functor.IMP_BASE_HAS_GPERFTOOLS
186 IMP_BASE_HAS_TCMALLOC_HEAPCHECKER = _IMP_score_functor.IMP_BASE_HAS_TCMALLOC_HEAPCHECKER
187 IMP_BASE_HAS_TCMALLOC_HEAPPROFILER = _IMP_score_functor.IMP_BASE_HAS_TCMALLOC_HEAPPROFILER
188 IMPBASE_SHOW_WARNINGS = _IMP_score_functor.IMPBASE_SHOW_WARNINGS
190 class _DirectorObjects(object):
191 """@internal Simple class to keep references to director objects
192 to prevent premature deletion."""
195 def register(self, obj):
196 """Take a reference to a director object; will only work for
197 refcounted C++ classes"""
198 if hasattr(obj,
'get_ref_count'):
199 self._objects.append(obj)
201 """Only drop our reference and allow cleanup by Python if no other
202 Python references exist (we hold 3 references: one in self._objects,
203 one in x, and one in the argument list for getrefcount) *and* no
204 other C++ references exist (the Python object always holds one)"""
205 objs = [x
for x
in self._objects
if sys.getrefcount(x) > 3 \
206 or x.get_ref_count() > 1]
210 def get_object_count(self):
211 """Get number of director objects (useful for testing only)"""
212 return len(self._objects)
213 _director_objects = _DirectorObjects()
215 DEFAULT_CHECK = _IMP_score_functor.DEFAULT_CHECK
216 NONE = _IMP_score_functor.NONE
217 USAGE = _IMP_score_functor.USAGE
218 USAGE_AND_INTERNAL = _IMP_score_functor.USAGE_AND_INTERNAL
221 """set_check_level(IMP::base::CheckLevel tf)"""
222 return _IMP_score_functor.set_check_level(*args)
225 """get_check_level() -> IMP::base::CheckLevel"""
226 return _IMP_score_functor.get_check_level()
227 class _ostream(_object):
228 """Proxy of C++ std::ostream class"""
229 __swig_setmethods__ = {}
230 __setattr__ =
lambda self, name, value: _swig_setattr(self, _ostream, name, value)
231 __swig_getmethods__ = {}
232 __getattr__ =
lambda self, name: _swig_getattr(self, _ostream, name)
233 def __init__(self, *args, **kwargs):
raise AttributeError(
"No constructor defined")
234 __repr__ = _swig_repr
235 def write(self, *args):
236 """write(_ostream self, char const * osa_buf)"""
237 return _IMP_score_functor._ostream_write(self, *args)
239 _ostream_swigregister = _IMP_score_functor._ostream_swigregister
240 _ostream_swigregister(_ostream)
242 IMP_COMPILER_HAS_OVERRIDE = _IMP_score_functor.IMP_COMPILER_HAS_OVERRIDE
243 IMP_COMPILER_HAS_FINAL = _IMP_score_functor.IMP_COMPILER_HAS_FINAL
244 IMP_HAS_NOEXCEPT = _IMP_score_functor.IMP_HAS_NOEXCEPT
246 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_score_functor.IMP_CGAL_HAS_BOOST_FILESYSTEM
247 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_score_functor.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
248 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_score_functor.IMP_CGAL_HAS_BOOST_RANDOM
249 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_score_functor.IMP_CGAL_HAS_BOOST_SYSTEM
250 IMPCGAL_SHOW_WARNINGS = _IMP_score_functor.IMPCGAL_SHOW_WARNINGS
252 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_score_functor.IMP_ALGEBRA_HAS_IMP_CGAL
253 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_score_functor.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
254 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_score_functor.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
255 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_score_functor.IMP_ALGEBRA_HAS_BOOST_RANDOM
256 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_score_functor.IMP_ALGEBRA_HAS_BOOST_SYSTEM
257 IMP_ALGEBRA_HAS_CGAL = _IMP_score_functor.IMP_ALGEBRA_HAS_CGAL
258 IMP_ALGEBRA_HAS_ANN = _IMP_score_functor.IMP_ALGEBRA_HAS_ANN
259 IMPALGEBRA_SHOW_WARNINGS = _IMP_score_functor.IMPALGEBRA_SHOW_WARNINGS
261 IMP_KERNEL_HAS_IMP_CGAL = _IMP_score_functor.IMP_KERNEL_HAS_IMP_CGAL
262 IMP_KERNEL_HAS_BOOST_PROGRAMOPTIONS = _IMP_score_functor.IMP_KERNEL_HAS_BOOST_PROGRAMOPTIONS
263 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_score_functor.IMP_KERNEL_HAS_BOOST_RANDOM
264 IMP_KERNEL_HAS_BOOST_SYSTEM = _IMP_score_functor.IMP_KERNEL_HAS_BOOST_SYSTEM
265 IMP_KERNEL_HAS_CGAL = _IMP_score_functor.IMP_KERNEL_HAS_CGAL
266 IMPKERNEL_SHOW_WARNINGS = _IMP_score_functor.IMPKERNEL_SHOW_WARNINGS
268 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
269 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
270 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
271 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
272 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
273 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_CGAL
274 IMP_SCORE_FUNCTOR_HAS_HDF5 = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_HDF5
275 IMPSCOREFUNCTOR_SHOW_WARNINGS = _IMP_score_functor.IMPSCOREFUNCTOR_SHOW_WARNINGS
276 class Score(_object):
277 """Proxy of C++ IMP::score_functor::Score class"""
278 __swig_setmethods__ = {}
279 __setattr__ =
lambda self, name, value: _swig_setattr(self, Score, name, value)
280 __swig_getmethods__ = {}
281 __getattr__ =
lambda self, name: _swig_getattr(self, Score, name)
282 __repr__ = _swig_repr
284 """__init__(IMP::score_functor::Score self) -> Score"""
285 this = _IMP_score_functor.new_Score()
286 try: self.this.append(this)
287 except: self.this = this
288 def get_inputs(self, *args):
289 """get_inputs(Score self, Model m, IMP::kernel::ParticleIndexes const & pis) -> IMP::kernel::ModelObjectsTemp"""
290 return _IMP_score_functor.Score_get_inputs(self, *args)
292 def show(self, *args):
293 """show(Score self, _ostream arg2)"""
294 return _IMP_score_functor.Score_show(self, *args)
296 __swig_destroy__ = _IMP_score_functor.delete_Score
297 __del__ =
lambda self :
None;
298 Score_swigregister = _IMP_score_functor.Score_swigregister
299 Score_swigregister(Score)
301 class _DopeBase(Score):
302 """Proxy of C++ IMP::score_functor::Statistical<(IMP::score_functor::DopeType,false,true)> class"""
303 __swig_setmethods__ = {}
304 for _s
in [Score]: __swig_setmethods__.update(getattr(_s,
'__swig_setmethods__',{}))
305 __setattr__ =
lambda self, name, value: _swig_setattr(self, _DopeBase, name, value)
306 __swig_getmethods__ = {}
307 for _s
in [Score]: __swig_getmethods__.update(getattr(_s,
'__swig_getmethods__',{}))
308 __getattr__ =
lambda self, name: _swig_getattr(self, _DopeBase, name)
309 __repr__ = _swig_repr
310 def __init__(self, *args):
312 __init__(IMP::score_functor::Statistical<(IMP::score_functor::DopeType,false,true)> self, IntKey k, double threshold, TextInput data_file) -> _DopeBase
313 __init__(IMP::score_functor::Statistical<(IMP::score_functor::DopeType,false,true)> self, IntKey k, double threshold, TextInput data_file, unsigned int shift) -> _DopeBase
315 this = _IMP_score_functor.new__DopeBase(*args)
316 try: self.this.append(this)
317 except: self.this = this
318 def get_score(self, *args):
319 """get_score(_DopeBase self, Model m, IMP::kernel::ParticleIndexPair const & pp, double distance) -> double"""
320 return _IMP_score_functor._DopeBase_get_score(self, *args)
322 def get_score_and_derivative(self, *args):
324 get_score_and_derivative(_DopeBase self, Model m, IMP::base::Array< 2,IMP::kernel::ParticleIndex,IMP::kernel::ParticleIndex > const & pp,
325 double distance) -> IMP::DerivativePair
327 return _IMP_score_functor._DopeBase_get_score_and_derivative(self, *args)
329 def get_maximum_range(self, *args):
330 """get_maximum_range(_DopeBase self, Model arg2, IMP::kernel::ParticleIndexPair const & arg3) -> double"""
331 return _IMP_score_functor._DopeBase_get_maximum_range(self, *args)
333 def get_is_trivially_zero(self, *args):
334 """get_is_trivially_zero(_DopeBase self, Model m, IMP::kernel::ParticleIndexPair const & p, double squared_distance) -> bool"""
335 return _IMP_score_functor._DopeBase_get_is_trivially_zero(self, *args)
337 __swig_destroy__ = _IMP_score_functor.delete__DopeBase
338 __del__ =
lambda self :
None;
339 _DopeBase_swigregister = _IMP_score_functor._DopeBase_swigregister
340 _DopeBase_swigregister(_DopeBase)
342 class Dope(_DopeBase):
343 """Proxy of C++ IMP::score_functor::Dope class"""
344 __swig_setmethods__ = {}
345 for _s
in [_DopeBase]: __swig_setmethods__.update(getattr(_s,
'__swig_setmethods__',{}))
346 __setattr__ =
lambda self, name, value: _swig_setattr(self, Dope, name, value)
347 __swig_getmethods__ = {}
348 for _s
in [_DopeBase]: __swig_getmethods__.update(getattr(_s,
'__swig_getmethods__',{}))
349 __getattr__ =
lambda self, name: _swig_getattr(self, Dope, name)
350 __repr__ = _swig_repr
351 def __init__(self, *args):
353 __init__(IMP::score_functor::Dope self, double threshold=std::numeric_limits< double >::max()) -> Dope
354 __init__(IMP::score_functor::Dope self) -> Dope
355 __init__(IMP::score_functor::Dope self, double threshold, TextInput data_file) -> Dope
357 this = _IMP_score_functor.new_Dope(*args)
358 try: self.this.append(this)
359 except: self.this = this
360 def get_dope_type_key():
361 """get_dope_type_key() -> IntKey"""
362 return _IMP_score_functor.Dope_get_dope_type_key()
364 if _newclass:get_dope_type_key = staticmethod(get_dope_type_key)
365 __swig_getmethods__[
"get_dope_type_key"] =
lambda x: get_dope_type_key
366 __swig_destroy__ = _IMP_score_functor.delete_Dope
367 __del__ =
lambda self :
None;
368 Dope_swigregister = _IMP_score_functor.Dope_swigregister
369 Dope_swigregister(Dope)
371 def Dope_get_dope_type_key():
372 """Dope_get_dope_type_key() -> IntKey"""
373 return _IMP_score_functor.Dope_get_dope_type_key()
375 class UnaryFunctionEvaluate(Score):
376 """Proxy of C++ IMP::score_functor::UnaryFunctionEvaluate class"""
377 __swig_setmethods__ = {}
378 for _s
in [Score]: __swig_setmethods__.update(getattr(_s,
'__swig_setmethods__',{}))
379 __setattr__ =
lambda self, name, value: _swig_setattr(self, UnaryFunctionEvaluate, name, value)
380 __swig_getmethods__ = {}
381 for _s
in [Score]: __swig_getmethods__.update(getattr(_s,
'__swig_getmethods__',{}))
382 __getattr__ =
lambda self, name: _swig_getattr(self, UnaryFunctionEvaluate, name)
383 __repr__ = _swig_repr
384 def __init__(self, *args):
385 """__init__(IMP::score_functor::UnaryFunctionEvaluate self, UnaryFunction uf) -> UnaryFunctionEvaluate"""
386 this = _IMP_score_functor.new_UnaryFunctionEvaluate(*args)
387 try: self.this.append(this)
388 except: self.this = this
389 __swig_destroy__ = _IMP_score_functor.delete_UnaryFunctionEvaluate
390 __del__ =
lambda self :
None;
391 UnaryFunctionEvaluate_swigregister = _IMP_score_functor.UnaryFunctionEvaluate_swigregister
392 UnaryFunctionEvaluate_swigregister(UnaryFunctionEvaluate)
395 def get_module_version():
396 """get_module_version() -> std::string const"""
397 return _IMP_score_functor.get_module_version()
400 """get_example_path(std::string fname) -> std::string"""
401 return _IMP_score_functor.get_example_path(*args)
404 """get_data_path(std::string fname) -> std::string"""
405 return _IMP_score_functor.get_data_path(*args)
406 import _version_check
407 _version_check.check_version(get_module_version())
std::string get_data_path(std::string file_name)
Return the full path to installed data.
See IMP.cgal for more information.
void set_check_level(CheckLevel tf)
Control runtime checks in the code.
See IMP.base for more information.
See IMP.kernel for more information.
std::string get_example_path(std::string file_name)
Return the path to installed example data for this module.
See IMP.algebra for more information.
void show(Hierarchy h, std::ostream &out=std::cout)
Print out a molecular hierarchy.
CheckLevel get_check_level()
Get the current audit mode.