-
Notifications
You must be signed in to change notification settings - Fork 139
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
writing updated coord AND xtbopt.xyz during external driver optimization (including nicer printout) #828
Merged
Merged
writing updated coord AND xtbopt.xyz during external driver optimization (including nicer printout) #828
Changes from 3 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3576dc5
writing updated coord AND xtbopt.xyz during external driver optimization
marcelmbn 5a7b8e1
resolved formatting error
marcelmbn 28f35ab
removed deprecated 'wrtm' call and included a general structure write…
marcelmbn d775dab
more detailed printout and default setting of cache variable
marcelmbn 68003b1
Merge remote-tracking branch 'upstream/main'
marcelmbn 7468cc9
Modified convergence condition such that the energy change does not n…
marcelmbn 7a21a68
Merge remote-tracking branch 'upstream/main'
marcelmbn 5f81304
Update src/extern/driver.f90
marcelmbn 753b09f
Merge branch 'grimme-lab:main' into main
marcelmbn a747e09
more neutral structure file name and guarded printout
marcelmbn 5835bed
Removed debug printout and merged nested if loops
marcelmbn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
module xtb_extern_driver | ||
use xtb_mctc_accuracy, only: wp | ||
use xtb_mctc_io, only: stdout | ||
use xtb_mctc_filetypes, only: fileType | ||
use xtb_mctc_filetypes, only: fileType, generateFileName | ||
use xtb_mctc_symbols, only: toSymbol | ||
use xtb_type_calculator, only: TCalculator | ||
use xtb_type_data, only: scc_results | ||
|
@@ -104,6 +104,8 @@ subroutine singlepoint(self, env, mol, chk, printlevel, restart, & | |
'(9x,"::",1x,a,f23.12,1x,a,1x,"::")' | ||
real(wp) :: xyz_cached(3, mol%n) | ||
integer :: err | ||
character(len=:),allocatable :: extension | ||
character(len=:),allocatable :: tmpname | ||
|
||
call mol%update | ||
|
||
|
@@ -117,11 +119,22 @@ subroutine singlepoint(self, env, mol, chk, printlevel, restart, & | |
!$omp critical (turbo_lock) | ||
inquire (file='gradient', exist=exist) | ||
if (exist) then | ||
! ### only TM output is supported for now ### | ||
call rdtm(env,mol%n, .true., energy, gradient, xyz_cached) | ||
cache = all(abs(xyz_cached - mol%xyz) < 1.e-10_wp) | ||
end if | ||
if (.not. cache) then | ||
call wrtm(mol%n, mol%at, mol%xyz) | ||
call generateFileName(tmpname, 'xtbopt', extension, mol%ftype) | ||
write(env%unit,'(/,a,1x,a,/)') & | ||
"updated geometry written to:",tmpname | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This output should be guarded by |
||
call open_file(ich,tmpname,'w') | ||
if (exist) then | ||
awvwgk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
call writeMolecule(mol, ich, format=mol%ftype, energy=energy, & | ||
& gnorm=norm2(gradient)) | ||
else | ||
call writeMolecule(mol, ich, format=mol%ftype) | ||
end if | ||
call close_file(ich) | ||
|
||
write (env%unit, '(72("="))') | ||
write (env%unit, '(1x,"*",1x,a)') & | ||
|
@@ -135,6 +148,7 @@ subroutine singlepoint(self, env, mol, chk, printlevel, restart, & | |
end if | ||
write (env%unit, '(72("="))') | ||
|
||
! ### only TM output is supported for now ### | ||
call rdtm(env,mol%n, .true., energy, gradient, xyz_cached) | ||
end if | ||
!$omp end critical (turbo_lock) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use
xtbopt
for the final optimized structure, but this routine can be called from a single point or hessian calculation. Better use a more neutral filename here.