/
pyParaFit.py
82 lines (66 loc) · 2.6 KB
/
pyParaFit.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
from ParaParser import *
from CalcPara import *
from FitPara import *
from ExplorePara import *
from ParaUtils import *
print
print
print """ pyParaFit - fitting paramagnetic observables to theoretical models
pyParaFit Copyright (C) 2010 Mitchell J Stanton-Cook """
print 79*'-'
print """pyParaFit comes with ABSOLUTELY NO WARRANTY; for details read LICENCE
This is free software, and you are welcome to redistribute it
under certain conditions; read LICENCE for details. """
print 79*'-'
print
################################################################################
# EXAMPLES
################################################################################
in_1 = ['pyParaFit.py', 'pcs', 'tests/STRUCTURES/epsilon.pdb',
'tests/DATASETS/PCS/1.npc', '-3.', '-2.', '9.','-15.0', '15.0', '140', '15', '81']
#in_1 = ['pyParaFit.py', 'pcs', 'tests/STRUCTURES/epsilon.pdb',
#'tests/DATASETS/PCS/1.npc', '-5.82', '-4.10', '7.30','-16.98', '17.41',
#'139.09', '14.36', '81.85']
#pcs_1 = PCSParser(in_1)
#pcs_1.doParse()
#pcs1_calcer = CalcPara()
#pcs1_calcer.PCS(pcs_1, 'ZYZ')
#analysis = ExplorePara()
#analysis.paraDevs(pcs_1)
#pcs_fit = FitPara()
#res = pcs_fit.PCS(pcs_1, 0)
#print "x,y,z:", res[0], res[1], res[2]
#print "Ax, Rh", FromVVU(res[3]), FromVVU(res[4])
#print res[5], res[6], res[7]
#print "A,B,G", FixAngle(res[5]), FixAngle(res[6]), FixAngle(res[7])
##------------
pre_in = ['pyParaFit.py', 'pre', 'tests/STRUCTURES/2ZTAa_H_only.pdb',
'tests/DATASETS/PRE/PREdata_intra_contribution.pre', '0', '0', '0', '0']
pre_1_m1 = PREParser(pre_in)
pre_1_m1.doParse()
pre_1_m2 = PREParser(pre_in)
pre_1_m2.setModel(1)
pre_1_m2.doParse()
pre_1_calcer = CalcPara()
pre_1_calcer.PRE(pre_1_m1)
analysis = ExplorePara()
analysis.paraSummary(pre_1_m1)
#analysis.plotParaDevs(parsed)
pre_fit_calcer = FitPara()
#res = pre_fit_calcer.PRE(pre_1_m1, 3, pre_1_m2)
res = pre_fit_calcer.PRE(pre_1_m1, 1)
print "x,y,z,c", res[0], res[1], res[2], res[3]
opt_metal = zeros(3)
opt_metal[0], opt_metal[1], opt_metal[2] = res[0], res[1], res[2]
opt_c = zeros(1)
opt_c[0] = res[3]
pre_1_m1.setMetalLoc(opt_metal)
pre_1_m1.setConstant(opt_c)
pre_1_calcer.PRE(pre_1_m1)
analysis.paraSummary(pre_1_m1)
#in_2 = ['pyParaFit.py', 'pcs', 'tests/STRUCTURES/epsilon.pdb',
#'tests/DATASETS/PCS/PCS_epsilon_CNH.npc','1','1','1', '30','10','90','90','90']
#in_3 = ['pyParaFit.py', 'pcs', 'tests/STRUCTURES/epsilon.pdb',
#'tests/DATASETS/PCS/PCS_epsilon_CNH.npc','1','1','1', '30','10','90','90','90']
#in_4 = ['pyParaFit.py', 'pcs', 'tests/STRUCTURES/epsilon.pdb',
#'tests/DATASETS/PCS/PCS_epsilon_CNH.npc','1','1','1', '30','10','90','90','90']