Skip to content
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

ligands.dict charge assignment for xyz files #70

Closed
gianmarco-terrones opened this issue May 17, 2022 · 3 comments
Closed

ligands.dict charge assignment for xyz files #70

gianmarco-terrones opened this issue May 17, 2022 · 3 comments

Comments

@gianmarco-terrones
Copy link
Contributor

When using molSimplify from the command line, the generated terachem_input files do not have the correct charge if the ligand is not neutral and uses an xyz file as its geometry in ligands.dict.

@adityanandy
Copy link
Contributor

@gianmarco-terrones as a comment on this --> ligands should generally not be stored in the ligands dict as XYZs, but rather as .mol files, which store charge. But I agree this is worth adjusting...

gianmarco-terrones added a commit that referenced this issue May 18, 2022
Fixes to Issues #56 and #70. Changes primarily in the Ligands folder
@gianmarco-terrones
Copy link
Contributor Author

Resolved! Now using xyz files in ligands.dict works even if the ligands that use the xyz files as geometries are not neutral. Verified that the terachem_input generated has the correct charge by running molsimplify -core iron -geometry oct -lig ooh -oxstate 2 -spin 1. Before, this had the line charge 2. Now, it gives the correct charge of charge -4. ooh uses an xyz as its geometry in ligands.dict and has a charge of -1.

@gianmarco-terrones
Copy link
Contributor Author

gianmarco-terrones commented May 18, 2022

I should add, the key was @ralf-meyer 's change in molSimplify/Scripts/io.py in the function lig_load. The xyz files were not being given a charge when read by OpenBabel. Ralf fixed this by including the lines

    # Set charge to last entry in ligands.dict
    lig.OBMol.SetTotalCharge(int(dbentry[-1][0]))

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants