ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-2.0/src/types/AtomType.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-2.0/src/types/AtomType.cpp (file contents):
Revision 1786 by tim, Tue Nov 23 06:03:47 2004 UTC vs.
Revision 1787 by tim, Mon Nov 29 14:40:30 2004 UTC

# Line 7 | Line 7
7   #include "utils/simError.h"
8   #define __C
9   #include "UseTheForce/DarkSide/atype_interface.h"
10 <
11 < name_space oopse {
10 > #include "UseTheForce/DarkSide/lj_interface.h"
11 > #include "UseTheForce/DarkSide/eam_interface.h"
12 > #include "UseTheForce/DarkSide/charge_interface.h"
13 > namespace oopse {
14    AtomType::AtomType(){
15      
16      // initialize to an error:
17 <    atp_.ident = -1;
17 >    atp.ident = -1;
18  
19      // and mass_less:
20      mass_ = 0.0;
21      
22      // atom type is a Tabula Rasa:
23 <    atp_.is_Directional = 0;
24 <    atp_.is_LennardJones = 0;
25 <    atp_.is_Electrostatic = 0;
26 <    atp_.is_Charge = 0;
27 <    atp_.is_Dipole = 0;
28 <    atp_.is_Sticky = 0;
29 <    atp_.is_GayBerne = 0;
30 <    atp_.is_EAM = 0;
31 <    atp_.is_Shape = 0;
32 <    atp_.is_FLARB = 0;  
23 >    atp.is_Directional = 0;
24 >    atp.is_LennardJones = 0;
25 >    atp.is_Electrostatic = 0;
26 >    atp.is_Charge = 0;
27 >    atp.is_Dipole = 0;
28 >    atp.is_Sticky = 0;
29 >    atp.is_GayBerne = 0;
30 >    atp.is_EAM = 0;
31 >    atp.is_Shape = 0;
32 >    atp.is_FLARB = 0;  
33    }
34      
35    void AtomType::makeFortranAtomType() {
# Line 43 | Line 45 | name_space oopse {
45        simError();
46      }
47      
48 <    if (atp_.ident == -1) {
48 >    if (atp.ident == -1) {
49        sprintf( painCave.errMsg,
50                 "Attempting to complete AtomType %s without setting the"
51                 " ident!/n", name_.c_str());
# Line 54 | Line 56 | name_space oopse {
56  
57      status = 0;
58  
59 <    makeAtype(&atp_, &status);  
59 >    makeAtype(&atp, &status);  
60      
61      if (status != 0) {
62        sprintf( painCave.errMsg,
# Line 79 | Line 81 | void AtomType::complete() {
81              if (ljData != NULL) {
82                  LJParam ljParam = ljData->getData();
83                  
84 <                newLJtype(&atp_.ident, &ljParam.sigma, &ljParam.epsilon, &isError);
84 >                newLJtype(&atp.ident, &ljParam.sigma, &ljParam.epsilon, &isError);
85  
86                  if (isError != 0) {
87                      sprintf( painCave.errMsg,
# Line 111 | Line 113 | void AtomType::complete() {
113  
114              if (doubleData != NULL) {
115                  double charge = doubleData->getData();
116 <                newChargeType(&atp_.ident,, &charge, &isError);
116 >                newChargeType(&atp.ident, &charge, &isError);
117  
118                  if (isError != 0) {
119                      sprintf( painCave.errMsg,
# Line 146 | Line 148 | void AtomType::complete() {
148                  
149  
150                  newEAMtype(&eamParam.latticeConstant, &eamParam.nrho, &eamParam.drho,  &eamParam.nr, &eamParam.dr, &eamParam.rcut,
151 <                                &eamParam.rvals[0], &eamParam.rhovals[0], &eamParam.Frhovals[0], &atp_.ident,, &isError );
151 >                                &eamParam.rvals[0], &eamParam.rhovals[0], &eamParam.Frhovals[0], &atp.ident, &isError );
152  
153                  if (isError != 0) {
154                      sprintf( painCave.errMsg,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines