ommp_interface Module

The interface of the library, basically all the operation performed by an external code should be done through the routines of this module. The interface is conceived to work naturally with C and Fortran; the C interface is also used to build the interface for Python. In a fortran code, this module can be imported and it should expose directly all the vector and scalar quantities needed. In a C code, routines are provided to get the pointer or the values of vector and scalar quantites respectively.


Uses

  • module~~ommp_interface~~UsesGraph module~ommp_interface ommp_interface module~mod_electrostatics mod_electrostatics module~ommp_interface->module~mod_electrostatics module~mod_memory mod_memory module~ommp_interface->module~mod_memory module~mod_constants mod_constants module~ommp_interface->module~mod_constants module~mod_io mod_io module~ommp_interface->module~mod_io module~mod_topology mod_topology module~ommp_interface->module~mod_topology module~mod_profiling mod_profiling module~ommp_interface->module~mod_profiling module~mod_mmpol mod_mmpol module~ommp_interface->module~mod_mmpol module~mod_qm_helper mod_qm_helper module~ommp_interface->module~mod_qm_helper module~mod_electrostatics->module~mod_memory module~mod_electrostatics->module~mod_constants module~mod_electrostatics->module~mod_io module~mod_electrostatics->module~mod_topology module~mod_electrostatics->module~mod_profiling module~mod_adjacency_mat mod_adjacency_mat module~mod_electrostatics->module~mod_adjacency_mat module~mod_memory->module~mod_constants module~mod_memory->module~mod_io iso_c_binding iso_c_binding module~mod_memory->iso_c_binding module~mod_constants->iso_c_binding module~mod_io->module~mod_constants module~mod_topology->module~mod_memory module~mod_topology->module~mod_adjacency_mat module~mod_profiling->module~mod_memory module~mod_profiling->module~mod_constants module~mod_profiling->module~mod_io module~mod_mmpol->module~mod_electrostatics module~mod_mmpol->module~mod_memory module~mod_mmpol->module~mod_constants module~mod_mmpol->module~mod_io module~mod_mmpol->module~mod_topology module~mod_mmpol->module~mod_adjacency_mat module~mod_link_atom mod_link_atom module~mod_mmpol->module~mod_link_atom module~mod_nonbonded mod_nonbonded module~mod_mmpol->module~mod_nonbonded module~mod_bonded mod_bonded module~mod_mmpol->module~mod_bonded module~mod_qm_helper->module~mod_memory module~mod_qm_helper->module~mod_topology module~mod_qm_helper->module~mod_mmpol module~mod_qm_helper->module~mod_nonbonded module~mod_adjacency_mat->module~mod_memory module~mod_link_atom->module~mod_memory module~mod_link_atom->module~mod_constants module~mod_link_atom->module~mod_io module~mod_link_atom->module~mod_topology module~mod_link_atom->module~mod_nonbonded module~mod_link_atom->module~mod_bonded module~mod_utils mod_utils module~mod_link_atom->module~mod_utils module~mod_nonbonded->module~mod_memory module~mod_nonbonded->module~mod_constants module~mod_nonbonded->module~mod_topology module~mod_nonbonded->module~mod_adjacency_mat module~mod_neighbor_list mod_neighbor_list module~mod_nonbonded->module~mod_neighbor_list module~mod_bonded->module~mod_memory module~mod_bonded->module~mod_io module~mod_bonded->module~mod_topology module~mod_utils->module~mod_memory module~mod_utils->module~mod_constants module~mod_neighbor_list->module~mod_memory module~mod_neighbor_list->module~mod_io module~mod_neighbor_list->module~mod_adjacency_mat

Used by

  • module~~ommp_interface~~UsedByGraph module~ommp_interface ommp_interface proc~c_ommp_full_geomgrad C_ommp_full_geomgrad proc~c_ommp_full_geomgrad->module~ommp_interface module~test_geomgrad~2 test_geomgrad module~test_geomgrad~2->module~ommp_interface module~test_geomgrad test_geomgrad module~test_geomgrad->module~ommp_interface module~mod_ommp_c_interface mod_ommp_C_interface module~mod_ommp_c_interface->module~ommp_interface program~test_si_geomgrad_num test_SI_geomgrad_num program~test_si_geomgrad_num->module~ommp_interface program~test_si_geomgrad_num->module~test_geomgrad program~test_si_init test_SI_init program~test_si_init->module~ommp_interface program~test_si_potential test_SI_potential program~test_si_potential->module~ommp_interface program~test_si_geomgrad test_SI_geomgrad program~test_si_geomgrad->module~ommp_interface program~test_si_geomgrad->module~test_geomgrad

Contents


Variables

Type Visibility Attributes Name Initial
character, public, parameter :: ommp_version_string = _OMMP_VERSION

Functions

public function ommp_get_polelec_energy(sys_obj) result(ene)

