11 from __future__
import print_function, division, absolute_import
15 from sys
import version_info
as _swig_python_version_info
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_MPI_SwigPyIterator(object):
68 r"""Proxy of C++ swig::IMP_MPI_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_mpi.delete_IMP_MPI_SwigPyIterator
78 r"""value(IMP_MPI_SwigPyIterator self) -> PyObject *"""
79 return _IMP_mpi.IMP_MPI_SwigPyIterator_value(self)
82 r"""incr(IMP_MPI_SwigPyIterator self, size_t n=1) -> IMP_MPI_SwigPyIterator"""
83 return _IMP_mpi.IMP_MPI_SwigPyIterator_incr(self, n)
86 r"""decr(IMP_MPI_SwigPyIterator self, size_t n=1) -> IMP_MPI_SwigPyIterator"""
87 return _IMP_mpi.IMP_MPI_SwigPyIterator_decr(self, n)
89 def distance(self, x):
90 r"""distance(IMP_MPI_SwigPyIterator self, IMP_MPI_SwigPyIterator x) -> ptrdiff_t"""
91 return _IMP_mpi.IMP_MPI_SwigPyIterator_distance(self, x)
94 r"""equal(IMP_MPI_SwigPyIterator self, IMP_MPI_SwigPyIterator x) -> bool"""
95 return _IMP_mpi.IMP_MPI_SwigPyIterator_equal(self, x)
98 r"""copy(IMP_MPI_SwigPyIterator self) -> IMP_MPI_SwigPyIterator"""
99 return _IMP_mpi.IMP_MPI_SwigPyIterator_copy(self)
102 r"""next(IMP_MPI_SwigPyIterator self) -> PyObject *"""
103 return _IMP_mpi.IMP_MPI_SwigPyIterator_next(self)
106 r"""__next__(IMP_MPI_SwigPyIterator self) -> PyObject *"""
107 return _IMP_mpi.IMP_MPI_SwigPyIterator___next__(self)
110 r"""previous(IMP_MPI_SwigPyIterator self) -> PyObject *"""
111 return _IMP_mpi.IMP_MPI_SwigPyIterator_previous(self)
113 def advance(self, n):
114 r"""advance(IMP_MPI_SwigPyIterator self, ptrdiff_t n) -> IMP_MPI_SwigPyIterator"""
115 return _IMP_mpi.IMP_MPI_SwigPyIterator_advance(self, n)
118 r"""__eq__(IMP_MPI_SwigPyIterator self, IMP_MPI_SwigPyIterator x) -> bool"""
119 return _IMP_mpi.IMP_MPI_SwigPyIterator___eq__(self, x)
122 r"""__ne__(IMP_MPI_SwigPyIterator self, IMP_MPI_SwigPyIterator x) -> bool"""
123 return _IMP_mpi.IMP_MPI_SwigPyIterator___ne__(self, x)
125 def __iadd__(self, n):
126 r"""__iadd__(IMP_MPI_SwigPyIterator self, ptrdiff_t n) -> IMP_MPI_SwigPyIterator"""
127 return _IMP_mpi.IMP_MPI_SwigPyIterator___iadd__(self, n)
129 def __isub__(self, n):
130 r"""__isub__(IMP_MPI_SwigPyIterator self, ptrdiff_t n) -> IMP_MPI_SwigPyIterator"""
131 return _IMP_mpi.IMP_MPI_SwigPyIterator___isub__(self, n)
133 def __add__(self, n):
134 r"""__add__(IMP_MPI_SwigPyIterator self, ptrdiff_t n) -> IMP_MPI_SwigPyIterator"""
135 return _IMP_mpi.IMP_MPI_SwigPyIterator___add__(self, n)
137 def __sub__(self, *args):
139 __sub__(IMP_MPI_SwigPyIterator self, ptrdiff_t n) -> IMP_MPI_SwigPyIterator
140 __sub__(IMP_MPI_SwigPyIterator self, IMP_MPI_SwigPyIterator x) -> ptrdiff_t
142 return _IMP_mpi.IMP_MPI_SwigPyIterator___sub__(self, *args)
147 _IMP_mpi.IMP_MPI_SwigPyIterator_swigregister(IMP_MPI_SwigPyIterator)
154 IMP_DEBUG = _IMP_mpi.IMP_DEBUG
156 IMP_RELEASE = _IMP_mpi.IMP_RELEASE
158 IMP_SILENT = _IMP_mpi.IMP_SILENT
160 IMP_PROGRESS = _IMP_mpi.IMP_PROGRESS
162 IMP_TERSE = _IMP_mpi.IMP_TERSE
164 IMP_VERBOSE = _IMP_mpi.IMP_VERBOSE
166 IMP_MEMORY = _IMP_mpi.IMP_MEMORY
168 IMP_NONE = _IMP_mpi.IMP_NONE
170 IMP_USAGE = _IMP_mpi.IMP_USAGE
172 IMP_INTERNAL = _IMP_mpi.IMP_INTERNAL
174 IMP_KERNEL_HAS_LOG4CXX = _IMP_mpi.IMP_KERNEL_HAS_LOG4CXX
176 IMP_COMPILER_HAS_CEREAL_RAW_POINTER = _IMP_mpi.IMP_COMPILER_HAS_CEREAL_RAW_POINTER
178 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_mpi.IMP_COMPILER_HAS_DEBUG_VECTOR
180 IMP_COMPILER_HAS_RANDOM_SHUFFLE = _IMP_mpi.IMP_COMPILER_HAS_RANDOM_SHUFFLE
182 IMP_COMPILER_HAS_THREE_WAY = _IMP_mpi.IMP_COMPILER_HAS_THREE_WAY
184 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_mpi.IMP_KERNEL_HAS_BOOST_RANDOM
186 IMP_KERNEL_HAS_NUMPY = _IMP_mpi.IMP_KERNEL_HAS_NUMPY
188 IMP_KERNEL_HAS_GPERFTOOLS = _IMP_mpi.IMP_KERNEL_HAS_GPERFTOOLS
190 IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER = _IMP_mpi.IMP_KERNEL_HAS_TCMALLOC_HEAPCHECKER
192 IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER = _IMP_mpi.IMP_KERNEL_HAS_TCMALLOC_HEAPPROFILER
194 IMPKERNEL_SHOW_WARNINGS = _IMP_mpi.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_mpi._ostream_write(self, osa_buf)
237 _IMP_mpi._ostream_swigregister(_ostream)
238 IMP_C_OPEN_BINARY = _IMP_mpi.IMP_C_OPEN_BINARY
241 IMP_MPI_HAS_BOOST_FILESYSTEM = _IMP_mpi.IMP_MPI_HAS_BOOST_FILESYSTEM
243 IMP_MPI_HAS_BOOST_PROGRAMOPTIONS = _IMP_mpi.IMP_MPI_HAS_BOOST_PROGRAMOPTIONS
245 IMP_MPI_HAS_BOOST_RANDOM = _IMP_mpi.IMP_MPI_HAS_BOOST_RANDOM
247 IMP_MPI_HAS_BOOST_SYSTEM = _IMP_mpi.IMP_MPI_HAS_BOOST_SYSTEM
249 IMP_MPI_HAS_NUMPY = _IMP_mpi.IMP_MPI_HAS_NUMPY
251 IMPMPI_SHOW_WARNINGS = _IMP_mpi.IMPMPI_SHOW_WARNINGS
254 _object_types.append(
"ReplicaExchange")
257 def _object_cast_to_ReplicaExchange(o):
258 r"""_object_cast_to_ReplicaExchange(Object o) -> ReplicaExchange"""
259 return _IMP_mpi._object_cast_to_ReplicaExchange(o)
261 r"""Proxy of C++ IMP::mpi::ReplicaExchange class."""
263 thisown = property(
lambda x: x.this.own(),
lambda x, v: x.this.own(v), doc=
"The membership flag")
266 r"""__init__(ReplicaExchange self) -> ReplicaExchange"""
267 _IMP_mpi.ReplicaExchange_swiginit(self, _IMP_mpi.new_ReplicaExchange())
269 def set_my_parameter(self, key, values):
270 r"""set_my_parameter(ReplicaExchange self, std::string key, IMP::Floats values)"""
271 return _IMP_mpi.ReplicaExchange_set_my_parameter(self, key, values)
273 def get_my_parameter(self, key):
274 r"""get_my_parameter(ReplicaExchange self, std::string key) -> IMP::Floats"""
275 return _IMP_mpi.ReplicaExchange_get_my_parameter(self, key)
277 def get_friend_index(self, istep):
278 r"""get_friend_index(ReplicaExchange self, int istep) -> int"""
279 return _IMP_mpi.ReplicaExchange_get_friend_index(self, istep)
281 def get_exchange_array(self):
282 r"""get_exchange_array(ReplicaExchange self) -> IMP::Ints"""
283 return _IMP_mpi.ReplicaExchange_get_exchange_array(self)
285 def get_friend_parameter(self, key, findex):
286 r"""get_friend_parameter(ReplicaExchange self, std::string key, int findex) -> IMP::Floats"""
287 return _IMP_mpi.ReplicaExchange_get_friend_parameter(self, key, findex)
289 def do_exchange(self, myscore0, myscore1, findex):
290 r"""do_exchange(ReplicaExchange self, double myscore0, double myscore1, int findex) -> bool"""
291 return _IMP_mpi.ReplicaExchange_do_exchange(self, myscore0, myscore1, findex)
293 def create_temperatures(self, tmin, tmax, nrep):
294 r"""create_temperatures(ReplicaExchange self, double tmin, double tmax, int nrep) -> IMP::Floats"""
295 return _IMP_mpi.ReplicaExchange_create_temperatures(self, tmin, tmax, nrep)
297 def get_my_index(self):
298 r"""get_my_index(ReplicaExchange self) -> int"""
299 return _IMP_mpi.ReplicaExchange_get_my_index(self)
301 def get_number_of_replicas(self):
302 r"""get_number_of_replicas(ReplicaExchange self) -> int"""
303 return _IMP_mpi.ReplicaExchange_get_number_of_replicas(self)
305 def get_version_info(self):
306 r"""get_version_info(ReplicaExchange self) -> VersionInfo"""
307 return _IMP_mpi.ReplicaExchange_get_version_info(self)
308 __swig_destroy__ = _IMP_mpi.delete_ReplicaExchange
311 r"""__str__(ReplicaExchange self) -> std::string"""
312 return _IMP_mpi.ReplicaExchange___str__(self)
315 r"""__repr__(ReplicaExchange self) -> std::string"""
316 return _IMP_mpi.ReplicaExchange___repr__(self)
320 return _object_cast_to_ReplicaExchange(o)
324 _IMP_mpi.ReplicaExchange_swigregister(ReplicaExchange)
327 r"""get_module_version() -> std::string const"""
328 return _IMP_mpi.get_module_version()
331 r"""get_example_path(std::string fname) -> std::string"""
332 return _IMP_mpi.get_example_path(fname)
335 r"""get_data_path(std::string fname) -> std::string"""
336 return _IMP_mpi.get_data_path(fname)
338 from .
import _version_check
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.
def get_data_path
Return the full path to one of this module's data files.
Common base class for heavy weight IMP objects.