Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Nov 4, 2023
1 parent cffad91 commit cd20098
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions avogadro/io/cjsonformat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@ bool CjsonFormat::read(std::istream& file, Molecule& molecule)
if (hallNumber > 0 && hallNumber < 531)
molecule.setHallNumber(hallNumber);
} else if (unitCell["spaceGroup"].is_string()) {
auto hallNumber = SpaceGroups::hallNumber(unitCell["spaceGroup"]);
if (hallNumber != -1 && hallNumber != 0)
auto hallNumber = Core::SpaceGroups::hallNumber(unitCell["spaceGroup"]);
if (hallNumber != 0)
molecule.setHallNumber(hallNumber);
}
}
Expand Down Expand Up @@ -713,7 +713,8 @@ bool CjsonFormat::write(std::ostream& file, const Molecule& molecule)

// write the Hall number and space group
unitCell["hallNumber"] = molecule.hallNumber();
unitCell["spaceGroup"] = SpaceGroups::international(molecule.hallNumber());
unitCell["spaceGroup"] =
Core::SpaceGroups::international(molecule.hallNumber());

root["unitCell"] = unitCell;
}
Expand Down

0 comments on commit cd20098

Please sign in to comment.