Solve the polarization equation for a certain external field and compute the interaction energy of the induced dipoles with themselves and fixed multipoles.

Read more…

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_fixedelec_energy(sys_obj) result(ene)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_full_ele_energy(sys_obj) result(ene)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_vdw_energy(sys_obj) result(evdw)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_bond_energy(sys_obj) result(eb)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_angle_energy(sys_obj) result(ea)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_strbnd_energy(sys_obj) result(eba)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_urey_energy(sys_obj) result(eub)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_opb_energy(sys_obj) result(eopb)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_imptorsion_energy(sys_obj) result(et)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_torsion_energy(sys_obj) result(et)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_pitors_energy(sys_obj) result(ept)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_strtor_energy(sys_obj) result(est)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_angtor_energy(sys_obj) result(eat)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_tortor_energy(sys_obj) result(ett)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_full_bnd_energy(sys_obj) result(ene)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_get_full_energy(sys_obj) result(ene)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj

Return Value real(kind=ommp_real)

public function ommp_qm_helper_vdw_energy(qm, s) result(evdw)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(in) :: qm
type(ommp_system), intent(inout) :: s

Return Value real(kind=ommp_real)

public function ommp_create_link_atom(qm, s, imm, iqm, ila, prmfile, la_dist_in, n_eel_remove_in) result(la_idx)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(inout) :: qm
type(ommp_system), intent(inout) :: s
integer(kind=ommp_integer), intent(in) :: imm
integer(kind=ommp_integer), intent(in) :: iqm
integer(kind=ommp_integer), intent(in) :: ila
character(len=*), intent(in) :: prmfile
real(kind=ommp_real), intent(in), optional :: la_dist_in
integer(kind=ommp_integer), intent(in), optional :: n_eel_remove_in

Return Value integer(kind=ommp_integer)


Subroutines

public subroutine ommp_set_default_solver(s, solver)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), pointer :: s
integer(kind=ommp_integer), intent(in), value :: solver

public subroutine ommp_set_default_matv(s, matv)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), pointer :: s
integer(kind=ommp_integer), intent(in), value :: matv

public subroutine ommp_init_mmp(s, filename)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), pointer :: s
character(len=*) :: filename

public subroutine ommp_init_xyz(s, xyzfile, prmfile)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), pointer :: s
character(len=*) :: xyzfile
character(len=*) :: prmfile

public subroutine ommp_set_frozen_atoms(s, n, frozen)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), pointer :: s

OpenMMPol system

integer(kind=ommp_integer), intent(in) :: n

Atoms to freeze

integer(kind=ommp_integer), intent(in) :: frozen(n)

Atoms to freeze

public subroutine ommp_turn_pol_off(s, n, nopol)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), pointer :: s

OpenMMPol system

integer(kind=ommp_integer), intent(in) :: n

Atoms to freeze in MM indexing

integer(kind=ommp_integer), intent(in) :: nopol(n)

Atoms to freeze in MM indexing

public subroutine ommp_terminate(s)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), pointer :: s

public subroutine ommp_set_external_field(sys_obj, ext_field, solver, matv, add_mm_field)

This function get an external field and solve the polarization system in the presence of the provided external field.

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj
real(kind=ommp_real), intent(in) :: ext_field(3,sys_obj%eel%pol_atoms)
integer(kind=ommp_integer), intent(in), value :: solver
integer(kind=ommp_integer), intent(in), value :: matv
logical, intent(in), optional, value :: add_mm_field

public subroutine ommp_set_external_field_nomm(sys_obj, ext_field, solver, matv)

This is just the same as ommp_set_external_field but implicitly assuming ommp_set_external_field as false, mainly here for interface consistency with C

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: sys_obj
real(kind=ommp_real), intent(in) :: ext_field(3,sys_obj%eel%pol_atoms)
integer(kind=ommp_integer), intent(in), value :: solver
integer(kind=ommp_integer), intent(in), value :: matv

public subroutine ommp_potential_mmpol2ext(s, n, cext, v)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
integer(kind=ommp_integer), intent(in) :: n
real(kind=ommp_real), intent(in) :: cext(3,n)
real(kind=ommp_real), intent(inout) :: v(n)

public subroutine ommp_potential_pol2ext(s, n, cext, v)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
integer(kind=ommp_integer), intent(in) :: n
real(kind=ommp_real), intent(in) :: cext(3,n)
real(kind=ommp_real), intent(inout) :: v(n)

public subroutine ommp_potential_mm2ext(s, n, cext, v)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
integer(kind=ommp_integer), intent(in) :: n
real(kind=ommp_real), intent(in) :: cext(3,n)
real(kind=ommp_real), intent(inout) :: v(n)

public subroutine ommp_field_mmpol2ext(s, n, cext, E)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(in), target :: s
integer(kind=ommp_integer), intent(in), value :: n
real(kind=ommp_real), intent(in) :: cext(3,n)
real(kind=ommp_real), intent(out) :: E(3,n)

