35 |
|
myFF = the_ff; |
36 |
|
isFirst = 1; |
37 |
|
|
38 |
+ |
molecules = entry_plug->molecules; |
39 |
+ |
nMols = entry_plug->n_mol; |
40 |
|
|
39 |
– |
srInteractions = entry_plug->sr_interactions; |
40 |
– |
nSRI = entry_plug->n_SRI; |
41 |
– |
|
41 |
|
// give a little love back to the SimInfo object |
42 |
|
|
43 |
|
if( entry_plug->the_integrator != NULL ) delete entry_plug->the_integrator; |
50 |
|
mass[i] = entry_plug->atoms[i]->getMass(); |
51 |
|
} |
52 |
|
|
53 |
+ |
|
54 |
|
|
55 |
|
// check for constraints |
56 |
|
|
58 |
|
|
59 |
|
Constraint *temp_con; |
60 |
|
Constraint *dummy_plug; |
61 |
< |
temp_con = new Constraint[nSRI]; |
61 |
> |
temp_con = new Constraint[entry_plug->n_SRI]; |
62 |
|
n_constrained = 0; |
63 |
|
int constrained = 0; |
64 |
|
|
65 |
< |
for(int i = 0; i < nSRI; i++){ |
65 |
> |
SRI** theArray; |
66 |
> |
for(int i = 0; i < nMols; i++){ |
67 |
|
|
68 |
< |
constrained = srInteractions[i]->is_constrained(); |
69 |
< |
|
69 |
< |
if(constrained){ |
68 |
> |
theArray = (SRI**) molecules[i].getMyBonds(); |
69 |
> |
for(int j=0; j<molecules[i].getNBonds(); j++){ |
70 |
|
|
71 |
< |
dummy_plug = srInteractions[i]->get_constraint(); |
72 |
< |
temp_con[n_constrained].set_a( dummy_plug->get_a() ); |
73 |
< |
temp_con[n_constrained].set_b( dummy_plug->get_b() ); |
74 |
< |
temp_con[n_constrained].set_dsqr( dummy_plug->get_dsqr() ); |
71 |
> |
constrained = theArray[j]->is_constrained(); |
72 |
> |
|
73 |
> |
if(constrained){ |
74 |
> |
|
75 |
> |
dummy_plug = theArray[j]->get_constraint(); |
76 |
> |
temp_con[n_constrained].set_a( dummy_plug->get_a() ); |
77 |
> |
temp_con[n_constrained].set_b( dummy_plug->get_b() ); |
78 |
> |
temp_con[n_constrained].set_dsqr( dummy_plug->get_dsqr() ); |
79 |
> |
|
80 |
> |
n_constrained++; |
81 |
> |
constrained = 0; |
82 |
> |
} |
83 |
> |
} |
84 |
|
|
85 |
< |
n_constrained++; |
86 |
< |
constrained = 0; |
85 |
> |
theArray = (SRI**) molecules[i].getMyBends(); |
86 |
> |
for(int j=0; j<molecules[i].getNBends(); j++){ |
87 |
> |
|
88 |
> |
constrained = theArray[j]->is_constrained(); |
89 |
> |
|
90 |
> |
if(constrained){ |
91 |
> |
|
92 |
> |
dummy_plug = theArray[j]->get_constraint(); |
93 |
> |
temp_con[n_constrained].set_a( dummy_plug->get_a() ); |
94 |
> |
temp_con[n_constrained].set_b( dummy_plug->get_b() ); |
95 |
> |
temp_con[n_constrained].set_dsqr( dummy_plug->get_dsqr() ); |
96 |
> |
|
97 |
> |
n_constrained++; |
98 |
> |
constrained = 0; |
99 |
> |
} |
100 |
|
} |
101 |
+ |
|
102 |
+ |
theArray = (SRI**) molecules[i].getMyTorsions(); |
103 |
+ |
for(int j=0; j<molecules[i].getNTorsions(); j++){ |
104 |
+ |
|
105 |
+ |
constrained = theArray[j]->is_constrained(); |
106 |
+ |
|
107 |
+ |
if(constrained){ |
108 |
+ |
|
109 |
+ |
dummy_plug = theArray[j]->get_constraint(); |
110 |
+ |
temp_con[n_constrained].set_a( dummy_plug->get_a() ); |
111 |
+ |
temp_con[n_constrained].set_b( dummy_plug->get_b() ); |
112 |
+ |
temp_con[n_constrained].set_dsqr( dummy_plug->get_dsqr() ); |
113 |
+ |
|
114 |
+ |
n_constrained++; |
115 |
+ |
constrained = 0; |
116 |
+ |
} |
117 |
+ |
} |
118 |
|
} |
119 |
|
|
120 |
|
if(n_constrained > 0){ |