grimme-lab / xtb

Semiempirical Extended Tight-Binding Program Package
https://xtb-docs.readthedocs.io/
GNU Lesser General Public License v3.0
588 stars 148 forks source link

Difference in geometry (and energy) when using the bash `export XTBPATH` option. #1110

Open jonathan-schoeps opened 1 month ago

jonathan-schoeps commented 1 month ago

Describe the bug If a xtb calculation is done with export XTBPATH (to the corresponding xtb source directory), the optimized structure differs from the optimized geometry without the environment variable . This bug was tested with GFN2-xTB. Probably,xtb infers some information from the xtb source folder where the expot XTBPATH pointed to, e.g. the param_gfn2-xtb.txt file. The same bug occurred when I used the gfortran compiler.

To Reproduce Steps to reproduce the behaviour:

  1. happens with input

    Input Geometry ``` 9 !xtb opt test O -1.1712 0.2997 0.0 C -0.0463 -0.5665 0.0 C 1.2175 0.2668 0.0 H -0.0958 -1.212 0.8819 H -0.0952 -1.1938 -0.8946 H 2.105 -0.372 -0.0177 H 1.2426 0.9307 -0.8704 H 1.2616 0.9052 0.8886 H -1.1291 0.8364 0.8099 ```
  2. run xtb with export XTBPATH enabled

Output with `export XTBPATH` enabled [xtbout.txt](https://github.com/user-attachments/files/17202939/xtbout.txt)
  1. run xtb without export XTBPATH enabled
Output without `export XTBPATH` enabled [xtbout.txt](https://github.com/user-attachments/files/17203757/xtbout.txt)

Expected behaviour It should not make a difference if I enable the export XTBPATH in the ~/.bashrc or not. The differences in the geometries are larger than a threshold of 10⁻⁴ Angstroem.

Additional context The first idea is that the existing param_gfn2-xtb.txt file is read when using the export XTBPATH option and consequently the parameters differ from the hard coded parameters and a different geometry is obtained.

marcelmbn commented 1 month ago

I just vimdiff'ed both outputs and found different setup values for maxmium RF displ., Hlow (freq-cutoff), and S6 in model hess.. According to the vimdiff, the initial single-point energy and gradient are identical, but the first optimization step alreads leads to a different gradient. Has anybody seen this already somewhere, @Albkat @cplett @Thomas3R?

image