Documentation for module replica_types

types used to handle many replica of the same system that differ only in atom positions, and velocity. This is useful for things like path integrals or nudged elastic band

source: replica_types.F
Loading...

public Types:

replica_env_type
keeps replicated information about the replicas

public Subroutines/Functions:

adds the given rep_env to the list of controlled rep_envs.
returns the replica environment with the given id_nr
releases the given replica environment
SUBROUTINE
rep_env_sync (rep_env, vals)
sends the data from each replica to all the other on replica j/=i data from replica i overwrites val(:,i)
sends the data from each replica to all the other in this case the result type is passed

public Types:

TYPE :: replica_env_type

keeps replicated information about the replicas


INTEGER
:: ref_count reference count
INTEGER
:: id_nr identity number (unique or each replica_env)
INTEGER
:: f_env_id id of the force env that will do the calculations for the replicas owned by this processor
INTEGER
:: nrep number of replicas
INTEGER
:: ndim = 3*nparticle
INTEGER
:: nparticle number of particles (usually atoms) in each replica
INTEGER
:: my_rep_group which replica group number this process belongs to (this used to be just cart%mepos(2) but with transposing the cart (row_force=.true.) became cart%mepos(1), and to generalize this it is now a separate variable, so one does not need to know which way the cart is mapped.)
INTEGER
:: force_dim which dimension of cart works on forces together used to be hardcoded to 1. Default is still 1, will be 2 if row_force is true in the rep_env_create call.
REAL(dp),
DIMENSION(:,:), POINTER :: r ...
REAL(dp),
DIMENSION(:,:), POINTER :: v ...
REAL(dp),
DIMENSION(:,:), POINTER :: f ...
LOGICAL
:: sync_v ...
LOGICAL
:: keep_wf_history if the wavefunction history for the owned replicas should be kept
:: original_project_name ...
DIMENSION(:), POINTER :: wf_history wavefunction history for the owned replicas
DIMENSION(:), POINTER :: results ...
INTEGER,
DIMENSION(:), POINTER :: local_rep_indices indices of the local replicas, starting at 1
INTEGER,
DIMENSION(:), POINTER :: replica_owner which replica group number owns the replica irep
INTEGER,
DIMENSION(:), POINTER :: force_rank mapping number of processor in force env -> rank in para_env_f (this used to be row_rank)
INTEGER,
DIMENSION(:), POINTER :: inter_rep_rank mapping replica group number -> rank in para_env_inter_rep (this used to be col_rank)
LOGICAL,
DIMENSION(:), POINTER :: rep_is_local logical if specific replica is a local one.
POINTER :: cart 2d distribution of the processors for the replicas, a column (or row if row_force was true in the rep_env_create call) work together on the same force_env (i.e. changing the row (column) you stay in the same replica), rows (columns) have different replicas
POINTER :: para_env the global para env that contains all the replicas, this is just the cart as para_env
POINTER :: para_env_f parallel environment of the underlying force environment
POINTER :: para_env_inter_rep parallel environment between replica

SUBROUTINErep_envs_add_rep_env(rep_env)

adds the given rep_env to the list of controlled rep_envs.

Arguments:
POINTER
:: rep_env the rep_env to add

FUNCTIONrep_envs_get_rep_env(id_nr, ierr)

returns the replica environment with the given id_nr

Return Value ::
Arguments:
INTEGER,
INTENT(in)
:: id_nr the id_nr of the requested rep_envs
INTEGER,
INTENT(out)
:: ierr ...

SUBROUTINErep_env_release(rep_env)

releases the given replica environment

Arguments:
POINTER
:: rep_env the replica environment to release

SUBROUTINErep_env_sync(rep_env, vals)

sends the data from each replica to all the other on replica j/=i data from replica i overwrites val(:,i)

Arguments:
POINTER
:: rep_env replica environment
REAL(dp),
INTENT(inout)
:: vals(:,:) the values to synchronize (second index runs over replicas)

SUBROUTINErep_env_sync_results(rep_env, results)

sends the data from each replica to all the other in this case the result type is passed

Arguments:
POINTER
:: rep_env replica environment
POINTER
:: results(:) is an array of result_types