xtb icon indicating copy to clipboard operation
xtb copied to clipboard

Failing Geometry optimization with fixed atoms using the GFN-FF

Open benbaed opened this issue 2 years ago • 2 comments

Describe the bug Geometry optimizations using the GFN-FF do not work when I try to fix certain atoms of the structure. A possible work-around is to use the ANC optimizer and not the default L-ANC optimizer.

To Reproduce Steps to reproduce the behavior:

This consistently happens with multiple of my NCI structures (I could not reproduce it using Benzene)

  1. start xtb (version 6.5.1) with: xtb struc.xyz --gfnff --gbsa toluene --opt vtight --input xtb.inp > xtb.out

  2. the following errors are printed: [ERROR] Program stopped due to fatal error -3- Geometry optimization failed -2- xtb_geoopt: Geometry optimization did not converge -1- gfnff_setup: Could not read topology file.

  3. Searching for "L-ANC optimizer", one can find the following message: k= 528 nvar= 4974 ANC generation failed

Expected behaviour As using the normal ANC optimizer, the given atoms should be fixed and the optimization should be running and not stop.

Additional context I found that using the normal ANC optimizer solves this issue, the xtb.inp then looks like this:

$opt
 engine=rf
$fix
  atoms: 1-1482
$end 

Since the ANC optimizer is the default for gfn2, I did not observe the bug there.

Input and generated files gfnff_fix_bug.zip

benbaed avatar Apr 05 '23 13:04 benbaed

@benbaed @Thomas3R Is this issue still present?

marcelmbn avatar Aug 07 '24 11:08 marcelmbn

I can confirm this issue using the latest bleeding edge (9d919f7). The optimization does converge when using the L-ANC but no constraints/fixed atoms. This indicates that the L-ANC does not accept fixed atoms correctly.

chselz avatar Nov 23 '25 12:11 chselz