-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvbw.py
245 lines (208 loc) · 9.08 KB
/
vbw.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.8
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_vbw', [dirname(__file__)])
except ImportError:
import _vbw
return _vbw
if fp is not None:
try:
_mod = imp.load_module('_vbw', fp, pathname, description)
finally:
fp.close()
return _mod
_vbw = swig_import_helper()
del swig_import_helper
else:
import _vbw
del version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
if (name == "thisown"):
return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name, None)
if method:
return method(self, value)
if (not static):
if _newclass:
object.__setattr__(self, name, value)
else:
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self, class_type, name, value):
return _swig_setattr_nondynamic(self, class_type, name, value, 0)
def _swig_getattr_nondynamic(self, class_type, name, static=1):
if (name == "thisown"):
return self.this.own()
method = class_type.__swig_getmethods__.get(name, None)
if method:
return method(self)
if (not static):
return object.__getattr__(self, name)
else:
raise AttributeError(name)
def _swig_getattr(self, class_type, name):
return _swig_getattr_nondynamic(self, class_type, name, 0)
def _swig_repr(self):
try:
strthis = "proxy of " + self.this.__repr__()
except Exception:
strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except AttributeError:
class _object:
pass
_newclass = 0
class block(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, block, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, block, name)
__repr__ = _swig_repr
__swig_setmethods__["size"] = _vbw.block_size_set
__swig_getmethods__["size"] = _vbw.block_size_get
if _newclass:
size = _swig_property(_vbw.block_size_get, _vbw.block_size_set)
__swig_setmethods__["alphas"] = _vbw.block_alphas_set
__swig_getmethods__["alphas"] = _vbw.block_alphas_get
if _newclass:
alphas = _swig_property(_vbw.block_alphas_get, _vbw.block_alphas_set)
__swig_setmethods__["saxsExpPtr"] = _vbw.block_saxsExpPtr_set
__swig_getmethods__["saxsExpPtr"] = _vbw.block_saxsExpPtr_get
if _newclass:
saxsExpPtr = _swig_property(_vbw.block_saxsExpPtr_get, _vbw.block_saxsExpPtr_set)
__swig_setmethods__["saxsErrPtr"] = _vbw.block_saxsErrPtr_set
__swig_getmethods__["saxsErrPtr"] = _vbw.block_saxsErrPtr_get
if _newclass:
saxsErrPtr = _swig_property(_vbw.block_saxsErrPtr_get, _vbw.block_saxsErrPtr_set)
__swig_setmethods__["saxsPrePtr"] = _vbw.block_saxsPrePtr_set
__swig_getmethods__["saxsPrePtr"] = _vbw.block_saxsPrePtr_get
if _newclass:
saxsPrePtr = _swig_property(_vbw.block_saxsPrePtr_get, _vbw.block_saxsPrePtr_set)
__swig_setmethods__["saxsMixPtr"] = _vbw.block_saxsMixPtr_set
__swig_getmethods__["saxsMixPtr"] = _vbw.block_saxsMixPtr_get
if _newclass:
saxsMixPtr = _swig_property(_vbw.block_saxsMixPtr_get, _vbw.block_saxsMixPtr_set)
__swig_setmethods__["saxsScale"] = _vbw.block_saxsScale_set
__swig_getmethods__["saxsScale"] = _vbw.block_saxsScale_get
if _newclass:
saxsScale = _swig_property(_vbw.block_saxsScale_get, _vbw.block_saxsScale_set)
__swig_setmethods__["numberProcs"] = _vbw.block_numberProcs_set
__swig_getmethods__["numberProcs"] = _vbw.block_numberProcs_get
if _newclass:
numberProcs = _swig_property(_vbw.block_numberProcs_get, _vbw.block_numberProcs_set)
__swig_setmethods__["OligomericSpecies"] = _vbw.block_OligomericSpecies_set
__swig_getmethods__["OligomericSpecies"] = _vbw.block_OligomericSpecies_get
if _newclass:
OligomericSpecies = _swig_property(_vbw.block_OligomericSpecies_get, _vbw.block_OligomericSpecies_set)
__swig_setmethods__["Concentration"] = _vbw.block_Concentration_set
__swig_getmethods__["Concentration"] = _vbw.block_Concentration_get
if _newclass:
Concentration = _swig_property(_vbw.block_Concentration_get, _vbw.block_Concentration_set)
__swig_setmethods__["MonomerMass"] = _vbw.block_MonomerMass_set
__swig_getmethods__["MonomerMass"] = _vbw.block_MonomerMass_get
if _newclass:
MonomerMass = _swig_property(_vbw.block_MonomerMass_get, _vbw.block_MonomerMass_set)
__swig_setmethods__["OligomerOrder"] = _vbw.block_OligomerOrder_set
__swig_getmethods__["OligomerOrder"] = _vbw.block_OligomerOrder_get
if _newclass:
OligomerOrder = _swig_property(_vbw.block_OligomerOrder_get, _vbw.block_OligomerOrder_set)
__swig_setmethods__["numberOfCurves"] = _vbw.block_numberOfCurves_set
__swig_getmethods__["numberOfCurves"] = _vbw.block_numberOfCurves_get
if _newclass:
numberOfCurves = _swig_property(_vbw.block_numberOfCurves_get, _vbw.block_numberOfCurves_set)
__swig_setmethods__["saxsWeightsEns"] = _vbw.block_saxsWeightsEns_set
__swig_getmethods__["saxsWeightsEns"] = _vbw.block_saxsWeightsEns_get
if _newclass:
saxsWeightsEns = _swig_property(_vbw.block_saxsWeightsEns_get, _vbw.block_saxsWeightsEns_set)
__swig_setmethods__["wCurrent"] = _vbw.block_wCurrent_set
__swig_getmethods__["wCurrent"] = _vbw.block_wCurrent_get
if _newclass:
wCurrent = _swig_property(_vbw.block_wCurrent_get, _vbw.block_wCurrent_set)
__swig_setmethods__["wCurrentPrim"] = _vbw.block_wCurrentPrim_set
__swig_getmethods__["wCurrentPrim"] = _vbw.block_wCurrentPrim_get
if _newclass:
wCurrentPrim = _swig_property(_vbw.block_wCurrentPrim_get, _vbw.block_wCurrentPrim_set)
__swig_setmethods__["alphaL"] = _vbw.block_alphaL_set
__swig_getmethods__["alphaL"] = _vbw.block_alphaL_get
if _newclass:
alphaL = _swig_property(_vbw.block_alphaL_get, _vbw.block_alphaL_set)
def __init__(self):
this = _vbw.new_block()
try:
self.this.append(this)
except Exception:
self.this = this
__swig_destroy__ = _vbw.delete_block
__del__ = lambda self: None
block_swigregister = _vbw.block_swigregister
block_swigregister(block)
def block_alloc(n):
return _vbw.block_alloc(n)
block_alloc = _vbw.block_alloc
def block_free(t):
return _vbw.block_free(t)
block_free = _vbw.block_free
def block_copy(inp, outp):
return _vbw.block_copy(inp, outp)
block_copy = _vbw.block_copy
def block_copy_construct(xp):
return _vbw.block_copy_construct(xp)
block_copy_construct = _vbw.block_copy_construct
def block_destroy(xp):
return _vbw.block_destroy(xp)
block_destroy = _vbw.block_destroy
def ientropy(w, k):
return _vbw.ientropy(w, k)
ientropy = _vbw.ientropy
def jensen_shannon_div(w_a, w_b, k):
return _vbw.jensen_shannon_div(w_a, w_b, k)
jensen_shannon_div = _vbw.jensen_shannon_div
def polySolver(order, cmass_ratio, oligomeric_states, kconsts, roots):
return _vbw.polySolver(order, cmass_ratio, oligomeric_states, kconsts, roots)
polySolver = _vbw.polySolver
def find_poly_root(w_ens, w_ens_prim, ct, ct_prim, monomerMass, k, order, oligomeric_species):
return _vbw.find_poly_root(w_ens, w_ens_prim, ct, ct_prim, monomerMass, k, order, oligomeric_species)
find_poly_root = _vbw.find_poly_root
def SaxsScaleMean(saxs_ens, saxs_exp, err_saxs, N):
return _vbw.SaxsScaleMean(saxs_ens, saxs_exp, err_saxs, N)
SaxsScaleMean = _vbw.SaxsScaleMean
def SaxsScaleStandardDeviation(saxs_ens, saxs_exp, err_saxs, N, T):
return _vbw.SaxsScaleStandardDeviation(saxs_ens, saxs_exp, err_saxs, N, T)
SaxsScaleStandardDeviation = _vbw.SaxsScaleStandardDeviation
def L_function(xp):
return _vbw.L_function(xp)
L_function = _vbw.L_function
def L_distance(xp, yp):
return _vbw.L_distance(xp, yp)
L_distance = _vbw.L_distance
def L_print(xp):
return _vbw.L_print(xp)
L_print = _vbw.L_print
def L_take_step(r, xp, step_size):
return _vbw.L_take_step(r, xp, step_size)
L_take_step = _vbw.L_take_step
def run_vbw(again, k, mdfile, N, presaxsfile, Ncurves, curvesfile, filelist, monomerMass, outfile, nprocs, w_cut):
return _vbw.run_vbw(again, k, mdfile, N, presaxsfile, Ncurves, curvesfile, filelist, monomerMass, outfile, nprocs, w_cut)
run_vbw = _vbw.run_vbw
# This file is compatible with both classic and new-style classes.