Documentation for module optimize_embedding_potential

...

source: optimize_embedding_potential.F
Loading...

public Subroutines/Functions:

Calculates the derivative of the embedding potential wrt to the expansion coefficients
...
Find the dimension of the auxiliary basis for the expansion of the embedding potential
...
Creates a subsystem embedding potential
FUNCTION
REAL(dp)
max_dens_diff (diff_rho_r)
...
Takes maximization step in embedding potential optimization
Creates and allocates objects for optimization of embedding potential
Print embedding potential as a cube and as a binary (for restarting)
...
Prints a cube for the (rho_A + rho_B - rho_ref) to be minimized in embedding
Read the embedding potential from the binary file
Deallocate stuff for optimizing embedding potential
SUBROUTINE
step_control (opt_embed)
Controls the step, changes the trust radius if needed in maximization of the V_emb
Find out whether we need to swap alpha- and beta- spind densities in the second subsystem. It's only needed because by default alpha-spins go first in a subsystem.. By swapping we impose the constraint:. rho_1(alpha) + rho_2(alpha) = rho_total(alpha). rho_1(beta) + rho_2(beta) = rho_total(beta)

SUBROUTINEcalculate_embed_pot_grad(qs_env, diff_rho_r, diff_rho_spin, opt_embed)

Calculates the derivative of the embedding potential wrt to the expansion coefficients

Arguments:
POINTER
:: qs_env ...
TYPE(pw_p_type),
POINTER
:: diff_rho_r ...
TYPE(pw_p_type),
POINTER
:: diff_rho_spin ...
:: opt_embed ...

SUBROUTINEconv_check_embed(opt_embed, diff_rho_r, diff_rho_spin, output_unit)

...

Arguments:
:: opt_embed ...
TYPE(pw_p_type),
POINTER
:: diff_rho_r ...
TYPE(pw_p_type),
POINTER
:: diff_rho_spin ...
INTEGER
:: output_unit ...

SUBROUTINEfind_aux_dimen(qs_env, dimen_aux)

Find the dimension of the auxiliary basis for the expansion of the embedding potential

Arguments:
POINTER
:: qs_env ...
INTEGER
:: dimen_aux ...

SUBROUTINEinit_embed_pot(qs_env, embed_pot, add_const_pot, const_pot, open_shell_embed, spin_embed_pot)

...

Arguments:
POINTER
:: qs_env ...
TYPE(pw_p_type),
POINTER
:: embed_pot ...
LOGICAL
:: add_const_pot ...
TYPE(pw_p_type),
OPTIONAL, POINTER
:: const_pot ...
LOGICAL
:: open_shell_embed ...
TYPE(pw_p_type),
POINTER
:: spin_embed_pot ...

SUBROUTINEmake_subsys_embed_pot(qs_env, embed_pot, embed_pot_subsys, spin_embed_pot, spin_embed_pot_subsys, open_shell_embed, change_spin_sign)

Creates a subsystem embedding potential

Arguments:
POINTER
:: qs_env ...
TYPE(pw_p_type),
POINTER
:: embed_pot ...
TYPE(pw_p_type),
POINTER
:: embed_pot_subsys ...
TYPE(pw_p_type),
POINTER
:: spin_embed_pot ...
TYPE(pw_p_type),
POINTER
:: spin_embed_pot_subsys ...
LOGICAL
:: open_shell_embed ...
LOGICAL
:: change_spin_sign ...

FUNCTIONmax_dens_diff(diff_rho_r)

...

Return Value ::
REAL(dp)
Arguments:
TYPE(pw_p_type)
:: diff_rho_r ...

SUBROUTINEopt_embed_step(opt_embed, embed_pot, spin_embed_pot, qs_env)

Takes maximization step in embedding potential optimization

Arguments:
:: opt_embed ...
TYPE(pw_p_type),
POINTER
:: embed_pot ...
TYPE(pw_p_type),
POINTER
:: spin_embed_pot ...
POINTER
:: qs_env ...

SUBROUTINEprepare_embed_opt(qs_env, opt_embed, opt_embed_section)

Creates and allocates objects for optimization of embedding potential

Arguments:
POINTER
:: qs_env ...
:: opt_embed ...
POINTER
:: opt_embed_section ...

SUBROUTINEread_embed_pot(qs_env, embed_pot, spin_embed_pot, section, embed_pot_coef, open_shell_embed)

Read the embedding potential from the binary file

Arguments:
POINTER
:: qs_env ...
TYPE(pw_p_type),
POINTER
:: embed_pot ...
TYPE(pw_p_type),
POINTER
:: spin_embed_pot ...
POINTER
:: section ...
TYPE(cp_fm_type),
OPTIONAL, POINTER
:: embed_pot_coef ...
LOGICAL
:: open_shell_embed ...

SUBROUTINErelease_opt_embed(opt_embed)

Deallocate stuff for optimizing embedding potential

Arguments:
:: opt_embed ...

SUBROUTINEstep_control(opt_embed)

Controls the step, changes the trust radius if needed in maximization of the V_emb

Arguments:
:: opt_embed ...

SUBROUTINEunderstand_spin_states(force_env, ref_subsys_number, change_spin, open_shell_embed)

Find out whether we need to swap alpha- and beta- spind densities in the second subsystem

It's only needed because by default alpha-spins go first in a subsystem.

By swapping we impose the constraint:

rho_1(alpha) + rho_2(alpha) = rho_total(alpha)

rho_1(beta) + rho_2(beta) = rho_total(beta)

Arguments:
POINTER
:: force_env ...
INTEGER
:: ref_subsys_number ...
LOGICAL
:: change_spin ...
LOGICAL
:: open_shell_embed ...