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

Comparing branches/new_design/OOPSE-3.0/src/UseTheForce/LJFF.cpp (file contents):
Revision 1740 by tim, Mon Nov 15 23:00:32 2004 UTC vs.
Revision 1753 by tim, Thu Nov 18 05:42:06 2004 UTC

# Line 50 | Line 50 | void LJFF::parse(const std::string& filename) {
50      int ident = 1; //ident begins from 1 (c++ does not need to know it, fortran's index begins from 1)
51      int lineNo = 0;
52  
53 <    ffStream.getline(line, bufferSize);    
54 <    while( !ffStream.eof() ){
53 >    while(ffStream.getline(line, bufferSize)){
54          ++lineNo;
55  
56 <        //a line begins with '#' or '!' is comment which is skipped
56 >        //a line begins with '#' or '!' is comment
57          if (line[0] != '#' ||line[0] != '!') {
58              StringTokenizer tokenizer(line);
59              
60              if (tokenizer.countToken() >= 4) {
61                  atomTypeName = tokenizer.nextToken();
62 <                mass = tokenizer.nextTokenAsFloat();
63 <                epsilon = tokenizer.nextTokenAsFloat();
64 <                sigma = tokenizer.nextTokenAsFloat();
62 >                mass = tokenizer.nextTokenAsDouble();
63 >                epsilon = tokenizer.nextTokenAsDouble();
64 >                sigma = tokenizer.nextTokenAsDouble();
65  
66                  atomType = new AtomType();
67                  atomType->setName(atomTypeName);
# Line 76 | Line 75 | void LJFF::parse(const std::string& filename) {
75                  atomType->addProperty(new DoubleGenericData("Epsilon", epsilon));                                
76                  atomType->addProperty(new DoubleGenericData("Sigma", sigma));                                
77                  atomType->complete();
78 <                //notify a new LJtype atom type is created
78 >
79 >                //notify fortran a new LJtype atom type is created
80                  newLJtype(&ident, &sigma, &epsilon, &status);
81  
82                  //add atom type to AtomTypeContainer
# Line 95 | Line 95 | void LJFF::parse(const std::string& filename) {
95              
96          }
97  
98         ffStream.getline(line, bufferSize);
98      }
99      
100      delete ffStream;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines