10000 Use npz format to store post-processing results by awvwgk · Pull Request #256 · tblite/tblite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Use npz format to store post-processing results #256

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 6 additions & 0 deletions app/cli.f90
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ module tblite_cli
type(solvation_input), allocatable :: solvation
!> Input for post processing container
character(len=:), allocatable :: post_processing
!> Input for post processing container
character(len=:), allocatable :: post_proc_output
!> Numerical accuracy for self-consistent iterations
real(wp) :: accuracy = 1.0_wp
!> Maximum number of iterations for SCF
Expand Down Expand Up @@ -567,6 +569,10 @@ subroutine get_run_arguments(config, list, start, error)
end if
end if

if (allocated(config%post_processing) .and. .not.allocated(config%post_proc_output)) then
config%post_proc_output = "tblite-data.npz"
end if

if (allocated(solvent)) then
if (.not.allocated(sol_state)) then
sol_state = solution_state%gsolv
Expand Down
3 changes: 3 additions & 0 deletions app/cli_help.f90
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ module tblite_cli_help
" Mayer-Wiberg bond orders are computed by default."//nl//&
" Options: molmom (molecular multipole moments)"//nl//&
" Options: xtbml (atomistic properties based on Mulliken partitioning)"//nl//&
" --post-processing-output <file>"//nl//&
" Output file for post processing results in npz format."//nl//&
" (default: tblite-data.npz)"//nl//&
" --grad [file] Evaluate molecular gradient and virial"//nl//&
" Results are stored in file (default: tblite.txt)"//nl//&
" --json [file] Dump results as JSON output (default: tblite.json)"//nl//&
Expand Down
5 changes: 5 additions & 0 deletions app/driver_run.f90
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ subroutine run_main(config, error)
if (allocated(error)) return
end if

if (allocated(post_proc) .and. allocated(config%post_proc_output)) then
call results%dict%dump(config%post_proc_output, error)
if (allocated(error)) return
end if

if (config%verbosity > 2) then
call ascii_levels(ctx%unit, config%verbosity, wfn%homo, wfn%emo, wfn%focc, 7)
call post_proc%dict%get_entry("molecular-dipole", dpmom)
Expand Down
11 changes: 11 additions & 0 deletions man/tblite-run.1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,17 @@ Supported geometry input formats are:
Evaluates analytical gradient,
results are stored in _file_ (default: tblite.txt)

*--post-processing* _file_|_name_::
Add post processing methods to the calculation either by using a toml file as input
or by specifying the post-processing step name directly.
Mayer-Wiberg bond orders are computed by default.
- molmom (molecular multipole moments)
- xtbml (atomistic properties based on Mulliken partitioning)

*--post-processing-output* _file_::
Output file for post processing results in npz format.
(default: tblite-data.npz)

*--json* [_file_]::
Dump results as JSON output to _file_ (default: tblite.json)

Expand Down
Loading
Loading
0