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); |
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 |