| 57 |  | #include "selection/SelectionEvaluator.hpp" | 
| 58 |  | #include "selection/SelectionManager.hpp" | 
| 59 |  | #include "visitors/LipidTransVisitor.hpp" | 
| 60 | + | #include "visitors/AtomNameVisitor.hpp" | 
| 61 |  |  | 
| 62 |  | using namespace oopse; | 
| 63 |  |  | 
| 100 |  |  | 
| 101 |  |  | 
| 102 |  |  | 
| 103 | < | //creat visitor list | 
| 103 | > | //create visitor list | 
| 104 |  | CompositeVisitor* compositeVisitor = new CompositeVisitor(); | 
| 105 |  |  | 
| 106 | < | //creat RigidBody Visitor | 
| 106 | > | //create RigidBody Visitor | 
| 107 |  | if(args_info.rigidbody_flag){ | 
| 108 |  | RBCOMVisitor* rbCOMVisitor = new RBCOMVisitor(info); | 
| 109 |  | compositeVisitor->addVisitor(rbCOMVisitor, 900); | 
| 110 |  | } | 
| 111 |  |  | 
| 112 | < | //creat SSD atom visitor | 
| 112 | > | //create SSD atom visitor | 
| 113 |  | SSDAtomVisitor* ssdVisitor = new SSDAtomVisitor(info); | 
| 114 |  | compositeVisitor->addVisitor(ssdVisitor, 800); | 
| 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 | < | //creat default atom visitor | 
| 122 | > | GBLipidAtomVisitor* gbLipidVisitor = new GBLipidAtomVisitor(info); | 
| 123 | > | compositeVisitor->addVisitor(gbLipidVisitor, 740); | 
| 124 | > |  | 
| 125 | > | //create default atom visitor | 
| 126 |  | DefaultAtomVisitor* defaultAtomVisitor = new DefaultAtomVisitor(info); | 
| 127 |  | compositeVisitor->addVisitor(defaultAtomVisitor, 700); | 
| 128 |  |  | 
| 129 | < | //creat waterType visitor | 
| 129 | > | //create waterType visitor | 
| 130 |  | if(args_info.watertype_flag){ | 
| 131 |  | WaterTypeVisitor* waterTypeVisitor = new WaterTypeVisitor; | 
| 132 |  | compositeVisitor->addVisitor(waterTypeVisitor, 600); | 
| 133 |  | } | 
| 134 | + |  | 
| 135 | + | if (args_info.basetype_flag) { | 
| 136 | + | AtomNameVisitor* atomNameVisitor = new AtomNameVisitor(info); | 
| 137 | + | compositeVisitor->addVisitor(atomNameVisitor, 550); | 
| 138 | + |  | 
| 139 | + | } | 
| 140 |  |  | 
| 141 |  | //create ZconsVisitor | 
| 142 |  | if(args_info.zconstraint_flag){ | 
| 150 |  | } | 
| 151 |  | } | 
| 152 |  |  | 
| 153 | < | //creat wrapping visitor | 
| 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 | < | //creat replicate visitor | 
| 160 | > | //create replicate visitor | 
| 161 |  | if(args_info.repeatX_given > 0 || args_info.repeatY_given > 0 ||args_info.repeatY_given > 0){ | 
| 162 |  | Vector3i replicateOpt(args_info.repeatX_arg, args_info.repeatY_arg, args_info.repeatZ_arg); | 
| 163 |  | ReplicateVisitor* replicateVisitor = new ReplicateVisitor(info, replicateOpt); | 
| 173 |  | exit(1); | 
| 174 |  | } | 
| 175 |  |  | 
| 176 | < | //creat xyzVisitor | 
| 176 | > | //create xyzVisitor | 
| 177 |  | XYZVisitor* xyzVisitor; | 
| 178 |  | if (args_info.selection_given) { | 
| 179 |  | xyzVisitor = new XYZVisitor(info, args_info.selection_arg); | 
| 184 |  |  | 
| 185 |  | std::cout << compositeVisitor->toString(); | 
| 186 |  |  | 
| 187 | < | //creat prepareVisitor | 
| 187 | > | //create prepareVisitor | 
| 188 |  | PrepareVisitor* prepareVisitor = new PrepareVisitor(); | 
| 189 |  |  | 
| 190 |  | //open dump file | 
| 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 |  |  |