115 |
|
|
116 |
|
LinearAtomVisitor* linearVisitor = new LinearAtomVisitor(info); |
117 |
|
compositeVisitor->addVisitor(linearVisitor, 750); |
118 |
+ |
if (args_info.gb_given) { |
119 |
+ |
linearVisitor->addGayBerneAtomType(args_info.gb_arg); |
120 |
+ |
} |
121 |
|
|
122 |
|
GBLipidAtomVisitor* gbLipidVisitor = new GBLipidAtomVisitor(info); |
123 |
|
compositeVisitor->addVisitor(gbLipidVisitor, 740); |
152 |
|
|
153 |
|
//create wrapping visitor |
154 |
|
|
155 |
< |
if(args_info.periodicBox_flag){ |
156 |
< |
WrappingVisitor* wrappingVisitor = new WrappingVisitor(info); |
157 |
< |
compositeVisitor->addVisitor(wrappingVisitor, 400); |
158 |
< |
} |
155 |
> |
//if(args_info.periodicBox_flag){ |
156 |
> |
// WrappingVisitor* wrappingVisitor = new WrappingVisitor(info); |
157 |
> |
// compositeVisitor->addVisitor(wrappingVisitor, 400); |
158 |
> |
//} |
159 |
|
|
160 |
|
//create replicate visitor |
161 |
|
if(args_info.repeatX_given > 0 || args_info.repeatY_given > 0 ||args_info.repeatY_given > 0){ |
202 |
|
Molecule* mol; |
203 |
|
StuntDouble* integrableObject; |
204 |
|
RigidBody* rb; |
205 |
+ |
Vector3d molCom; |
206 |
+ |
Vector3d newMolCom; |
207 |
+ |
Vector3d displacement; |
208 |
+ |
Mat3x3d hmat; |
209 |
+ |
Snapshot* currentSnapshot; |
210 |
|
|
211 |
|
for (int i = 0; i < nframes; i += args_info.frame_arg){ |
212 |
|
dumpReader->readFrame(i); |
213 |
< |
|
213 |
> |
|
214 |
> |
//wrapping the molecule |
215 |
> |
if(args_info.periodicBox_flag) { |
216 |
> |
currentSnapshot = info->getSnapshotManager()->getCurrentSnapshot(); |
217 |
> |
for (mol = info->beginMolecule(miter); mol != NULL; mol = info->nextMolecule(miter)) { |
218 |
> |
molCom = mol->getCom(); |
219 |
> |
newMolCom = molCom; |
220 |
> |
currentSnapshot->wrapVector(newMolCom); |
221 |
> |
displacement = newMolCom - molCom; |
222 |
> |
for (integrableObject = mol->beginIntegrableObject(iiter); integrableObject != NULL; |
223 |
> |
integrableObject = mol->nextIntegrableObject(iiter)) { |
224 |
> |
integrableObject->setPos(integrableObject->getPos() + displacement); |
225 |
> |
} |
226 |
> |
} |
227 |
> |
} |
228 |
|
//update atoms of rigidbody |
229 |
|
for (mol = info->beginMolecule(miter); mol != NULL; mol = info->nextMolecule(miter)) { |
230 |
|
|