ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/visitors/AtomVisitor.cpp
(Generate patch)

Comparing trunk/src/visitors/AtomVisitor.cpp (file contents):
Revision 1219 by xsun, Wed Jan 23 21:23:32 2008 UTC vs.
Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC

# Line 6 | Line 6
6   * redistribute this software in source and binary code form, provided
7   * that the following conditions are met:
8   *
9 < * 1. Acknowledgement of the program authors must be made in any
10 < *    publication of scientific results based in part on use of the
11 < *    program.  An acceptable form of acknowledgement is citation of
12 < *    the article in which the program was described (Matthew
13 < *    A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher
14 < *    J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented
15 < *    Parallel Simulation Engine for Molecular Dynamics,"
16 < *    J. Comput. Chem. 26, pp. 252-271 (2005))
17 < *
18 < * 2. Redistributions of source code must retain the above copyright
9 > * 1. Redistributions of source code must retain the above copyright
10   *    notice, this list of conditions and the following disclaimer.
11   *
12 < * 3. Redistributions in binary form must reproduce the above copyright
12 > * 2. Redistributions in binary form must reproduce the above copyright
13   *    notice, this list of conditions and the following disclaimer in the
14   *    documentation and/or other materials provided with the
15   *    distribution.
# Line 37 | Line 28
28   * arising out of the use of or inability to use software, even if the
29   * University of Notre Dame has been advised of the possibility of
30   * such damages.
31 + *
32 + * SUPPORT OPEN SCIENCE!  If you use OpenMD or its source code in your
33 + * research, please cite the appropriate papers when you publish your
34 + * work.  Good starting points are:
35 + *                                                                      
36 + * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37 + * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38 + * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
39 + * [4]  Vardeman & Gezelter, in progress (2009).                        
40   */
41  
42   #include <cstring>
# Line 44 | Line 44
44   #include "primitives/DirectionalAtom.hpp"
45   #include "primitives/RigidBody.hpp"
46  
47 < namespace oopse {
47 > namespace OpenMD {
48    void BaseAtomVisitor::visit(RigidBody *rb) {
49      //vector<Atom*> myAtoms;
50      //vector<Atom*>::iterator atomIter;
# Line 384 | Line 384 | namespace oopse {
384      AtomData* atomData;
385      GenericData* data;
386      bool haveAtomData;
387    AtomType* atomType;
387      //if atom is not linear atom, just skip it
388      if(!isLinearAtom(datom->getType()) || !datom->getAtomType()->isGayBerne())
389        return;
# Line 409 | Line 408 | namespace oopse {
408                else {
409                      sprintf( painCave.errMsg,
410                             "Can not cast GenericData to GayBerneParam\n");
411 <                    painCave.severity = OOPSE_ERROR;
411 >                    painCave.severity = OPENMD_ERROR;
412                      painCave.isFatal = 1;
413                      simError();          
414          }            
# Line 522 | Line 521 | namespace oopse {
521  
522    void GBLipidAtomVisitor::visit(DirectionalAtom* datom){
523      std::vector<AtomInfo*> atoms;
525    //we need to convert linear into 4 different atoms
526    //Vector3d c1(0.0, 0.0, -6.25);
527    //Vector3d c2(0.0, 0.0, -2.1);
528    //Vector3d c3(0.0, 0.0,  2.1);
529    //Vector3d c4(0.0, 0.0,  6.25);
524      Vector3d c1(0.0, 0.0, 0.0);
525      Vector3d c2(0.0, 0.0, 1.0);
526      RotMat3x3d rotMatrix;
# Line 582 | Line 576 | namespace oopse {
576      atomInfo->hasCharge = true;
577      atomData->addAtomInfo(atomInfo);
578  
585    //newVec = rotTrans * c2;
586    //atomInfo = new AtomInfo;
587    //atomInfo->atomTypeName = "K";
588    //atomInfo->pos[0] = pos[0] + newVec[0];
589    //atomInfo->pos[1] = pos[1] + newVec[1];
590    //atomInfo->pos[2] = pos[2] + newVec[2];
591    //atomInfo->dipole[0] = 0.0;
592    //atomInfo->dipole[1] = 0.0;
593    //atomInfo->dipole[2] = 0.0;
594    //atomData->addAtomInfo(atomInfo);
595
596    //newVec = rotTrans * c3;
597    //atomInfo = new AtomInfo;
598    //atomInfo->atomTypeName = "K";
599    //atomInfo->pos[0] = pos[0] + newVec[0];
600    //atomInfo->pos[1] = pos[1] + newVec[1];
601    //atomInfo->pos[2] = pos[2] + newVec[2];
602    //atomInfo->dipole[0] = 0.0;
603    //atomInfo->dipole[1] = 0.0;
604    //atomInfo->dipole[2] = 0.0;
605    //atomData->addAtomInfo(atomInfo);
606
607    //newVec = rotTrans * c4;
608    //atomInfo = new AtomInfo;
609    //atomInfo->atomTypeName = "K";
610    //atomInfo->pos[0] = pos[0] + newVec[0];
611    //atomInfo->pos[1] = pos[1] + newVec[1];
612    //atomInfo->pos[2] = pos[2] + newVec[2];
613    //atomInfo->dipole[0] = 0.0;
614    //atomInfo->dipole[1] = 0.0;
615    //atomInfo->dipole[2] = 0.0;
616    //atomData->addAtomInfo(atomInfo);
617
579      //add atom data into atom's property
580  
581      if(!haveAtomData){
# Line 636 | Line 597 | namespace oopse {
597      sprintf(buffer ,"Visitor name: %s\n", visitorName.c_str());
598      result += buffer;
599  
600 <    sprintf(buffer , "Visitor Description: Convert GBlipid into 4 different K atoms\n");
600 >    sprintf(buffer , "Visitor Description: Convert GBlipid into xyz-formatted atom for use with xyz2pov\n");
601      result += buffer;
602  
603      sprintf(buffer ,"------------------------------------------------------------------\n");
# Line 960 | Line 921 | namespace oopse {
921  
922      return result;
923    }
924 < } //namespace oopse
924 > } //namespace OpenMD

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines