-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complicated metal complexes as ligand #273
base: develop
Are you sure you want to change the base?
Conversation
double, and more bond types; M-L-M structure
for idx in neigh_idx_to_nr_h: | ||
n = neigh_idx_to_nr_h[idx] | ||
newidx = idx - sum([i < idx for i in idx_to_rm]) | ||
mol.GetAtomWithIdx(newidx).SetNumExplicitHs(n + 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SetNumExplicitHs without Resetting it (since the added hydrogens are non-real) might be causing some problems when functions like RemoveHs are called later on the ligand mol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of resetting it, not modifying atoms in input mol is better
This PR allows preparation of metal complexes with dative bonds as ligands. An example is heme (with Fe(II): Input SDF: Output PDBQT: |
Merged develop into this branch. Added a test (example showed in this PR):
|
This small edit on the charge method allows potentially complicated metal complexes (with datives, double, triple or quadruple bonds) to become ligand, where metal gets a partial charge as the sum of the metal's formal charge (from input) and the Gasteiger charges of non-real Hs that were added to compensate breaking M-L bonds.
It should also support charge assignment in bridged structures like M-L-M. Here, the coordinate atom L will have multiple added Hs, and the charge will be distribute to both metal atoms based on the bond order.
Dative bonds, are a special case. Breaking a dative bonds do not result in addition of non-real Hs.
This process looks complicated. I put some more in-line comments, but in future we could rewrite it.