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

Usability fixes for mol_str, min interatomic dist #130

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paolot-gc
Copy link
Contributor

nanoDFT.py appeared to be broken when supplying a custom mol_str because min_interatomic_distance() expects a list.
Also, I added a warning when the computed minimum interatomic distance is out of a "sane" range, assuming Angstrom as length unit.

@paolot-gc
Copy link
Contributor Author

It may be useful to note that the coordinates in the conformers in PubChem can be expressed in different units.
The information regarding the units is conveyed in fields present in the SDF, JSON, or XML record.
In SDF, according to the specs, the relevant field is as follows:
image
This is problematic because, for instance, in the case of cyclodextrin, the coordinates provided by PubChem are in unknown units (shown as 255).
Also, the package pubchempy does not seem to make the PUBCHEM_COORDINATE_TYPE information accessible. The repo for package seems to be dormant. The most recent update was 6 years ago.
If we want to get the units, we might have to brew our own code, parsing the JSON obtained by urls such as:
https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/esomeprazole/JSON?record_type=3d

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

Successfully merging this pull request may close these issues.

1 participant