grimme-lab / xtb-python

Python API for the extended tight binding program package
https://xtb-python.readthedocs.io
GNU Lesser General Public License v3.0
99 stars 30 forks source link

Unit of the position #72

Closed xiki-tempula closed 2 years ago

xiki-tempula commented 2 years ago

Is your feature request related to a problem? Please describe.

I wonder what is the unit of the coordinates? Assuming the interface as is shown https://xtb-python.readthedocs.io/en/latest/general-api.html#xtb.interface.Calculator

>>> from xtb.libxtb import VERBOSITY_MINIMAL
>>> from xtb.interface import Calculator, Param
>>> import numpy as np
>>> numbers = np.array([8, 1, 1])
>>> positions = np.array([
... [ 0.00000000000000, 0.00000000000000,-0.73578586109551],
... [ 1.44183152868459, 0.00000000000000, 0.36789293054775],
... [-1.44183152868459, 0.00000000000000, 0.36789293054775]])
...
>>> calc = Calculator(Param.GFN2xTB, numbers, positions)

With no explicit mention, one would imagine that the position is in the unit of angstrom. However, it is mentioned here that https://xtb-python.readthedocs.io/en/latest/general-api.html#xtb.interface.Molecule.update

Update coordinates and lattice parameters, both provided in atomic units (Bohr)

So I guess the unit of the coordinates is actually in Bohr?

awvwgk commented 2 years ago

Update coordinates and lattice parameters, both provided in atomic units (Bohr)

Sounds about right, if documented that way.