ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/heatflux/src/UseTheForce/SC_FF.cpp
(Generate patch)

Comparing trunk/src/UseTheForce/SC_FF.cpp (file contents):
Revision 793 by chuckv, Tue Dec 6 19:26:37 2005 UTC vs.
Revision 1442 by gezelter, Mon May 10 17:28:26 2010 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 38 | Line 29
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   *
42 *  SC_FF.cpp
43 *  OOPSE-2.0
44 *
41   *  Created by Charles F. Vardeman II on 11/9/05.
42   *  @author  Charles F. Vardeman II
43 < *  @version $Id: SC_FF.cpp,v 1.4 2005-12-06 19:26:37 chuckv Exp $
43 > *  @version $Id$
44   *
45   */
46  
# Line 54 | Line 50
50   #include "UseTheForce/DarkSide/sticky_interface.h"
51   #include "UseTheForce/DarkSide/suttonchen_interface.h"
52   #include "UseTheForce/ForceFieldFactory.hpp"
53 < #include "io/DirectionalAtomTypesSectionParser.hpp"
53 > #include "io/OptionSectionParser.hpp"
54 > #include "io/BaseAtomTypesSectionParser.hpp"
55   #include "io/AtomTypesSectionParser.hpp"
59 #include "io/LennardJonesAtomTypesSectionParser.hpp"
60 #include "io/ChargeAtomTypesSectionParser.hpp"
61 #include "io/MultipoleAtomTypesSectionParser.hpp"
62 #include "io/EAMAtomTypesSectionParser.hpp"
63 #include "io/StickyAtomTypesSectionParser.hpp"
64 #include "io/BondTypesSectionParser.hpp"
65 #include "io/BendTypesSectionParser.hpp"
66 #include "io/TorsionTypesSectionParser.hpp"
56   #include "io/SCAtomTypesSectionParser.hpp"
68 #include "io/OptionSectionParser.hpp"
57   #include "UseTheForce/ForceFieldCreator.hpp"
58   #include "utils/simError.h"
59 < namespace oopse {
59 > namespace OpenMD {
60    
61    SC_FF::SC_FF(){
62      
63      //set default force field filename
64 <    setForceFieldFileName("SuttonChen.QSC.frc");
65 <    
66 <    //the order of adding section parsers are important
79 <    //DirectionalAtomTypesSectionParser should be added before AtomTypesSectionParser Since
80 <    //These two section parsers will actually create "real" AtomTypes (AtomTypesSectionParser will create
81 <    //AtomType and DirectionalAtomTypesSectionParser will creat DirectionalAtomType which is a subclass
82 <    //of AtomType, therefore it should come first). Other AtomTypes Section Parser will not create the
83 <    //"real" AtomType, they only add and set some attribute of the AtomType. Thus their order are not
84 <    //important. AtomTypesSectionParser should be added before other atom type section parsers.
85 <    //Make sure they are added after DirectionalAtomTypesSectionParser and AtomTypesSectionParser.
86 <    //The order of BondTypesSectionParser, BendTypesSectionParser and TorsionTypesSectionParser are
87 <    //not important.
88 <    spMan_.push_back(new OptionSectionParser(SCForceFieldOptions_));
89 <    spMan_.push_back(new DirectionalAtomTypesSectionParser());
64 >    setForceFieldFileName("SuttonChen.frc");
65 >    spMan_.push_back(new OptionSectionParser(forceFieldOptions_));
66 >    spMan_.push_back(new BaseAtomTypesSectionParser());
67      spMan_.push_back(new AtomTypesSectionParser());
68 <    spMan_.push_back(new SCAtomTypesSectionParser());
92 <    
68 >    spMan_.push_back(new SCAtomTypesSectionParser(forceFieldOptions_));
69    }
70    
71    void SC_FF::parse(const std::string& filename) {
# Line 104 | Line 80 | namespace oopse {
80      // Set forcefield options
81      
82      for (at = atomTypeCont_.beginType(i); at != NULL; at = atomTypeCont_.nextType(i)) {
83 +      // useBase sets the responsibilities, and these have to be done
84 +      // after the atomTypes and Base types have all been scanned:
85 +
86 +      std::vector<AtomType*> ayb = at->allYourBase();      
87 +      if (ayb.size() > 1) {
88 +        for (int j = ayb.size()-1; j > 0; j--) {
89 +          
90 +          ayb[j-1]->useBase(ayb[j]);
91 +
92 +        }
93 +      }
94        at->makeFortranAtomType();
95      }
96      
# Line 121 | Line 108 | namespace oopse {
108      // we try to create a second SC force field.
109      destroySCTypes();
110    }
111 < } //end namespace oopse
111 > } //end namespace OpenMD
112  

Comparing trunk/src/UseTheForce/SC_FF.cpp (property svn:keywords):
Revision 793 by chuckv, Tue Dec 6 19:26:37 2005 UTC vs.
Revision 1442 by gezelter, Mon May 10 17:28:26 2010 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines