Skip to content

Commit

Permalink
fake Se as S for RDKit Gasteiger charges
Browse files Browse the repository at this point in the history
  • Loading branch information
diogomart committed Jul 24, 2023
1 parent b8b4e05 commit 88d640f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions meeko/molsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,12 @@ def init_atom(self, assign_charges, coords):
""" initialize the atom table information """
# extract/generate charges
if assign_charges:
rdPartialCharges.ComputeGasteigerCharges(self.mol)
charges = [a.GetDoubleProp('_GasteigerCharge') for a in self.mol.GetAtoms()]
copy_mol = Chem.Mol(self.mol)
for atom in copy_mol.GetAtoms():
if atom.GetAtomicNum() == 34:
atom.SetAtomicNum(16)
rdPartialCharges.ComputeGasteigerCharges(copy_mol)
charges = [a.GetDoubleProp('_GasteigerCharge') for a in copy_mol.GetAtoms()]
else:
charges = [0.0] * self.mol.GetNumAtoms()
# perceive chirality
Expand Down

0 comments on commit 88d640f

Please sign in to comment.