Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling cell optimization via command line argument #1011

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading