Skip to content

Restart information always implicitly used #1378

@lmseidler

Description

@lmseidler

Describe the bug
Not sure if this is a bug or just unclear design:
Consecutive calls to TxTBCalculator%singlepoint always use restart information from somewhere, to me it is not clear where it even comes from.

To Reproduce
Steps to reproduce the behaviour:

All singlepoints should be calculated with high accuracy (e.g. 10e-8):

  1. Call xtb on a coord file of choice (e.g. H2O) and take note of gradient values.
  2. Call xtb again so it uses the restart information. Take note of gradient values.
  3. In a unit test for example set up a new calculator (GFN1 or GFN2) and a new wavefunction for the same molecule.
  4. Call calc%singlepoint with restart=.false. . Take note of gradient values.
  5. Create a new wavefunction, new molecule, new calculator from the same coords and call calc%singlepoint again with restart=.false. . Take note of gradient values. Also, try restart=.true., it makes no difference.
  6. Now compare the gradient values from 4 and 5. The max diff is probably around 10e-10 - 10e-9.
  7. Compare the value from 2 and 5. They should be the same.

So xtb is using restart information from somewhere in the second singlepoint call, even though we created all new instances for calling.

Expected behaviour
Calls to singlepoint with identical inputs should yield the same results (should be stateless).
Also, the restart logical in the singlepoint subroutine should actually stop the program from using restart information.
I'm not sure if I misunderstand some design choices here but there is not really any way to figure that out just using the source code and docs.

Additional context
The small noise in the gradients can lead to large errors in numerical Hessians. This might affect some unit tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    unconfirmedThis report has not yet been confirmed by the developers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions