Skip to content

Commit

Permalink
Remove determine bonds step for XYZ
Browse files Browse the repository at this point in the history
  • Loading branch information
smcolby committed Jul 30, 2024
1 parent 3d76540 commit 3d48677
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions isicle/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _load_text(path: str):
return [x.strip() for x in contents]


def load_xyz(path, charge=None):
def load_xyz(path):
"""
Load XYZ from file.
Expand All @@ -50,14 +50,14 @@ def load_xyz(path, charge=None):
"""

# Check for charge
if charge is None:
raise ValueError("Charge must be specified when loading XYZ files.")
# # Check for charge
# if charge is None:
# raise ValueError("Charge must be specified when loading XYZ files.")

# Create mol object
raw_mol = Chem.MolFromXYZFile(path)
mol = Chem.Mol(raw_mol)
rdDetermineBonds.DetermineBonds(mol, charge=charge)
# rdDetermineBonds.DetermineBonds(mol, charge=charge)

# Basename
basename = os.path.splitext(os.path.basename(path))[0]
Expand Down
6 changes: 3 additions & 3 deletions isicle/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,9 @@ def finish(self):
# Construct mol from XYZ
raw_mol = Chem.MolFromXYZBlock(xyzblock)
mol = Chem.Mol(raw_mol)
rdDetermineBonds.DetermineBonds(
mol, charge=self.geom.get_charge() + charge_lookup[basename]
)
# rdDetermineBonds.DetermineBonds(
# mol, charge=self.geom.get_charge() + charge_lookup[basename]
# )

# Initialize Geometry instance
geom = isicle.geometry.Geometry(
Expand Down

0 comments on commit 3d48677

Please sign in to comment.