Ignore:
Timestamp:
Apr 27, 2008, 1:01:06 PM (17 years ago)
Author:
Frederik Heber <heber@…>
Children:
b5279f0
Parents:
c72cbe
Message:

AddXYZFile(): Bugfix - if element could not be parsed (e.g. elements db was not loaded correctly)

This has so far not spawned an error message, now it does and atom's element is set to hydrogen.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/molecules.cpp

    rc72cbe r16cd31  
    467467    *item >> x[2];
    468468    first->type = elemente->FindElement(shorthand);
     469    if (first->type == NULL) {
     470      cerr << "Could not parse the element at line: '" << line << "', setting to H.";
     471      first->type = elemente->FindElement(1);
     472    }
    469473    for(j=0;j<NDIM;j++)
    470474      first->x.x[j] = x[j];
Note: See TracChangeset for help on using the changeset viewer.