xmolecule_interface Module

XMOLECULE_interface: an integrated toolkit for X-ray and molecular physics subroutines providing an interface to other programs



Derived Types

type, public ::  xmol_data

Components

Type Visibility Attributes Name Initial
type(param), public, allocatable :: p
type(atom_set), public, allocatable :: a(:)
type(grid3d), public, allocatable :: g
type(basis), public, allocatable :: b
type(wf_data), public, allocatable :: f
type(process_data), public, allocatable :: s

Subroutines

public subroutine xmolecule_setup(xdata_cptr, filename, lenfilename) bind(c)

sets up the xmol object reads in the input parameters and prepares for the calculation

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
character(len=c_char), intent(inout) :: filename(lenfilename)

input filename

integer(kind=c_int), intent(in) :: lenfilename

length of input filename

public subroutine xmolecule_purge(xdata_cptr) bind(c)

clears all the allocated data purges Xdata structure

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr

public subroutine xmolecule_init(xdata_cptr) bind(c)

initializes calculations performs the first electronic structure calculation

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr

public subroutine xmolecule_get_energy(xdata_cptr, energy) bind(c)

returns energy

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: energy

public subroutine xmolecule_get_mass(xdata_cptr, mass, l_mass) bind(c)

returns atomic masses

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: mass(1:l_mass)
integer(kind=c_int), intent(inout) :: l_mass

public subroutine xmolecule_get_atomlabels(xdata_cptr, labels, l_labels) bind(c)

returns atom labels

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
character(len=c_char), intent(inout) :: labels(6*l_labels)
integer(kind=c_int), intent(inout) :: l_labels

public subroutine xmolecule_orbital_energies(xdata_cptr, ce, l_ce) bind(c)

returns orbital energies

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: ce(l_ce)
integer(kind=c_int), intent(inout) :: l_ce

public subroutine xmolecule_hole_occs_energies_efield(xdata_cptr, pos, occs, energies, efields, upots, l_e, l_occ) bind(c)

returns for hole configurations energies and occupation patterns in the presence of electric field based on Koopmann's theorem

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(in) :: pos(3)
integer(kind=c_int), intent(inout) :: occs(l_occ,l_e)
real(kind=c_double), intent(inout) :: energies(l_e)
real(kind=c_double), intent(inout) :: efields(3,l_e)
real(kind=c_double), intent(inout) :: upots(l_e)
integer(kind=c_int), intent(inout) :: l_e

length of energies

integer(kind=c_int), intent(inout) :: l_occ

length of occ

public subroutine xmolecule_hole_occs_energies_gradients_nacs(xdata_cptr, occs, energies, gradients, nacs, l_e, l_gradient, l_occ) bind(c)

returns for hole configurations energies, occupation patterns, gradients and nacs in the presence of electric field based on Koopmann's theorem

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(inout) :: occs(l_occ,l_e)
real(kind=c_double), intent(inout) :: energies(l_e)
real(kind=c_double), intent(inout) :: gradients(3*l_gradient,l_e)
real(kind=c_double), intent(inout) :: nacs(3*l_gradient,l_e,l_e)
integer(kind=c_int), intent(inout) :: l_e
integer(kind=c_int), intent(inout) :: l_gradient
integer(kind=c_int), intent(inout) :: l_occ

public subroutine xmolecule_part_occs_energies_gradients_nacs(xdata_cptr, occs, energies, gradients, nacs, l_e, l_gradient, l_occ) bind(c)

returns for particle configurations energies, occupation patterns, gradients and nacs in the presence of electric field based on Koopmann's theorem

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(inout) :: occs(l_occ,l_e)
real(kind=c_double), intent(inout) :: energies(l_e)
real(kind=c_double), intent(inout) :: gradients(3*l_gradient,l_e)
real(kind=c_double), intent(inout) :: nacs(3*l_gradient,l_e,l_e)
integer(kind=c_int), intent(inout) :: l_e
integer(kind=c_int), intent(inout) :: l_gradient
integer(kind=c_int), intent(inout) :: l_occ

public subroutine xmolecule_excitation_energies(xdata_cptr, occs, energies, l_e, l_occ) bind(c)

returns excitation energies based on MO energies

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(inout) :: occs(l_occ,l_e)
real(kind=c_double), intent(inout) :: energies(l_e)
integer(kind=c_int), intent(inout) :: l_e
integer(kind=c_int), intent(inout) :: l_occ

public subroutine xmolecule_cis_energies(xdata_cptr, energies, l_e) bind(c)

returns CIS excitation energies

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: energies(l_e)
integer(kind=c_int), intent(inout) :: l_e

public subroutine xmolecule_set_ci_state(xdata_cptr, state) bind(c)

