graphcore-research / pyscf-ipu

PySCF on IPU
https://github.com/graphcore-research/pyscf-ipu#readme
Apache License 2.0
41 stars 3 forks source link

Usability fixes for mol_str, min interatomic dist #130

Open paolot-gc opened 9 months ago

paolot-gc commented 9 months ago

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 commented 9 months 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: 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