IMP  2.0.1
The Integrative Modeling Platform
restrainer/__init__.py
1 # This file was automatically generated by SWIG (http://www.swig.org).
2 # Version 2.0.8
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 
9 from sys import version_info
10 if version_info >= (2,6,0):
11  def swig_import_helper():
12  from os.path import dirname
13  import imp
14  fp = None
15  try:
16  fp, pathname, description = imp.find_module('_IMP_restrainer', [dirname(__file__)])
17  except ImportError:
18  import _IMP_restrainer
19  return _IMP_restrainer
20  if fp is not None:
21  try:
22  _mod = imp.load_module('_IMP_restrainer', fp, pathname, description)
23  finally:
24  fp.close()
25  return _mod
26  _IMP_restrainer = swig_import_helper()
27  del swig_import_helper
28 else:
29  import _IMP_restrainer
30 del version_info
31 try:
32  _swig_property = property
33 except NameError:
34  pass # Python < 2.2 doesn't have 'property'.
35 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
36  if (name == "thisown"): return self.this.own(value)
37  if (name == "this"):
38  if type(value).__name__ == 'SwigPyObject':
39  self.__dict__[name] = value
40  return
41  method = class_type.__swig_setmethods__.get(name,None)
42  if method: return method(self,value)
43  if (not static):
44  self.__dict__[name] = value
45  else:
46  raise AttributeError("You cannot add attributes to %s" % self)
47 
48 def _swig_setattr(self,class_type,name,value):
49  return _swig_setattr_nondynamic(self,class_type,name,value,0)
50 
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)
56 
57 def _swig_repr(self):
58  try: strthis = "proxy of " + self.this.__repr__()
59  except: strthis = ""
60  return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
61 
62 try:
63  _object = object
64  _newclass = 1
65 except AttributeError:
66  class _object : pass
67  _newclass = 0
68 
69 
70 try:
71  import weakref
72  weakref_proxy = weakref.proxy
73 except:
74  weakref_proxy = lambda x: x
75 
76 
77 class IMP_RESTRAINER_SwigPyIterator(_object):
78  """Proxy of C++ swig::IMP_RESTRAINER_SwigPyIterator class"""
79  __swig_setmethods__ = {}
80  __setattr__ = lambda self, name, value: _swig_setattr(self, IMP_RESTRAINER_SwigPyIterator, name, value)
81  __swig_getmethods__ = {}
82  __getattr__ = lambda self, name: _swig_getattr(self, IMP_RESTRAINER_SwigPyIterator, name)
83  def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract")
84  __repr__ = _swig_repr
85  __swig_destroy__ = _IMP_restrainer.delete_IMP_RESTRAINER_SwigPyIterator
86  __del__ = lambda self : None;
87  def value(self):
88  """value(IMP_RESTRAINER_SwigPyIterator self) -> PyObject *"""
89  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator_value(self)
90 
91  def incr(self, n=1):
92  """
93  incr(IMP_RESTRAINER_SwigPyIterator self, size_t n=1) -> IMP_RESTRAINER_SwigPyIterator
94  incr(IMP_RESTRAINER_SwigPyIterator self) -> IMP_RESTRAINER_SwigPyIterator
95  """
96  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator_incr(self, n)
97 
98  def decr(self, n=1):
99  """
100  decr(IMP_RESTRAINER_SwigPyIterator self, size_t n=1) -> IMP_RESTRAINER_SwigPyIterator
101  decr(IMP_RESTRAINER_SwigPyIterator self) -> IMP_RESTRAINER_SwigPyIterator
102  """
103  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator_decr(self, n)
104 
105  def distance(self, *args):
106  """distance(IMP_RESTRAINER_SwigPyIterator self, IMP_RESTRAINER_SwigPyIterator x) -> ptrdiff_t"""
107  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator_distance(self, *args)
108 
109  def equal(self, *args):
110  """equal(IMP_RESTRAINER_SwigPyIterator self, IMP_RESTRAINER_SwigPyIterator x) -> bool"""
111  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator_equal(self, *args)
112 
113  def copy(self):
114  """copy(IMP_RESTRAINER_SwigPyIterator self) -> IMP_RESTRAINER_SwigPyIterator"""
115  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator_copy(self)
116 
117  def next(self):
118  """next(IMP_RESTRAINER_SwigPyIterator self) -> PyObject *"""
119  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator_next(self)
120 
121  def __next__(self):
122  """__next__(IMP_RESTRAINER_SwigPyIterator self) -> PyObject *"""
123  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator___next__(self)
124 
125  def previous(self):
126  """previous(IMP_RESTRAINER_SwigPyIterator self) -> PyObject *"""
127  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator_previous(self)
128 
129  def advance(self, *args):
130  """advance(IMP_RESTRAINER_SwigPyIterator self, ptrdiff_t n) -> IMP_RESTRAINER_SwigPyIterator"""
131  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator_advance(self, *args)
132 
133  def __eq__(self, *args):
134  """__eq__(IMP_RESTRAINER_SwigPyIterator self, IMP_RESTRAINER_SwigPyIterator x) -> bool"""
135  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator___eq__(self, *args)
136 
137  def __ne__(self, *args):
138  """__ne__(IMP_RESTRAINER_SwigPyIterator self, IMP_RESTRAINER_SwigPyIterator x) -> bool"""
139  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator___ne__(self, *args)
140 
141  def __iadd__(self, *args):
142  """__iadd__(IMP_RESTRAINER_SwigPyIterator self, ptrdiff_t n) -> IMP_RESTRAINER_SwigPyIterator"""
143  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator___iadd__(self, *args)
144 
145  def __isub__(self, *args):
146  """__isub__(IMP_RESTRAINER_SwigPyIterator self, ptrdiff_t n) -> IMP_RESTRAINER_SwigPyIterator"""
147  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator___isub__(self, *args)
148 
149  def __add__(self, *args):
150  """__add__(IMP_RESTRAINER_SwigPyIterator self, ptrdiff_t n) -> IMP_RESTRAINER_SwigPyIterator"""
151  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator___add__(self, *args)
152 
153  def __sub__(self, *args):
154  """
155  __sub__(IMP_RESTRAINER_SwigPyIterator self, ptrdiff_t n) -> IMP_RESTRAINER_SwigPyIterator
156  __sub__(IMP_RESTRAINER_SwigPyIterator self, IMP_RESTRAINER_SwigPyIterator x) -> ptrdiff_t
157  """
158  return _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator___sub__(self, *args)
159 
160  def __iter__(self): return self
161 IMP_RESTRAINER_SwigPyIterator_swigregister = _IMP_restrainer.IMP_RESTRAINER_SwigPyIterator_swigregister
162 IMP_RESTRAINER_SwigPyIterator_swigregister(IMP_RESTRAINER_SwigPyIterator)
163 
164 _value_types=[]
165 _object_types=[]
166 _raii_types=[]
167 _plural_types=[]
168 
169 IMP_HAS_DEPRECATED = _IMP_restrainer.IMP_HAS_DEPRECATED
170 IMP_DEBUG = _IMP_restrainer.IMP_DEBUG
171 IMP_RELEASE = _IMP_restrainer.IMP_RELEASE
172 IMP_SILENT = _IMP_restrainer.IMP_SILENT
173 IMP_PROGRESS = _IMP_restrainer.IMP_PROGRESS
174 IMP_TERSE = _IMP_restrainer.IMP_TERSE
175 IMP_VERBOSE = _IMP_restrainer.IMP_VERBOSE
176 IMP_NONE = _IMP_restrainer.IMP_NONE
177 IMP_USAGE = _IMP_restrainer.IMP_USAGE
178 IMP_INTERNAL = _IMP_restrainer.IMP_INTERNAL
179 IMP_COMPILER_HAS_AUTO = _IMP_restrainer.IMP_COMPILER_HAS_AUTO
180 IMP_COMPILER_HAS_DEBUG_VECTOR = _IMP_restrainer.IMP_COMPILER_HAS_DEBUG_VECTOR
181 IMP_COMPILER_HAS_NULLPTR = _IMP_restrainer.IMP_COMPILER_HAS_NULLPTR
182 IMP_BASE_HAS_BOOST_RANDOM = _IMP_restrainer.IMP_BASE_HAS_BOOST_RANDOM
183 IMP_BASE_HAS_GPERFTOOLS = _IMP_restrainer.IMP_BASE_HAS_GPERFTOOLS
184 IMP_BASE_HAS_LOG4CXX = _IMP_restrainer.IMP_BASE_HAS_LOG4CXX
185 IMP_BASE_HAS_TCMALLOC_HEAPCHECKER = _IMP_restrainer.IMP_BASE_HAS_TCMALLOC_HEAPCHECKER
186 IMP_BASE_HAS_TCMALLOC_HEAPPROFILER = _IMP_restrainer.IMP_BASE_HAS_TCMALLOC_HEAPPROFILER
187 import sys
188 class _DirectorObjects(object):
189  """@internal Simple class to keep references to director objects
190  to prevent premature deletion."""
191  def __init__(self):
192  self._objects = []
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)
198  def cleanup(self):
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]
205 
206 
207  self._objects = objs
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()
212 
213 DEFAULT_CHECK = _IMP_restrainer.DEFAULT_CHECK
214 NONE = _IMP_restrainer.NONE
215 USAGE = _IMP_restrainer.USAGE
216 USAGE_AND_INTERNAL = _IMP_restrainer.USAGE_AND_INTERNAL
217 
218 def set_check_level(*args):
219  """set_check_level(IMP::base::CheckLevel tf)"""
220  return _IMP_restrainer.set_check_level(*args)
221 
222 def get_check_level():
223  """get_check_level() -> IMP::base::CheckLevel"""
224  return _IMP_restrainer.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_restrainer._ostream_write(self, *args)
236 
237 _ostream_swigregister = _IMP_restrainer._ostream_swigregister
238 _ostream_swigregister(_ostream)
239 
240 IMP_COMPILER_HAS_OVERRIDE = _IMP_restrainer.IMP_COMPILER_HAS_OVERRIDE
241 IMP_COMPILER_HAS_FINAL = _IMP_restrainer.IMP_COMPILER_HAS_FINAL
242 import IMP.base
243 IMP_CGAL_HAS_BOOST_FILESYSTEM = _IMP_restrainer.IMP_CGAL_HAS_BOOST_FILESYSTEM
244 IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS = _IMP_restrainer.IMP_CGAL_HAS_BOOST_PROGRAMOPTIONS
245 IMP_CGAL_HAS_BOOST_RANDOM = _IMP_restrainer.IMP_CGAL_HAS_BOOST_RANDOM
246 IMP_CGAL_HAS_BOOST_SYSTEM = _IMP_restrainer.IMP_CGAL_HAS_BOOST_SYSTEM
247 import IMP.cgal
248 IMP_ALGEBRA_HAS_IMP_CGAL = _IMP_restrainer.IMP_ALGEBRA_HAS_IMP_CGAL
249 IMP_ALGEBRA_HAS_BOOST_FILESYSTEM = _IMP_restrainer.IMP_ALGEBRA_HAS_BOOST_FILESYSTEM
250 IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS = _IMP_restrainer.IMP_ALGEBRA_HAS_BOOST_PROGRAMOPTIONS
251 IMP_ALGEBRA_HAS_BOOST_RANDOM = _IMP_restrainer.IMP_ALGEBRA_HAS_BOOST_RANDOM
252 IMP_ALGEBRA_HAS_BOOST_SYSTEM = _IMP_restrainer.IMP_ALGEBRA_HAS_BOOST_SYSTEM
253 IMP_ALGEBRA_HAS_CGAL = _IMP_restrainer.IMP_ALGEBRA_HAS_CGAL
254 IMP_ALGEBRA_HAS_ANN = _IMP_restrainer.IMP_ALGEBRA_HAS_ANN
255 import IMP.algebra
256 IMP_KERNEL_HAS_IMP_CGAL = _IMP_restrainer.IMP_KERNEL_HAS_IMP_CGAL
257 IMP_KERNEL_HAS_BOOST_PROGRAMOPTIONS = _IMP_restrainer.IMP_KERNEL_HAS_BOOST_PROGRAMOPTIONS
258 IMP_KERNEL_HAS_BOOST_RANDOM = _IMP_restrainer.IMP_KERNEL_HAS_BOOST_RANDOM
259 IMP_KERNEL_HAS_BOOST_SYSTEM = _IMP_restrainer.IMP_KERNEL_HAS_BOOST_SYSTEM
260 IMP_KERNEL_HAS_CGAL = _IMP_restrainer.IMP_KERNEL_HAS_CGAL
261 import IMP.kernel
262 IMP_DISPLAY_HAS_IMP_BASE = _IMP_restrainer.IMP_DISPLAY_HAS_IMP_BASE
263 IMP_DISPLAY_HAS_IMP_CGAL = _IMP_restrainer.IMP_DISPLAY_HAS_IMP_CGAL
264 IMP_DISPLAY_HAS_BOOST_FILESYSTEM = _IMP_restrainer.IMP_DISPLAY_HAS_BOOST_FILESYSTEM
265 IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS = _IMP_restrainer.IMP_DISPLAY_HAS_BOOST_PROGRAMOPTIONS
266 IMP_DISPLAY_HAS_BOOST_RANDOM = _IMP_restrainer.IMP_DISPLAY_HAS_BOOST_RANDOM
267 IMP_DISPLAY_HAS_BOOST_SYSTEM = _IMP_restrainer.IMP_DISPLAY_HAS_BOOST_SYSTEM
268 IMP_DISPLAY_HAS_CGAL = _IMP_restrainer.IMP_DISPLAY_HAS_CGAL
269 import IMP.display
270 IMP_SCORE_FUNCTOR_HAS_IMP_CGAL = _IMP_restrainer.IMP_SCORE_FUNCTOR_HAS_IMP_CGAL
271 IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM = _IMP_restrainer.IMP_SCORE_FUNCTOR_HAS_BOOST_FILESYSTEM
272 IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS = _IMP_restrainer.IMP_SCORE_FUNCTOR_HAS_BOOST_PROGRAMOPTIONS
273 IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM = _IMP_restrainer.IMP_SCORE_FUNCTOR_HAS_BOOST_RANDOM
274 IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM = _IMP_restrainer.IMP_SCORE_FUNCTOR_HAS_BOOST_SYSTEM
275 IMP_SCORE_FUNCTOR_HAS_CGAL = _IMP_restrainer.IMP_SCORE_FUNCTOR_HAS_CGAL
276 import IMP.score_functor
277 IMP_STATISTICS_HAS_IMP_BASE = _IMP_restrainer.IMP_STATISTICS_HAS_IMP_BASE
278 IMP_STATISTICS_HAS_IMP_CGAL = _IMP_restrainer.IMP_STATISTICS_HAS_IMP_CGAL
279 IMP_STATISTICS_HAS_BOOST_FILESYSTEM = _IMP_restrainer.IMP_STATISTICS_HAS_BOOST_FILESYSTEM
280 IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS = _IMP_restrainer.IMP_STATISTICS_HAS_BOOST_PROGRAMOPTIONS
281 IMP_STATISTICS_HAS_BOOST_RANDOM = _IMP_restrainer.IMP_STATISTICS_HAS_BOOST_RANDOM
282 IMP_STATISTICS_HAS_BOOST_SYSTEM = _IMP_restrainer.IMP_STATISTICS_HAS_BOOST_SYSTEM
283 IMP_STATISTICS_HAS_CGAL = _IMP_restrainer.IMP_STATISTICS_HAS_CGAL
284 import IMP.statistics
285 IMP_CORE_HAS_IMP_BASE = _IMP_restrainer.IMP_CORE_HAS_IMP_BASE
286 IMP_CORE_HAS_IMP_CGAL = _IMP_restrainer.IMP_CORE_HAS_IMP_CGAL
287 IMP_CORE_HAS_IMP_KERNEL = _IMP_restrainer.IMP_CORE_HAS_IMP_KERNEL
288 IMP_CORE_HAS_BOOST_FILESYSTEM = _IMP_restrainer.IMP_CORE_HAS_BOOST_FILESYSTEM
289 IMP_CORE_HAS_BOOST_PROGRAMOPTIONS = _IMP_restrainer.IMP_CORE_HAS_BOOST_PROGRAMOPTIONS
290 IMP_CORE_HAS_BOOST_RANDOM = _IMP_restrainer.IMP_CORE_HAS_BOOST_RANDOM
291 IMP_CORE_HAS_BOOST_SYSTEM = _IMP_restrainer.IMP_CORE_HAS_BOOST_SYSTEM
292 IMP_CORE_HAS_CGAL = _IMP_restrainer.IMP_CORE_HAS_CGAL
293 import IMP.core
294 IMP_CONTAINER_HAS_IMP_ALGEBRA = _IMP_restrainer.IMP_CONTAINER_HAS_IMP_ALGEBRA
295 IMP_CONTAINER_HAS_IMP_BASE = _IMP_restrainer.IMP_CONTAINER_HAS_IMP_BASE
296 IMP_CONTAINER_HAS_IMP_CGAL = _IMP_restrainer.IMP_CONTAINER_HAS_IMP_CGAL
297 IMP_CONTAINER_HAS_IMP_DISPLAY = _IMP_restrainer.IMP_CONTAINER_HAS_IMP_DISPLAY
298 IMP_CONTAINER_HAS_IMP_KERNEL = _IMP_restrainer.IMP_CONTAINER_HAS_IMP_KERNEL
299 IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_restrainer.IMP_CONTAINER_HAS_IMP_SCORE_FUNCTOR
300 IMP_CONTAINER_HAS_BOOST_FILESYSTEM = _IMP_restrainer.IMP_CONTAINER_HAS_BOOST_FILESYSTEM
301 IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_restrainer.IMP_CONTAINER_HAS_BOOST_PROGRAMOPTIONS
302 IMP_CONTAINER_HAS_BOOST_RANDOM = _IMP_restrainer.IMP_CONTAINER_HAS_BOOST_RANDOM
303 IMP_CONTAINER_HAS_BOOST_SYSTEM = _IMP_restrainer.IMP_CONTAINER_HAS_BOOST_SYSTEM
304 IMP_CONTAINER_HAS_CGAL = _IMP_restrainer.IMP_CONTAINER_HAS_CGAL
305 import IMP.container
306 IMP_ATOM_HAS_IMP_BASE = _IMP_restrainer.IMP_ATOM_HAS_IMP_BASE
307 IMP_ATOM_HAS_IMP_CGAL = _IMP_restrainer.IMP_ATOM_HAS_IMP_CGAL
308 IMP_ATOM_HAS_IMP_KERNEL = _IMP_restrainer.IMP_ATOM_HAS_IMP_KERNEL
309 IMP_ATOM_HAS_IMP_SCORE_FUNCTOR = _IMP_restrainer.IMP_ATOM_HAS_IMP_SCORE_FUNCTOR
310 IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS = _IMP_restrainer.IMP_ATOM_HAS_BOOST_PROGRAMOPTIONS
311 IMP_ATOM_HAS_BOOST_RANDOM = _IMP_restrainer.IMP_ATOM_HAS_BOOST_RANDOM
312 IMP_ATOM_HAS_BOOST_REGEX = _IMP_restrainer.IMP_ATOM_HAS_BOOST_REGEX
313 IMP_ATOM_HAS_BOOST_SYSTEM = _IMP_restrainer.IMP_ATOM_HAS_BOOST_SYSTEM
314 IMP_ATOM_HAS_CGAL = _IMP_restrainer.IMP_ATOM_HAS_CGAL
315 IMP_ATOM_TYPE_INDEX = _IMP_restrainer.IMP_ATOM_TYPE_INDEX
316 IMP_RESIDUE_TYPE_INDEX = _IMP_restrainer.IMP_RESIDUE_TYPE_INDEX
317 IMP_HIERARCHY_TYPE_INDEX = _IMP_restrainer.IMP_HIERARCHY_TYPE_INDEX
318 import IMP.atom
319 IMP_EM_HAS_IMP_CGAL = _IMP_restrainer.IMP_EM_HAS_IMP_CGAL
320 IMP_EM_HAS_IMP_CONTAINER = _IMP_restrainer.IMP_EM_HAS_IMP_CONTAINER
321 IMP_EM_HAS_IMP_DISPLAY = _IMP_restrainer.IMP_EM_HAS_IMP_DISPLAY
322 IMP_EM_HAS_IMP_KERNEL = _IMP_restrainer.IMP_EM_HAS_IMP_KERNEL
323 IMP_EM_HAS_IMP_SCORE_FUNCTOR = _IMP_restrainer.IMP_EM_HAS_IMP_SCORE_FUNCTOR
324 IMP_EM_HAS_BOOST_FILESYSTEM = _IMP_restrainer.IMP_EM_HAS_BOOST_FILESYSTEM
325 IMP_EM_HAS_BOOST_PROGRAMOPTIONS = _IMP_restrainer.IMP_EM_HAS_BOOST_PROGRAMOPTIONS
326 IMP_EM_HAS_BOOST_RANDOM = _IMP_restrainer.IMP_EM_HAS_BOOST_RANDOM
327 IMP_EM_HAS_BOOST_REGEX = _IMP_restrainer.IMP_EM_HAS_BOOST_REGEX
328 IMP_EM_HAS_BOOST_SYSTEM = _IMP_restrainer.IMP_EM_HAS_BOOST_SYSTEM
329 IMP_EM_HAS_CGAL = _IMP_restrainer.IMP_EM_HAS_CGAL
330 import IMP.em
331 IMP_SAXS_HAS_IMP_BASE = _IMP_restrainer.IMP_SAXS_HAS_IMP_BASE
332 IMP_SAXS_HAS_IMP_CGAL = _IMP_restrainer.IMP_SAXS_HAS_IMP_CGAL
333 IMP_SAXS_HAS_IMP_CONTAINER = _IMP_restrainer.IMP_SAXS_HAS_IMP_CONTAINER
334 IMP_SAXS_HAS_IMP_DISPLAY = _IMP_restrainer.IMP_SAXS_HAS_IMP_DISPLAY
335 IMP_SAXS_HAS_IMP_KERNEL = _IMP_restrainer.IMP_SAXS_HAS_IMP_KERNEL
336 IMP_SAXS_HAS_IMP_SCORE_FUNCTOR = _IMP_restrainer.IMP_SAXS_HAS_IMP_SCORE_FUNCTOR
337 IMP_SAXS_HAS_BOOST_FILESYSTEM = _IMP_restrainer.IMP_SAXS_HAS_BOOST_FILESYSTEM
338 IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS = _IMP_restrainer.IMP_SAXS_HAS_BOOST_PROGRAMOPTIONS
339 IMP_SAXS_HAS_BOOST_RANDOM = _IMP_restrainer.IMP_SAXS_HAS_BOOST_RANDOM
340 IMP_SAXS_HAS_BOOST_REGEX = _IMP_restrainer.IMP_SAXS_HAS_BOOST_REGEX
341 IMP_SAXS_HAS_BOOST_SYSTEM = _IMP_restrainer.IMP_SAXS_HAS_BOOST_SYSTEM
342 IMP_SAXS_HAS_CGAL = _IMP_restrainer.IMP_SAXS_HAS_CGAL
343 import IMP.saxs
344 IMP_RESTRAINER_HAS_IMP_ALGEBRA = _IMP_restrainer.IMP_RESTRAINER_HAS_IMP_ALGEBRA
345 IMP_RESTRAINER_HAS_IMP_BASE = _IMP_restrainer.IMP_RESTRAINER_HAS_IMP_BASE
346 IMP_RESTRAINER_HAS_IMP_CGAL = _IMP_restrainer.IMP_RESTRAINER_HAS_IMP_CGAL
347 IMP_RESTRAINER_HAS_IMP_CONTAINER = _IMP_restrainer.IMP_RESTRAINER_HAS_IMP_CONTAINER
348 IMP_RESTRAINER_HAS_IMP_DISPLAY = _IMP_restrainer.IMP_RESTRAINER_HAS_IMP_DISPLAY
349 IMP_RESTRAINER_HAS_IMP_KERNEL = _IMP_restrainer.IMP_RESTRAINER_HAS_IMP_KERNEL
350 IMP_RESTRAINER_HAS_IMP_SCORE_FUNCTOR = _IMP_restrainer.IMP_RESTRAINER_HAS_IMP_SCORE_FUNCTOR
351 IMP_RESTRAINER_HAS_IMP_STATISTICS = _IMP_restrainer.IMP_RESTRAINER_HAS_IMP_STATISTICS
352 IMP_RESTRAINER_HAS_BOOST_FILESYSTEM = _IMP_restrainer.IMP_RESTRAINER_HAS_BOOST_FILESYSTEM
353 IMP_RESTRAINER_HAS_BOOST_PROGRAMOPTIONS = _IMP_restrainer.IMP_RESTRAINER_HAS_BOOST_PROGRAMOPTIONS
354 IMP_RESTRAINER_HAS_BOOST_RANDOM = _IMP_restrainer.IMP_RESTRAINER_HAS_BOOST_RANDOM
355 IMP_RESTRAINER_HAS_BOOST_REGEX = _IMP_restrainer.IMP_RESTRAINER_HAS_BOOST_REGEX
356 IMP_RESTRAINER_HAS_BOOST_SYSTEM = _IMP_restrainer.IMP_RESTRAINER_HAS_BOOST_SYSTEM
357 IMP_RESTRAINER_HAS_CGAL = _IMP_restrainer.IMP_RESTRAINER_HAS_CGAL
358 SimpleConnectivities=list
359 _plural_types.append("SimpleConnectivities")
360 _value_types.append("SimpleConnectivity")
361 
362 SimpleDistances=list
363 _plural_types.append("SimpleDistances")
364 _value_types.append("SimpleDistance")
365 
366 SimpleDiameters=list
367 _plural_types.append("SimpleDiameters")
368 _value_types.append("SimpleDiameter")
369 
370 SimpleExcludedVolumes=list
371 _plural_types.append("SimpleExcludedVolumes")
372 _value_types.append("SimpleExcludedVolume")
373 
374 SimpleEMFits=list
375 _plural_types.append("SimpleEMFits")
376 _value_types.append("SimpleEMFit")
377 
378 import _representation
379 import _restraint
380 import _xml_parser
381 import _display
382 import _optimization
383 import _main
384 
385 class Representation(_representation.Representation):
386  """Store Representation."""
387  def __init__(self):
388  _representation.Representation.__init__(self)
389  def get_imp_hierarchy_by_id(self, id):
390  """Return an IMP::atom::Hierarchy by particle id.
391  @param id Particle id.
392  @return An IMP::atom::Hierarchy hierarchy."""
393  return _representation.Representation.get_imp_hierarchy_by_id(self,id)
394 
395  def get_root_imp_hierarchy(self):
396  """Return the root of the IMP::atom::Hierarchy"""
397  return _representation.Representation.get_root_imp_hierarchy(self)
398 
399  def find_all_by_id(self, id): # assuming there are many obj with the same id
400  """Return a list of all nodes that have the id given by the parameter"""
401  return _representation.Representation.gind_all_by_id(self, id)
402 
403  def find_by_id(self, id): # assuming there is just one obj with the same id
404  """Return a node that have the id given by the parameter"""
405  return _representation.Representation.find_by_id(self,id)
406 
407  def get_model(self, model=None):
408  """Return an IMP::Model that contains the representation"""
409  return _representation.Representation.get_model(self, model)
410 
411 class Restraint(_restraint.Restraint):
412  """Store Restraint"""
413  def __init__(self):
414  """"""
415  _restraint.Restraint.__init__(self)
416 
417  def add_to_representation(self, repr):
418  """ Place restraint into IMP Model."""
419  return _restraint.Restraint.add_to_representation(self, repr)
420 
421  def show_all_restraints(self):
422  """Show restraint name, initial weight, and score for the current state of the model"""
423  return _restraint.Restraint.show_all_restraints(self)
424 
425 
426  def get_all_restraints_by_name(self, name):
427  """Assuming there are many restraint objects with the same name.
428  @param[in] name The name to search for"""
429  return _restraint.Restraint.get_all_restraints_by_name(self,name)
430 
431  def get_restraint_by_name(self, name):
432  """Assuming there is just one restraint object with the same name."""
433  return restraint.Restraint.get_restraint_by_name(self,name)
434 
435  def get_rigid_body_by_id(self, id):
436  """Get rigid body by particle id."""
437  return _restraint.Restraint.get_rigid_body_by_id(self,id)
438 
439 
440  def get_all_rigid_bodies(self):
441  """Get all rigid bodies."""
442  return _restraint.Restraint.get_all_rigid_bodies(self)
443 
444 class XMLRepresentation(_xml_parser.XMLRepresentation):
445  """Construct Representation from XML file"""
446  def __init__(self, filename):
447  _xml_parser.XMLRepresentation.__init__(self, filename)
448  def run(self):
449  """Return IMP.restrainer.Representation
450  object such that each node in the representation
451  corresponds to the node in the XML nodes"""
452  return _xml_parser.XMLRepresentation.run(self)
453 
454 class XMLDisplay(_xml_parser.XMLDisplay):
455  """Construct Display from XML file"""
456  def __init__(self, filename):
457  _xml_parser.XMLDisplay.__init__(self, filename)
458 
459  def run(self):
460  """Return display object such that each node in the display
461  corresponds to the node in the XML nodes"""
462  return _xml_parser.XMLDisplay.run(self)
463 
464 class XMLRestraint(_xml_parser.XMLRestraint):
465  """Construct Restraint from XML file"""
466  def __init__(self, filename):
467  """ @param[in] filename the name of the file to read """
468  _xml_parser.XMLRestraint.__init__(self, filename)
469  def run(self):
470  """Return
471  <a href="classIMP_1_1restrainer_1_1restraint_1_1Restraint.html">
472  Restraint</a>
473  object such that each node in the restraint
474  corresponds to the node in the XML nodes"""
475  return _xml_parser.XMLRestraint.run(self)
476 
477 class XMLOptimization(_xml_parser.XMLOptimization):
478  def __init__(self, filename):
479  _xml_parser.XMLOptimization.__init__(self, filename)
480  def run(self):
481  return _xml_parser.XMLOptimization.run(self)
482 
483 class Display(_display.Display):
484  """A class to display the configuration"""
485  def __init__(self):
486  _display.Display.__init__(self)
487 
488  def create_log(self, repr, log_name):
489  """Create Chimera log.
490  @param repr <a href="classIMP_1_1restrainer_1_1representation_1_1Representation.html">
491  Representation</a> object.
492  @param log_name Log name
493  @return IMP::dispay::WriteOptimizerState"""
494  return _display.Display.create_log(self, repr, log_name)
495 
496 class Main(_main.Main):
497  def __init__(self):
498  _main.Main.__init__(self)
499  def add_representation(self, fname):
500  return _main.Main.add_representation(self, fname)
501  def add_restraint(self, fname):
502  return _main.Main.add_restraint(self, fname)
503  def add_optimization(self, fname):
504  return _main.Main.add_optimization(self, fname)
505  def add_display(self, fname, logname=None):
506  return _main.Main.add_display(self, fname, logname)
507  def optimize(self):
508  _main.Main.optimize(self)
509  def get_model(self):
510  return _main.Main.get_model(self)
511 
512 
513 
514 def create_simple_connectivity_on_rigid_bodies(*args):
515  """
516  create_simple_connectivity_on_rigid_bodies(IMP::core::RigidBodies const & rbs, Refiner ref=IMP::core::internal::get_rigid_members_refiner()) -> SimpleConnectivity
517  create_simple_connectivity_on_rigid_bodies(IMP::core::RigidBodies const & rbs) -> SimpleConnectivity
518  """
519  return _IMP_restrainer.create_simple_connectivity_on_rigid_bodies(*args)
520 
521 def create_simple_connectivity_on_molecules(*args):
522  """create_simple_connectivity_on_molecules(IMP::atom::Hierarchies const & mhs) -> SimpleConnectivity"""
523  return _IMP_restrainer.create_simple_connectivity_on_molecules(*args)
524 
525 def create_simple_distance(*args):
526  """create_simple_distance(IMP::kernel::Particles const & ps) -> SimpleDistance"""
527  return _IMP_restrainer.create_simple_distance(*args)
528 
529 def create_simple_diameter(*args):
530  """create_simple_diameter(IMP::kernel::Particles const & ps, IMP::Float diameter) -> SimpleDiameter"""
531  return _IMP_restrainer.create_simple_diameter(*args)
532 
533 def create_simple_excluded_volume_on_rigid_bodies(*args):
534  """
535  create_simple_excluded_volume_on_rigid_bodies(IMP::core::RigidBodies const & rbs, Refiner ref=IMP::core::internal::get_rigid_members_refiner()) -> SimpleExcludedVolume
536  create_simple_excluded_volume_on_rigid_bodies(IMP::core::RigidBodies const & rbs) -> SimpleExcludedVolume
537  """
538  return _IMP_restrainer.create_simple_excluded_volume_on_rigid_bodies(*args)
539 
540 def create_simple_excluded_volume_on_molecules(*args):
541  """create_simple_excluded_volume_on_molecules(IMP::atom::Hierarchies const & mhs) -> SimpleExcludedVolume"""
542  return _IMP_restrainer.create_simple_excluded_volume_on_molecules(*args)
543 
544 def create_simple_em_fit(*args):
545  """
546  create_simple_em_fit(IMP::atom::Hierarchies const & mhs, DensityMap dmap) -> SimpleEMFit
547  create_simple_em_fit(Hierarchy mh, DensityMap dmap) -> SimpleEMFit
548  """
549  return _IMP_restrainer.create_simple_em_fit(*args)
550 
551 def load_em_density_map(*args):
552  """load_em_density_map(char const * map_fn, float spacing, float resolution) -> DensityMap"""
553  return _IMP_restrainer.load_em_density_map(*args)
554 
555 def set_rigid_bodies(*args):
556  """set_rigid_bodies(IMP::atom::Hierarchies const & mhs) -> IMP::core::RigidBodies"""
557  return _IMP_restrainer.set_rigid_bodies(*args)
558 class SimpleConnectivity(_object):
559  """Proxy of C++ IMP::restrainer::SimpleConnectivity class"""
560  __swig_setmethods__ = {}
561  __setattr__ = lambda self, name, value: _swig_setattr(self, SimpleConnectivity, name, value)
562  __swig_getmethods__ = {}
563  __getattr__ = lambda self, name: _swig_getattr(self, SimpleConnectivity, name)
564  def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
565  def get_restraint(self):
566  """get_restraint(SimpleConnectivity self) -> ConnectivityRestraint"""
567  return _IMP_restrainer.SimpleConnectivity_get_restraint(self)
568 
569  def get_harmonic_upper_bound(self):
570  """get_harmonic_upper_bound(SimpleConnectivity self) -> HarmonicUpperBound"""
571  return _IMP_restrainer.SimpleConnectivity_get_harmonic_upper_bound(self)
572 
573  def get_sphere_distance_pair_score(self):
574  """get_sphere_distance_pair_score(SimpleConnectivity self) -> SphereDistancePairScore"""
575  return _IMP_restrainer.SimpleConnectivity_get_sphere_distance_pair_score(self)
576 
577  def set_mean(self, *args):
578  """set_mean(SimpleConnectivity self, IMP::Float mean)"""
579  return _IMP_restrainer.SimpleConnectivity_set_mean(self, *args)
580 
581  def set_standard_deviation(self, *args):
582  """set_standard_deviation(SimpleConnectivity self, IMP::Float sd)"""
583  return _IMP_restrainer.SimpleConnectivity_set_standard_deviation(self, *args)
584 
585  def set_k(self, *args):
586  """set_k(SimpleConnectivity self, IMP::Float k)"""
587  return _IMP_restrainer.SimpleConnectivity_set_k(self, *args)
588 
589  def get_version_info(self):
590  """get_version_info(SimpleConnectivity self) -> IMP::kernel::VersionInfo"""
591  return _IMP_restrainer.SimpleConnectivity_get_version_info(self)
592 
593  def show(self, *args):
594  """
595  show(SimpleConnectivity self, _ostream out=std::cout)
596  show(SimpleConnectivity self)
597  """
598  return _IMP_restrainer.SimpleConnectivity_show(self, *args)
599 
600  def __str__(self):
601  """__str__(SimpleConnectivity self) -> std::string"""
602  return _IMP_restrainer.SimpleConnectivity___str__(self)
603 
604  def __repr__(self):
605  """__repr__(SimpleConnectivity self) -> std::string"""
606  return _IMP_restrainer.SimpleConnectivity___repr__(self)
607 
608  __swig_destroy__ = _IMP_restrainer.delete_SimpleConnectivity
609  __del__ = lambda self : None;
610 SimpleConnectivity_swigregister = _IMP_restrainer.SimpleConnectivity_swigregister
611 SimpleConnectivity_swigregister(SimpleConnectivity)
612 
613 class SimpleDistance(_object):
614  """Proxy of C++ IMP::restrainer::SimpleDistance class"""
615  __swig_setmethods__ = {}
616  __setattr__ = lambda self, name, value: _swig_setattr(self, SimpleDistance, name, value)
617  __swig_getmethods__ = {}
618  __getattr__ = lambda self, name: _swig_getattr(self, SimpleDistance, name)
619  def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
620  def get_restraint(self):
621  """get_restraint(SimpleDistance self) -> DistanceRestraint"""
622  return _IMP_restrainer.SimpleDistance_get_restraint(self)
623 
624  def get_harmonic_upper_bound(self):
625  """get_harmonic_upper_bound(SimpleDistance self) -> HarmonicUpperBound"""
626  return _IMP_restrainer.SimpleDistance_get_harmonic_upper_bound(self)
627 
628  def set_mean(self, *args):
629  """set_mean(SimpleDistance self, IMP::Float mean)"""
630  return _IMP_restrainer.SimpleDistance_set_mean(self, *args)
631 
632  def set_standard_deviation(self, *args):
633  """set_standard_deviation(SimpleDistance self, IMP::Float sd)"""
634  return _IMP_restrainer.SimpleDistance_set_standard_deviation(self, *args)
635 
636  def set_k(self, *args):
637  """set_k(SimpleDistance self, IMP::Float k)"""
638  return _IMP_restrainer.SimpleDistance_set_k(self, *args)
639 
640  def get_version_info(self):
641  """get_version_info(SimpleDistance self) -> IMP::kernel::VersionInfo"""
642  return _IMP_restrainer.SimpleDistance_get_version_info(self)
643 
644  def show(self, *args):
645  """
646  show(SimpleDistance self, _ostream out=std::cout)
647  show(SimpleDistance self)
648  """
649  return _IMP_restrainer.SimpleDistance_show(self, *args)
650 
651  def __str__(self):
652  """__str__(SimpleDistance self) -> std::string"""
653  return _IMP_restrainer.SimpleDistance___str__(self)
654 
655  def __repr__(self):
656  """__repr__(SimpleDistance self) -> std::string"""
657  return _IMP_restrainer.SimpleDistance___repr__(self)
658 
659  __swig_destroy__ = _IMP_restrainer.delete_SimpleDistance
660  __del__ = lambda self : None;
661 SimpleDistance_swigregister = _IMP_restrainer.SimpleDistance_swigregister
662 SimpleDistance_swigregister(SimpleDistance)
663 
664 class SimpleDiameter(_object):
665  """Proxy of C++ IMP::restrainer::SimpleDiameter class"""
666  __swig_setmethods__ = {}
667  __setattr__ = lambda self, name, value: _swig_setattr(self, SimpleDiameter, name, value)
668  __swig_getmethods__ = {}
669  __getattr__ = lambda self, name: _swig_getattr(self, SimpleDiameter, name)
670  def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
671  def get_restraint(self):
672  """get_restraint(SimpleDiameter self) -> DiameterRestraint"""
673  return _IMP_restrainer.SimpleDiameter_get_restraint(self)
674 
675  def get_harmonic_upper_bound(self):
676  """get_harmonic_upper_bound(SimpleDiameter self) -> HarmonicUpperBound"""
677  return _IMP_restrainer.SimpleDiameter_get_harmonic_upper_bound(self)
678 
679  def set_mean(self, *args):
680  """set_mean(SimpleDiameter self, IMP::Float mean)"""
681  return _IMP_restrainer.SimpleDiameter_set_mean(self, *args)
682 
683  def set_standard_deviation(self, *args):
684  """set_standard_deviation(SimpleDiameter self, IMP::Float sd)"""
685  return _IMP_restrainer.SimpleDiameter_set_standard_deviation(self, *args)
686 
687  def set_k(self, *args):
688  """set_k(SimpleDiameter self, IMP::Float k)"""
689  return _IMP_restrainer.SimpleDiameter_set_k(self, *args)
690 
691  def get_version_info(self):
692  """get_version_info(SimpleDiameter self) -> IMP::kernel::VersionInfo"""
693  return _IMP_restrainer.SimpleDiameter_get_version_info(self)
694 
695  def show(self, *args):
696  """
697  show(SimpleDiameter self, _ostream out=std::cout)
698  show(SimpleDiameter self)
699  """
700  return _IMP_restrainer.SimpleDiameter_show(self, *args)
701 
702  def __str__(self):
703  """__str__(SimpleDiameter self) -> std::string"""
704  return _IMP_restrainer.SimpleDiameter___str__(self)
705 
706  def __repr__(self):
707  """__repr__(SimpleDiameter self) -> std::string"""
708  return _IMP_restrainer.SimpleDiameter___repr__(self)
709 
710  __swig_destroy__ = _IMP_restrainer.delete_SimpleDiameter
711  __del__ = lambda self : None;
712 SimpleDiameter_swigregister = _IMP_restrainer.SimpleDiameter_swigregister
713 SimpleDiameter_swigregister(SimpleDiameter)
714 
715 class SimpleExcludedVolume(_object):
716  """Proxy of C++ IMP::restrainer::SimpleExcludedVolume class"""
717  __swig_setmethods__ = {}
718  __setattr__ = lambda self, name, value: _swig_setattr(self, SimpleExcludedVolume, name, value)
719  __swig_getmethods__ = {}
720  __getattr__ = lambda self, name: _swig_getattr(self, SimpleExcludedVolume, name)
721  def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
722  def get_restraint(self):
723  """get_restraint(SimpleExcludedVolume self) -> ExcludedVolumeRestraint"""
724  return _IMP_restrainer.SimpleExcludedVolume_get_restraint(self)
725 
726  def get_version_info(self):
727  """get_version_info(SimpleExcludedVolume self) -> IMP::kernel::VersionInfo"""
728  return _IMP_restrainer.SimpleExcludedVolume_get_version_info(self)
729 
730  def show(self, *args):
731  """
732  show(SimpleExcludedVolume self, _ostream out=std::cout)
733  show(SimpleExcludedVolume self)
734  """
735  return _IMP_restrainer.SimpleExcludedVolume_show(self, *args)
736 
737  def __str__(self):
738  """__str__(SimpleExcludedVolume self) -> std::string"""
739  return _IMP_restrainer.SimpleExcludedVolume___str__(self)
740 
741  def __repr__(self):
742  """__repr__(SimpleExcludedVolume self) -> std::string"""
743  return _IMP_restrainer.SimpleExcludedVolume___repr__(self)
744 
745  __swig_destroy__ = _IMP_restrainer.delete_SimpleExcludedVolume
746  __del__ = lambda self : None;
747 SimpleExcludedVolume_swigregister = _IMP_restrainer.SimpleExcludedVolume_swigregister
748 SimpleExcludedVolume_swigregister(SimpleExcludedVolume)
749 
750 class SimpleEMFit(_object):
751  """Proxy of C++ IMP::restrainer::SimpleEMFit class"""
752  __swig_setmethods__ = {}
753  __setattr__ = lambda self, name, value: _swig_setattr(self, SimpleEMFit, name, value)
754  __swig_getmethods__ = {}
755  __getattr__ = lambda self, name: _swig_getattr(self, SimpleEMFit, name)
756  def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
757  def get_restraint(self):
758  """get_restraint(SimpleEMFit self) -> FitRestraint"""
759  return _IMP_restrainer.SimpleEMFit_get_restraint(self)
760 
761  def get_version_info(self):
762  """get_version_info(SimpleEMFit self) -> IMP::kernel::VersionInfo"""
763  return _IMP_restrainer.SimpleEMFit_get_version_info(self)
764 
765  def show(self, *args):
766  """
767  show(SimpleEMFit self, _ostream out=std::cout)
768  show(SimpleEMFit self)
769  """
770  return _IMP_restrainer.SimpleEMFit_show(self, *args)
771 
772  def __str__(self):
773  """__str__(SimpleEMFit self) -> std::string"""
774  return _IMP_restrainer.SimpleEMFit___str__(self)
775 
776  def __repr__(self):
777  """__repr__(SimpleEMFit self) -> std::string"""
778  return _IMP_restrainer.SimpleEMFit___repr__(self)
779 
780  __swig_destroy__ = _IMP_restrainer.delete_SimpleEMFit
781  __del__ = lambda self : None;
782 SimpleEMFit_swigregister = _IMP_restrainer.SimpleEMFit_swigregister
783 SimpleEMFit_swigregister(SimpleEMFit)
784 
785 
786 def get_module_version():
787  """get_module_version() -> std::string const"""
788  return _IMP_restrainer.get_module_version()
789 
790 def get_example_path(*args):
791  """get_example_path(std::string fname) -> std::string"""
792  return _IMP_restrainer.get_example_path(*args)
793 
794 def get_data_path(*args):
795  """get_data_path(std::string fname) -> std::string"""
796  return _IMP_restrainer.get_data_path(*args)
797 import _version_check
798 _version_check.check_version(get_module_version())
799 
800 # This file is compatible with both classic and new-style classes.
801 
802