set CI state index

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(in) :: state

public subroutine xmolecule_ci_overlaps(xdata_cptr, olap, l_e) bind(c)

calculated CI state overlaps

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: olap(l_e,l_e)
integer(kind=c_int), intent(inout) :: l_e

public subroutine xmolecule_ci_energies(xdata_cptr, energies, l_e) bind(c)

get CI state energies

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: energies(l_e)
integer(kind=c_int), intent(inout) :: l_e

public subroutine xmolecule_get_cis_gradient(xdata_cptr, state, grad, l_grad) bind(c)

compute the CIS gradient

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(in) :: state
real(kind=c_double), intent(inout) :: grad(3*l_grad)
integer(kind=c_int), intent(inout) :: l_grad

public subroutine xmolecule_get_cis_gradient_nacs(xdata_cptr, state, grad, l_grad, nacs, l_nacs) bind(c)

compute CIS gradients and nacs

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(in) :: state
real(kind=c_double), intent(inout) :: grad(3*l_grad)
integer(kind=c_int), intent(inout) :: l_grad
real(kind=c_double), intent(inout) :: nacs(3*l_grad,l_nacs,l_nacs)
integer(kind=c_int), intent(inout) :: l_nacs

public subroutine xmolecule_get_cis_transdens(xdata_cptr, tdens, state, l_ao) bind(c)

compute the cis state transition density

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: tdens(l_ao,l_ao)
integer(kind=c_int), intent(in) :: state
integer(kind=c_int), intent(in) :: l_ao

public subroutine xmolecule_get_gradient(xdata_cptr, grad, l_grad) bind(c)

compute the HFS, HF, or ROHF gradient

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: grad(3,l_grad)
integer(kind=c_int), intent(inout) :: l_grad

public subroutine xmolecule_get_auger_ci(xdata_cptr, f_irrep, f_multp, f_index, rate, energy, n_process) bind(c)

return auger decay rates based on configuration interation

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(inout) :: f_irrep(n_process)
integer(kind=c_int), intent(inout) :: f_multp(n_process)
integer(kind=c_int), intent(inout) :: f_index(n_process)
real(kind=c_double), intent(inout) :: rate(n_process)
real(kind=c_double), intent(inout) :: energy(n_process)
integer(kind=c_int), intent(inout) :: n_process

public subroutine xmolecule_get_process(xdata_cptr, final_occs, e_ev, val, tag, n_process, l_occ) bind(c)

compute process data

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(inout) :: final_occs(l_occ,n_process)
integer(kind=c_int), intent(inout) :: e_ev(n_process)
real(kind=c_double), intent(inout) :: val(n_process)
character(len=c_char), intent(inout) :: tag(n_process)
integer(kind=c_int), intent(inout) :: n_process
integer(kind=c_int), intent(inout) :: l_occ

public subroutine xmolecule_get_population(xdata_cptr, pop, l_mo, l_atom) bind(c)

compute orbital population analysis

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: pop(l_mo,l_atom)
integer(kind=c_int), intent(in) :: l_mo
integer(kind=c_int), intent(in) :: l_atom

public subroutine xmolecule_get_ao_labels(xdata_cptr, ao_labels, l_ao) bind(c)

return atomic orbital labels

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
character(len=c_char), intent(inout) :: ao_labels(l_ao*10)
integer(kind=c_int), intent(inout) :: l_ao

public subroutine xmolecule_get_overlapmatrix(xdata_cptr, s_ao, l_ao) bind(c)

return overlap matrix

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: s_ao(l_ao,l_ao)
integer(kind=c_int), intent(inout) :: l_ao

public subroutine xmolecule_get_mo_coef(xdata_cptr, mo_coef, l_mo, l_ao) bind(c)

return LCAO coefficients

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: mo_coef(l_ao,l_mo)
integer(kind=c_int), intent(inout) :: l_mo
integer(kind=c_int), intent(inout) :: l_ao

public subroutine xmolecule_set_mo_coef(xdata_cptr, mo_coef, l_ao, l_mo) bind(c)

set LCAO coefficients

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(in) :: mo_coef(l_ao,l_mo)
integer(kind=c_int), intent(in) :: l_ao
integer(kind=c_int), intent(in) :: l_mo

public subroutine xmolecule_get_nao_conf(xdata_cptr, nao_conf_string, l_atom) bind(c)

returns numerical atomic orbital configuration string

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
character(len=c_char), intent(inout) :: nao_conf_string(l_atom*512)
integer(kind=c_int), intent(in) :: l_atom

public subroutine xmolecule_get_mullikencharge(xdata_cptr, charge, l_charge) bind(c)

