Skip to content

Commit

Permalink
Try something simpler for bohr coordinate input, akin to OpenMolcas
Browse files Browse the repository at this point in the history
  • Loading branch information
greghjones committed Feb 16, 2024
1 parent 30baee9 commit b37d20e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
12 changes: 6 additions & 6 deletions pysisyphus/Geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,12 @@ def __init__(
), f"'freeze_atoms' must all be >= 0 and < {len(self.atoms)}!"

# Disallow any coord_kwargs with coord_type == 'cart'
# if (coord_type == "cart") and not (coord_kwargs is None or coord_kwargs == {}):
# print(
# "coord_type is set to 'cart' but coord_kwargs were given. "
# "This is probably not intended. Exiting!"
# )
# sys.exit()
if (coord_type == "cart") and not (coord_kwargs is None or coord_kwargs == {}):
print(
"coord_type is set to 'cart' but coord_kwargs were given. "
"This is probably not intended. Exiting!"
)
sys.exit()

# Coordinate systems are handled below
coord_class = self.coord_types[self.coord_type]
Expand Down
6 changes: 1 addition & 5 deletions pysisyphus/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ def geom_from_xyz_file(xyz_fn, coord_type="cart", **coord_kwargs):
kwargs.update(coord_kwargs)
xyz_fn = str(xyz_fn)
atoms, coords, comment = parse_xyz_file(xyz_fn, with_comment=True)
if 'bohr' in coord_kwargs:
bohr = coord_kwargs.pop('bohr')
if not bohr:
coords *= ANG2BOHR
else:
if 'bohr' not in comment.lower():
coords *= ANG2BOHR
geom = Geometry(
atoms,
Expand Down

0 comments on commit b37d20e

Please sign in to comment.