Open paolot-gc opened 1 year ago
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:
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
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.