returns mulliken charges

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: charge(l_charge)
integer(kind=c_int), intent(inout) :: l_charge

public subroutine xmolecule_get_loewdincharge(xdata_cptr, charge, l_charge) bind(c)

returns loewdin charges

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: charge(l_charge)
integer(kind=c_int), intent(inout) :: l_charge

public subroutine xmolecule_get_cis_mullikenpop(xdata_cptr, charge, l_charge, state, type) bind(c)

returns mulliken population for CIS

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: charge(l_charge)
integer(kind=c_int), intent(inout) :: l_charge
integer(kind=c_int), intent(inout) :: state
character(len=c_char), intent(in) :: type

public subroutine xmolecule_get_cis_loewdinpop(xdata_cptr, charge, l_charge, state, type) bind(c)

returns Loewdin population for CIS

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: charge(l_charge)
integer(kind=c_int), intent(inout) :: l_charge
integer(kind=c_int), intent(inout) :: state
character(len=c_char), intent(in) :: type

public subroutine xmolecule_get_bondorder(xdata_cptr, bo, n_atom) bind(c)

returns bond order analysis

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: bo(n_atom,n_atom)
integer(kind=c_int), intent(inout) :: n_atom

public subroutine xmolecule_get_cis_oscillator_strength(xdata_cptr, state, os, tdip, nstates) bind(c)

returns cis oscillator strengths

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(in) :: state
real(kind=c_double), intent(inout) :: os(nstates)
real(kind=c_double), intent(inout) :: tdip(nstates,3)
integer(kind=c_int), intent(inout) :: nstates

public subroutine xmolecule_get_oscillator_strength(xdata_cptr, os, tdip, nmo) bind(c)

returns oscillator strength

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: os(nmo,nmo)
real(kind=c_double), intent(inout) :: tdip(nmo,nmo,3)
integer(kind=c_int), intent(inout) :: nmo

public subroutine xmolecule_get_fluorescencerates(xdata_cptr, fluorates, nmo) bind(c)

returns fluorescence rates

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: fluorates(nmo,nmo)
integer(kind=c_int), intent(inout) :: nmo

public subroutine xmolecule_write_molden(xdata_cptr) bind(c)

writes molden file

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr

public subroutine xmolecule_write_density_cube(xdata_cptr) bind(c)

writes density cube file

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr

public subroutine xmolecule_write_mo_cube(xdata_cptr, mo) bind(c)

writes mo cub file

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(in) :: mo

public subroutine xmolecule_get_geom(xdata_cptr, geom, l_geom) bind(c)

returns geometry

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(inout) :: geom(3,l_geom)
integer(kind=c_int), intent(inout) :: l_geom

public subroutine xmolecule_set_calculate_ci_overlap(xdata_cptr, yes) bind(c)

triggers calculation of CI overlap

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(in) :: yes

public subroutine xmolecule_set_geom(xdata_cptr, geom, l_geom) bind(c)

sets geometry

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
real(kind=c_double), intent(in) :: geom(3,l_geom)
integer(kind=c_int), intent(inout) :: l_geom

public subroutine xmolecule_write_chkpt(xdata_cptr) bind(c)

writes chkpt file

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr

public subroutine xmolecule_read_chkpt(xdata_cptr) bind(c)

reads chkpt file

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr

public subroutine xmolecule_get_occ(xdata_cptr, occ, l_occ) bind(c)

returns occupation numbers

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(inout) :: occ(l_occ)
integer(kind=c_int), intent(inout) :: l_occ

public subroutine xmolecule_set_multp(xdata_cptr, multp_in) bind(c)

set spin multiplicity

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(in) :: multp_in

public subroutine xmolecule_set_irrep(xdata_cptr, irrep_in) bind(c)

set irreducible representation

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(in) :: irrep_in

public subroutine cistate2occ(xdata_cptr, state, occ, l_occ) bind(c)

returns the dominant configuration of the CI state with state index state

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(in) :: state
integer(kind=c_int), intent(inout) :: occ(l_occ)
integer(kind=c_int), intent(inout) :: l_occ

public subroutine occ2cistate(xdata_cptr, occ_in, l_occ_in, state) bind(c)

randomly selects a CI states according to overlap with given occupation

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(in) :: occ_in(l_occ_in)
integer(kind=c_int), intent(in) :: l_occ_in
integer(kind=c_int), intent(out) :: state

public recursive subroutine xmolecule_set_occ(xdata_cptr, occ_in, l_occ_in) bind(c)

sets occupation numbers

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(inout) :: xdata_cptr
integer(kind=c_int), intent(in) :: occ_in(l_occ_in)
integer(kind=c_int), intent(in) :: l_occ_in