9 from sys
import version_info
10 if version_info >= (2,6,0):
11 def swig_import_helper():
12 from os.path
import dirname
16 fp, pathname, description = imp.find_module(
'_IMP_score_functor', [dirname(__file__)])
18 import _IMP_score_functor
19 return _IMP_score_functor
22 _mod = imp.load_module(
'_IMP_score_functor', fp, pathname, description)
26 _IMP_score_functor = swig_import_helper()
27 del swig_import_helper
29 import _IMP_score_functor
32 _swig_property = property
35 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
36 if (name ==
"thisown"):
return self.this.own(value)
38 if type(value).__name__ ==
'SwigPyObject':
39 self.__dict__[name] = value
41 method = class_type.__swig_setmethods__.get(name,
None)
42 if method:
return method(self,value)
44 self.__dict__[name] = value
46 raise AttributeError(
"You cannot add attributes to %s" % self)
48 def _swig_setattr(self,class_type,name,value):
49 return _swig_setattr_nondynamic(self,class_type,name,value,0)
51 def _swig_getattr(self,class_type,name):
52 if (name ==
"thisown"):
return self.this.own()
53 method = class_type.__swig_getmethods__.get(name,
None)
54 if method:
return method(self)
55 raise AttributeError(name)
58 try: strthis =
"proxy of " + self.this.__repr__()
60 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
65 except AttributeError:
72 weakref_proxy = weakref.proxy
74 weakref_proxy =
lambda x: x
77 class IMP_SCORE_FUNCTOR_SwigPyIterator(_object):
78 """Proxy of C++ swig::IMP_SCORE_FUNCTOR_SwigPyIterator class"""
79 __swig_setmethods__ = {}
80 __setattr__ =
lambda self, name, value: _swig_setattr(self, IMP_SCORE_FUNCTOR_SwigPyIterator, name, value)
81 __swig_getmethods__ = {}
82 __getattr__ =
lambda self, name: _swig_getattr(self, IMP_SCORE_FUNCTOR_SwigPyIterator, name)
83 def __init__(self, *args, **kwargs):
raise AttributeError(
"No constructor defined - class is abstract")
85 __swig_destroy__ = _IMP_score_functor.delete_IMP_SCORE_FUNCTOR_SwigPyIterator
86 __del__ =
lambda self :
None;
88 """value(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> PyObject *"""
89 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_value(self)
93 incr(IMP_SCORE_FUNCTOR_SwigPyIterator self, size_t n=1) -> IMP_SCORE_FUNCTOR_SwigPyIterator
94 incr(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> IMP_SCORE_FUNCTOR_SwigPyIterator
96 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_incr(self, n)
100 decr(IMP_SCORE_FUNCTOR_SwigPyIterator self, size_t n=1) -> IMP_SCORE_FUNCTOR_SwigPyIterator
101 decr(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> IMP_SCORE_FUNCTOR_SwigPyIterator
103 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_decr(self, n)
105 def distance(self, *args):
106 """distance(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> ptrdiff_t"""
107 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_distance(self, *args)
109 def equal(self, *args):
110 """equal(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> bool"""
111 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_equal(self, *args)
114 """copy(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
115 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_copy(self)
118 """next(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> PyObject *"""
119 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_next(self)
122 """__next__(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> PyObject *"""
123 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___next__(self)
126 """previous(IMP_SCORE_FUNCTOR_SwigPyIterator self) -> PyObject *"""
127 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_previous(self)
129 def advance(self, *args):
130 """advance(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
131 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_advance(self, *args)
133 def __eq__(self, *args):
134 """__eq__(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> bool"""
135 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___eq__(self, *args)
137 def __ne__(self, *args):
138 """__ne__(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> bool"""
139 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___ne__(self, *args)
141 def __iadd__(self, *args):
142 """__iadd__(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
143 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___iadd__(self, *args)
145 def __isub__(self, *args):
146 """__isub__(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
147 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___isub__(self, *args)
149 def __add__(self, *args):
150 """__add__(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator"""
151 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___add__(self, *args)
153 def __sub__(self, *args):
155 __sub__(IMP_SCORE_FUNCTOR_SwigPyIterator self, ptrdiff_t n) -> IMP_SCORE_FUNCTOR_SwigPyIterator
156 __sub__(IMP_SCORE_FUNCTOR_SwigPyIterator self, IMP_SCORE_FUNCTOR_SwigPyIterator x) -> ptrdiff_t
158 return _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator___sub__(self, *args)
160 def __iter__(self):
return self
161 IMP_SCORE_FUNCTOR_SwigPyIterator_swigregister = _IMP_score_functor.IMP_SCORE_FUNCTOR_SwigPyIterator_swigregister
162 IMP_SCORE_FUNCTOR_SwigPyIterator_swigregister(IMP_SCORE_FUNCTOR_SwigPyIterator)
169 IMP_HAS_DEPRECATED = _IMP_score_functor.IMP_HAS_DEPRECATED
170 IMP_DEBUG = _IMP_score_functor.IMP_DEBUG
171 IMP_RELEASE = _IMP_score_functor.IMP_RELEASE
172 IMP_SILENT = _IMP_score_functor.IMP_SILENT
173 IMP_PROGRESS = _IMP_score_functor.IMP_PROGRESS
174 IMP_TERSE = _IMP_score_functor.IMP_TERSE
175 IMP_VERBOSE = _IMP_score_functor.IMP_VERBOSE
176 IMP_NONE = _IMP_score_functor.IMP_NONE
177 IMP_USAGE = _IMP_score_functor.IMP_USAGE
178 IMP_INTERNAL = _IMP_score_functor.IMP_INTERNAL
179 IMP_COMPILER_HAS_AUTO = _IMP_score_functor.IMP_COMPILER_HAS_AUTO
180 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_score_functor.IMP_COMPILER_HAS_DEBUG_VECTOR
181 IMP_COMPILER_HAS_NULLPTR = _IMP_score_functor.IMP_COMPILER_HAS_NULLPTR
182 IMP_BASE_HAS_BOOST_RANDOM = _IMP_score_functor.IMP_BASE_HAS_BOOST_RANDOM
183 IMP_BASE_HAS_GPERFTOOLS = _IMP_score_functor.IMP_BASE_HAS_GPERFTOOLS
184 IMP_BASE_HAS_LOG4CXX = _IMP_score_functor.IMP_BASE_HAS_LOG4CXX
185 IMP_BASE_HAS_TCMALLOC_HEAPCHECKER = _IMP_score_functor.IMP_BASE_HAS_TCMALLOC_HEAPCHECKER
186 IMP_BASE_HAS_TCMALLOC_HEAPPROFILER = _IMP_score_functor.IMP_BASE_HAS_TCMALLOC_HEAPPROFILER
188 class _DirectorObjects(object):
189 """@internal Simple class to keep references to director objects
190 to prevent premature deletion."""
193 def register(self, obj):
194 """Take a reference to a director object; will only work for
195 refcounted C++ classes"""
196 if hasattr(obj,
'get_ref_count'):
197 self._objects.append(obj)
199 """Only drop our reference and allow cleanup by Python if no other
200 Python references exist (we hold 3 references: one in self._objects,
201 one in x, and one in the argument list for getrefcount) *and* no
202 other C++ references exist (the Python object always holds one)"""
203 objs = [x
for x
in self._objects
if sys.getrefcount(x) > 3 \
204 or x.get_ref_count() > 1]
208 def get_object_count(self):
209 """Get number of director objects (useful for testing only)"""
210 return len(self._objects)
211 _director_objects = _DirectorObjects()
213 DEFAULT_CHECK = _IMP_score_functor.DEFAULT_CHECK
214 NONE = _IMP_score_functor.NONE
215 USAGE = _IMP_score_functor.USAGE
216 USAGE_AND_INTERNAL = _IMP_score_functor.USAGE_AND_INTERNAL
219 """set_check_level(IMP::base::CheckLevel tf)"""
220 return _IMP_score_functor.set_check_level(*args)
223 """get_check_level() -> IMP::base::CheckLevel"""
224 return _IMP_score_functor.get_check_level()
225 class _ostream(_object):
226 """Proxy of C++ std::ostream class"""
227 __swig_setmethods__ = {}
228 __setattr__ =
lambda self, name, value: _swig_setattr(self, _ostream, name, value)
229 __swig_getmethods__ = {}
230 __getattr__ =
lambda self, name: _swig_getattr(self, _ostream, name)
231 def __init__(self, *args, **kwargs):
raise AttributeError(
"No constructor defined")
232 __repr__ = _swig_repr
233 def write(self, *args):
234 """write(_ostream self, char const * osa_buf)"""
235 return _IMP_score_functor._ostream_write(self, *args)
237 _ostream_swigregister = _IMP_score_functor._ostream_swigregister
238 _ostream_swigregister(_ostream)
240 IMP_COMPILER_HAS_OVERRIDE = _IMP_score_functor.IMP_COMPILER_HAS_OVERRIDE
241 IMP_COMPILER_HAS_FINAL = _IMP_score_functor.IMP_COMPILER_HAS_FINAL
243 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_score_functor.IMP_CGAL_HAS_BOOST_FILESYSTEM
244 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
246 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_score_functor.IMP_CGAL_HAS_BOOST_SYSTEM
248 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_score_functor.IMP_ALGEBRA_HAS_IMP_CGAL
249 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_score_functor.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
250 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_score_functor.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
251 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_score_functor.IMP_ALGEBRA_HAS_BOOST_RANDOM
252 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_score_functor.IMP_ALGEBRA_HAS_BOOST_SYSTEM
253 IMP_ALGEBRA_HAS_CGAL = _IMP_score_functor.IMP_ALGEBRA_HAS_CGAL
254 IMP_ALGEBRA_HAS_ANN = _IMP_score_functor.IMP_ALGEBRA_HAS_ANN
256 IMP_KERNEL_HAS_IMP_CGAL = _IMP_score_functor.IMP_KERNEL_HAS_IMP_CGAL
257 IMP_KERNEL_HAS_BOOST_PROGRAMOPTIONS = _IMP_score_functor.IMP_KERNEL_HAS_BOOST_PROGRAMOPTIONS
258 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_score_functor.IMP_KERNEL_HAS_BOOST_RANDOM
259 IMP_KERNEL_HAS_BOOST_SYSTEM = _IMP_score_functor.IMP_KERNEL_HAS_BOOST_SYSTEM
260 IMP_KERNEL_HAS_CGAL = _IMP_score_functor.IMP_KERNEL_HAS_CGAL
262 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
263 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
264 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
265 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
266 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
267 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_score_functor.IMP_SCORE_FUNCTOR_HAS_CGAL
268 class Score(_object):
269 """Proxy of C++ IMP::score_functor::Score class"""
270 __swig_setmethods__ = {}
271 __setattr__ =
lambda self, name, value: _swig_setattr(self, Score, name, value)
272 __swig_getmethods__ = {}
273 __getattr__ =
lambda self, name: _swig_getattr(self, Score, name)
274 __repr__ = _swig_repr
276 """__init__(IMP::score_functor::Score self) -> Score"""
277 this = _IMP_score_functor.new_Score()
278 try: self.this.append(this)
279 except: self.this = this
280 def get_inputs(self, *args):
281 """get_inputs(Score self, Model m, IMP::kernel::ParticleIndexes const & pis) -> IMP::kernel::ModelObjectsTemp"""
282 return _IMP_score_functor.Score_get_inputs(self, *args)
284 def show(self, *args):
285 """show(Score self, _ostream arg2)"""
286 return _IMP_score_functor.Score_show(self, *args)
288 __swig_destroy__ = _IMP_score_functor.delete_Score
289 __del__ =
lambda self :
None;
290 Score_swigregister = _IMP_score_functor.Score_swigregister
291 Score_swigregister(Score)
293 class _DopeBase(Score):
294 """Proxy of C++ IMP::score_functor::Statistical<(IMP::score_functor::DopeType,false,true)> class"""
295 __swig_setmethods__ = {}
296 for _s
in [Score]: __swig_setmethods__.update(getattr(_s,
'__swig_setmethods__',{}))
297 __setattr__ =
lambda self, name, value: _swig_setattr(self, _DopeBase, name, value)
298 __swig_getmethods__ = {}
299 for _s
in [Score]: __swig_getmethods__.update(getattr(_s,
'__swig_getmethods__',{}))
300 __getattr__ =
lambda self, name: _swig_getattr(self, _DopeBase, name)
301 __repr__ = _swig_repr
302 def __init__(self, *args):
304 __init__(IMP::score_functor::Statistical<(IMP::score_functor::DopeType,false,true)> self, IntKey k, double threshold, TextInput data_file) -> _DopeBase
305 __init__(IMP::score_functor::Statistical<(IMP::score_functor::DopeType,false,true)> self, IntKey k, double threshold, TextInput data_file, unsigned int shift) -> _DopeBase
307 this = _IMP_score_functor.new__DopeBase(*args)
308 try: self.this.append(this)
309 except: self.this = this
310 def get_score(self, *args):
312 get_score(_DopeBase self, Model m, IMP::base::Array< 2,IMP::kernel::ParticleIndex,IMP::kernel::ParticleIndex > const & pp,
313 double distance) -> double
315 return _IMP_score_functor._DopeBase_get_score(self, *args)
317 def get_score_and_derivative(self, *args):
319 get_score_and_derivative(_DopeBase self, Model m, IMP::base::Array< 2,IMP::kernel::ParticleIndex,IMP::kernel::ParticleIndex > const & pp,
320 double distance) -> IMP::DerivativePair
322 return _IMP_score_functor._DopeBase_get_score_and_derivative(self, *args)
324 def get_maximum_range(self, *args):
325 """get_maximum_range(_DopeBase self, Model arg2, IMP::base::Array< 2,IMP::kernel::ParticleIndex,IMP::kernel::ParticleIndex > const & arg3) -> double"""
326 return _IMP_score_functor._DopeBase_get_maximum_range(self, *args)
328 def get_is_trivially_zero(self, *args):
330 get_is_trivially_zero(_DopeBase self, Model m, IMP::base::Array< 2,IMP::kernel::ParticleIndex,IMP::kernel::ParticleIndex > const & p,
331 double squared_distance) -> bool
333 return _IMP_score_functor._DopeBase_get_is_trivially_zero(self, *args)
335 __swig_destroy__ = _IMP_score_functor.delete__DopeBase
336 __del__ =
lambda self :
None;
337 _DopeBase_swigregister = _IMP_score_functor._DopeBase_swigregister
338 _DopeBase_swigregister(_DopeBase)
340 class Dope(_DopeBase):
341 """Proxy of C++ IMP::score_functor::Dope class"""
342 __swig_setmethods__ = {}
343 for _s
in [_DopeBase]: __swig_setmethods__.update(getattr(_s,
'__swig_setmethods__',{}))
344 __setattr__ =
lambda self, name, value: _swig_setattr(self, Dope, name, value)
345 __swig_getmethods__ = {}
346 for _s
in [_DopeBase]: __swig_getmethods__.update(getattr(_s,
'__swig_getmethods__',{}))
347 __getattr__ =
lambda self, name: _swig_getattr(self, Dope, name)
348 __repr__ = _swig_repr
349 def __init__(self, *args):
351 __init__(IMP::score_functor::Dope self, double threshold=std::numeric_limits< double >::max()) -> Dope
352 __init__(IMP::score_functor::Dope self) -> Dope
353 __init__(IMP::score_functor::Dope self, double threshold, TextInput data_file) -> Dope
355 this = _IMP_score_functor.new_Dope(*args)
356 try: self.this.append(this)
357 except: self.this = this
358 def get_dope_type_key():
359 """get_dope_type_key() -> IntKey"""
360 return _IMP_score_functor.Dope_get_dope_type_key()
362 if _newclass:get_dope_type_key = staticmethod(get_dope_type_key)
363 __swig_getmethods__[
"get_dope_type_key"] =
lambda x: get_dope_type_key
364 __swig_destroy__ = _IMP_score_functor.delete_Dope
365 __del__ =
lambda self :
None;
366 Dope_swigregister = _IMP_score_functor.Dope_swigregister
367 Dope_swigregister(Dope)
369 def Dope_get_dope_type_key():
370 """Dope_get_dope_type_key() -> IntKey"""
371 return _IMP_score_functor.Dope_get_dope_type_key()
373 class UnaryFunctionEvaluate(Score):
374 """Proxy of C++ IMP::score_functor::UnaryFunctionEvaluate class"""
375 __swig_setmethods__ = {}
376 for _s
in [Score]: __swig_setmethods__.update(getattr(_s,
'__swig_setmethods__',{}))
377 __setattr__ =
lambda self, name, value: _swig_setattr(self, UnaryFunctionEvaluate, name, value)
378 __swig_getmethods__ = {}
379 for _s
in [Score]: __swig_getmethods__.update(getattr(_s,
'__swig_getmethods__',{}))
380 __getattr__ =
lambda self, name: _swig_getattr(self, UnaryFunctionEvaluate, name)
381 __repr__ = _swig_repr
382 def __init__(self, *args):
383 """__init__(IMP::score_functor::UnaryFunctionEvaluate self, UnaryFunction uf) -> UnaryFunctionEvaluate"""
384 this = _IMP_score_functor.new_UnaryFunctionEvaluate(*args)
385 try: self.this.append(this)
386 except: self.this = this
387 __swig_destroy__ = _IMP_score_functor.delete_UnaryFunctionEvaluate
388 __del__ =
lambda self :
None;
389 UnaryFunctionEvaluate_swigregister = _IMP_score_functor.UnaryFunctionEvaluate_swigregister
390 UnaryFunctionEvaluate_swigregister(UnaryFunctionEvaluate)
393 def get_module_version():
394 """get_module_version() -> std::string const"""
395 return _IMP_score_functor.get_module_version()
398 """get_example_path(std::string fname) -> std::string"""
399 return _IMP_score_functor.get_example_path(*args)
402 """get_data_path(std::string fname) -> std::string"""
403 return _IMP_score_functor.get_data_path(*args)
404 import _version_check
405 _version_check.check_version(get_module_version())