public subroutine ommp_field_mm2ext(s, n, cext, E)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(in), target :: s
integer(kind=ommp_integer), intent(in), value :: n
real(kind=ommp_real), intent(in) :: cext(3,n)
real(kind=ommp_real), intent(out) :: E(3,n)

public subroutine ommp_field_pol2ext(s, n, cext, E)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(in), target :: s
integer(kind=ommp_integer), intent(in), value :: n
real(kind=ommp_real), intent(in) :: cext(3,n)
real(kind=ommp_real), intent(out) :: E(3,n)

public subroutine ommp_fixedelec_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_polelec_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_vdw_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_rotation_geomgrad(s, E, Egrd, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(in) :: E(:,:)
real(kind=ommp_real), intent(in) :: Egrd(:,:)
real(kind=ommp_real), intent(out) :: grd(:,:)

public subroutine ommp_bond_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_angle_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_strbnd_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_urey_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_torsion_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_imptorsion_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_angtor_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_opb_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_strtor_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_tortor_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_pitors_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_full_bnd_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_full_geomgrad(s, grd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout), target :: s
real(kind=ommp_real), intent(out) :: grd(3,s%top%mm_atoms)

public subroutine ommp_init_hdf5(s, filename, namespace)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), pointer :: s
character(len=*) :: filename
character(len=*) :: namespace

public subroutine ommp_save_as_hdf5(s, filename, namespace)

This function is an interface for saving an HDF5 file with all the data contained in mmpol module using mod_io

Arguments

Type IntentOptional Attributes Name
type(ommp_system), pointer :: s
character(len=*) :: filename
character(len=*) :: namespace

public subroutine ommp_checkpoint(s, filename, namespace)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), pointer :: s
character(len=*) :: filename
character(len=*) :: namespace

public subroutine ommp_init_qm_helper(s, n, cqm, qqm, zqm)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(inout), pointer :: s
integer(kind=ommp_integer) :: n
real(kind=ommp_real), intent(in) :: cqm(:,:)
real(kind=ommp_real), intent(in) :: qqm(:)
integer(kind=ommp_integer), intent(in) :: zqm(:)

public subroutine ommp_qm_helper_set_frozen_atoms(s, n, frozen)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(inout), pointer :: s

OpenMMPol system

integer(kind=ommp_integer), intent(in) :: n

Atoms to freeze

integer(kind=ommp_integer), intent(in) :: frozen(n)

Atoms to freeze

public subroutine ommp_terminate_qm_helper(s)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(inout), pointer :: s

public subroutine ommp_qm_helper_update_coord(s, cqm)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(inout) :: s
real(kind=ommp_real), intent(in) :: cqm(:,:)

public subroutine ommp_qm_helper_vdw_geomgrad(qm, s, qmg, mmg)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(in) :: qm
type(ommp_system), intent(inout) :: s
real(kind=ommp_real), intent(out) :: qmg(:,:)
real(kind=ommp_real), intent(out) :: mmg(:,:)

public subroutine ommp_qm_helper_link_atom_geomgrad(qm, s, qmg, mmg, old_qmg)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(in) :: qm
type(ommp_system), intent(inout) :: s
real(kind=ommp_real), intent(out) :: qmg(:,:)
real(kind=ommp_real), intent(out) :: mmg(:,:)
real(kind=ommp_real), intent(in) :: old_qmg(:,:)

public subroutine ommp_get_link_atom_coordinates(s, la_idx, crd)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(in) :: s
integer(kind=ommp_integer), intent(in) :: la_idx
real(kind=ommp_real), intent(out), dimension(3) :: crd

public subroutine ommp_update_link_atoms_position(qm, s)

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(inout) :: qm
type(ommp_system), intent(inout) :: s

public subroutine ommp_smartinput(json_filename, system, qmhelp)

External interface for smartinput function

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: json_filename
type(ommp_system), intent(inout), pointer :: system
type(ommp_qm_helper), intent(inout), pointer :: qmhelp

public subroutine ommp_smartinput_cpstr(json_filename, path, outs)

External interface for smartinput function

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: json_filename
character(len=*), intent(in) :: path
character(len=*), intent(inout) :: outs

public subroutine ommp_system_from_qm_helper(qmh, prm_file, sys)

Takes in input a QM Helper object, with initialized atom types, and using a parameter file, it generates a OMMP System object that corresponds to the QM system. It is used for internal testing pourpose but other creative things are always possible.

Arguments

Type IntentOptional Attributes Name
type(ommp_qm_helper), intent(in) :: qmh
character(len=*), intent(in) :: prm_file
type(ommp_system), intent(inout), pointer :: sys

public subroutine ommp_set_vdw_cutoff(s, cutoff)

Arguments

Type IntentOptional Attributes Name
type(ommp_system), intent(inout) :: s
real(kind=ommp_real), intent(in) :: cutoff