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

Fix example in Fortran API #107

Merged
merged 1 commit into from
Oct 23, 2024
Merged
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
12 changes: 7 additions & 5 deletions doc/api/fortran.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,11 @@ An example for performing a calculation with DFT-D3(BJ)-ATM is shown below
.. code-block:: fortran

subroutine calc_dftd3(mol, method, energy, gradient, sigma, error)
use mctc_env
use mctc_io
use dftd3
use mctc_env, only : wp, error_type
use mctc_io, only : structure_type
use dftd3, only : d3_model, d3_param, rational_damping_param, &
& get_rational_damping, new_rational_damping, new_d3_model, &
& get_dispersion, realspace_cutoff
type(structure_type), intent(in) :: mol
character(len=*), intent(in) :: method
real(wp), intent(out) :: energy
Expand All @@ -136,11 +138,11 @@ An example for performing a calculation with DFT-D3(BJ)-ATM is shown below
type(error_type), allocatable, intent(out) :: error
type(d3_model) :: disp
type(d3_param) :: inp
class(damping_param), allocatable :: param
type(rational_damping_param) :: param

call get_rational_damping(inp, method, error, s9=1.0_wp)
if (allocated(error)) return
call new_rational_damping(param, inp, mol)
call new_rational_damping(param, inp)

call new_d3_model(disp, mol)

Expand Down
Loading