Skip to content

Commit

Permalink
Allow disabling cell optimization via command line argument (#1011)
Browse files Browse the repository at this point in the history
This allows to turn off lattice parameter optimization for GFN-FF and mcGFN-FF using the --nocellopt keyword
  • Loading branch information
Thomas3R committed Apr 16, 2024
1 parent 9d95c03 commit 7bc92cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/geoopt_driver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ subroutine geometry_optimization &
! get number of unique species; used in precond_lindh
!call get_identity(mol%nid, mol%id, mol%at)
! create new anc filter
optcell = mol%npbc > 0 ! optimize cell parameters if present
optcell = mol%npbc > 0 .and. set%optcell
call new_cartesian_filter(filter, mol, optcell)
! create new Limited-memory BFGS optimizer
call new_lbfgs_optimizer(lbfgs_opt, env, opt_input, filter)
Expand Down
4 changes: 4 additions & 0 deletions src/prog/main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1909,6 +1909,10 @@ subroutine parseArguments(env, args, inputFile, paramFile, lgrad, &
else
call env%error("The wrtopo keyword is missing an argument.", source)
end if

case ('--nocellopt')
set%optcell = .false.

end select
call args%nextFlag(flag)
end do
Expand Down
1 change: 1 addition & 0 deletions src/setparam.f90
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ module xtb_setparam
logical :: newdisp = .true.
logical :: solve_scc = .true.
logical :: periodic = .false.
logical :: optcell = .true.

! Geometry input type
integer :: geometry_inputfile = p_geo_coord
Expand Down

0 comments on commit 7bc92cd

Please sign in to comment.