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

Comparing trunk/src/visitors/OtherVisitor.cpp (file contents):
Revision 1290 by cli2, Wed Sep 10 19:51:45 2008 UTC vs.
Revision 1455 by gezelter, Thu Jun 24 20:44:18 2010 UTC

# Line 5 | Line 5
5   * non-exclusive, royalty free, license to use, modify and
6   * redistribute this software in source and binary code form, provided
7   * that the following conditions are met:
8 * 1. Acknowledgement of the program authors must be made in any
9 *    publication of scientific results based in part on use of the
10 *    program.  An acceptable form of acknowledgement is citation of
11 *    the article in which the program was described (Matthew
12 *    A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher
13 *    J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented
14 *    Parallel Simulation Engine for Molecular Dynamics,"
15 *    J. Comput. Chem. 26, pp. 252-271 (2005))
8   *
9 < * 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 36 | 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   #include "selection/SelectionManager.hpp"
42   #include "visitors/OtherVisitor.hpp"
# Line 43 | Line 44
44   #include "primitives/RigidBody.hpp"
45   #include "primitives/Molecule.hpp"
46   #include "brains/SimInfo.hpp"
47 < namespace oopse {
47 > namespace OpenMD {
48  
49    void WrappingVisitor::visit(Atom *atom) {
50      internalVisit(atom);
# Line 289 | Line 290 | namespace oopse {
290          return;
291      } else
292        return;
292
293    AtomType* at = dynamic_cast<Atom *>(sd)->getAtomType();
294    std::string bn = baseTypeName(at);
293  
294      if (posOnly_){
295        for( atomInfo = atomData->beginAtomInfo(i); atomInfo;
# Line 299 | Line 297 | namespace oopse {
297          if (atomInfo->hasCharge) {
298            sprintf(buffer,
299                    "%s%15.8f%15.8f%15.8f%15.8f",
300 <                  bn.c_str(),
300 >                  atomInfo->atomTypeName.c_str(),
301                    atomInfo->pos[0],
302                    atomInfo->pos[1],
303                    atomInfo->pos[2],
# Line 307 | Line 305 | namespace oopse {
305          } else {
306            sprintf(buffer,
307                  "%s%15.8f%15.8f%15.8f",
308 <                  bn.c_str(),
308 >                  atomInfo->atomTypeName.c_str(),
309                    atomInfo->pos[0],
310                    atomInfo->pos[1],
311                    atomInfo->pos[2]);
# Line 320 | Line 318 | namespace oopse {
318          if (atomInfo->hasCharge) {
319          sprintf(buffer,
320                  "%s%15.8f%15.8f%15.8f%15.8f%15.8f%15.8f%15.8f",
321 <                bn.c_str(),
321 >                atomInfo->atomTypeName.c_str(),
322                  atomInfo->pos[0],
323                  atomInfo->pos[1],
324                  atomInfo->pos[2],
# Line 331 | Line 329 | namespace oopse {
329          } else {
330          sprintf(buffer,
331                  "%s%15.8f%15.8f%15.8f%15.8f%15.8f%15.8f",
332 <                bn.c_str(),
332 >                atomInfo->atomTypeName.c_str(),
333                  atomInfo->pos[0],
334                  atomInfo->pos[1],
335                  atomInfo->pos[2],
# Line 379 | Line 377 | namespace oopse {
377      return atomTypeName.substr(0, atomTypeName.find('-'));
378    }
379  
382  std::string XYZVisitor::baseTypeName(AtomType* at) {
383    std::vector<AtomType*> ayb = at->allYourBase();
384    return ayb[ayb.size()-1]->getName();
385  }
386
380    const std::string XYZVisitor::toString() {
381      char        buffer[65535];
382      std::string result;
# Line 551 | Line 544 | namespace oopse {
544      return result;
545    }
546  
547 < } //namespace oopse
547 > } //namespace OpenMD

Comparing trunk/src/visitors/OtherVisitor.cpp (property svn:keywords):
Revision 1290 by cli2, Wed Sep 10 19:51:45 2008 UTC vs.
Revision 1455 by gezelter, Thu Jun 24 20:44:18 2010 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines