Skip to content

Commit

Permalink
Merge pull request #79 from molssi-seamm/dev
Browse files Browse the repository at this point in the history
Bugfix: creating H2 from SMILES failed
  • Loading branch information
seamm authored Aug 5, 2024
2 parents 9c5a57e + a6e2958 commit 8a53509
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
=======
History
=======
2024.8.5 -- Bugfix: creating H2 from SMILES failed
* Fixed bug where creating molecules consisting of just hydrogen failed because
RDKit by default ignores all hydrogens when reorienting the molecule.

2024.6.21 -- Switching default for SMILES to RDKit rather than OpenBabel
* RDKit seems more robust, and also the atom typing uses RDkit, so compatibility is
important.
Expand Down
2 changes: 1 addition & 1 deletion molsystem/smiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def from_smiles(self, smiles, name=None, reorient=True, rdkit=True):
if reorient:
rdkMol = self.to_RDKMol()
rdkConf = rdkMol.GetConformers()[0]
Chem.rdMolTransforms.CanonicalizeConformer(rdkConf)
Chem.rdMolTransforms.CanonicalizeConformer(rdkConf, ignoreHs=False)
self.from_RDKMol(rdkMol)

if name is not None:
Expand Down

0 comments on commit 8a53509

Please sign in to comment.