Skip to content

Commit

Permalink
Add method to add implicit hydrogens
Browse files Browse the repository at this point in the history
  • Loading branch information
smcolby committed Sep 20, 2023
1 parent 8d2f450 commit 22025a8
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions isicle/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,27 @@ def _is_embedded(self):
return True
except:
return False


def addHs(self):
"""
Add implicit hydrogens to molecule.
Returns
-------
:obj:`~isicle.geometry.Geometry`
Molecule representation.
"""

# Get copy of mol object
mol = self.to_mol()

# Add Hs with coordinates
mol = Chem.AddHs(mol, addCoords=True)

# Return new geometry instance
return self.__copy__(mol=mol)

def initial_optimize(self, embed=False, forcefield="UFF", ff_iter=200):
"""
Expand Down

0 comments on commit 22025a8

Please sign in to comment.