|
CP2K 2.4 (Revision 12889)
|
contains miscellaneous subroutines used in the Monte Carlo runs,mostly geared towards changes in coordinates More...
Functions | |
| subroutine, public | check_for_overlap (force_env, nchains, nunits, loverlap, mol_type, cell_length, molecule_number) |
| looks for overlaps (intermolecular distances less than rmin) | |
| subroutine, public | get_center_of_mass (coordinates, natom, center_of_mass, mass) |
| calculates the center of mass of a given molecule | |
| subroutine, public | mc_coordinate_fold (coordinates, nchains_tot, mol_type, mass, nunits, box_length) |
| folds all the coordinates into the center simulation box using a center of mass cutoff | |
| subroutine, public | generate_cbmc_swap_config (force_env, BETA, max_val, min_val, exp_max_val, exp_min_val, nswapmoves, rosenbluth_weight, start_atom, natoms_tot, nunits, nunits_mol, mass, loverlap, choosen_energy, old_energy, ionode, lremove, mol_type, nchains, source, group, rng_stream, error, avbmc_atom, rmin, rmax, move_type, target_atom) |
| takes the last molecule in a force environment and moves it around to different center of mass positions and orientations, selecting one based on the rosenbluth weight | |
| subroutine, public | rotate_molecule (r, mass, natoms, rng_stream, error) |
| rotates a molecule randomly around the center of mass, sequentially in x, y, and z directions | |
| subroutine, public | find_mc_test_molecule (mc_molecule_info, start_atom, box_number, molecule_type, rng_stream, box, molecule_type_old, error) |
| selects a molecule at random to perform a MC move on...you can specify the box the molecule should be in, its type, both, or neither | |
| subroutine, public | create_discrete_array (cell, discrete_array, step_size) |
| generates an array that tells us which sides of the simulation cell we can increase or decrease using a discrete volume move | |
| subroutine, private | generate_avbmc_insertion (rmin, rmax, r_target, move_type, r_insert, abc, rng_stream, error) |
| generates an insertion point in either the "in" or the "out" volume of a target atom, where the "in" volume is a shell with inner radius rmin and outer radius rmax | |
Variables | |
| CHARACTER(len=*), parameter, private | moduleN = 'mc_coordinates' |
contains miscellaneous subroutines used in the Monte Carlo runs,mostly geared towards changes in coordinates
| subroutine,public mc_coordinates::check_for_overlap | ( | TYPE(force_env_type),pointer | force_env, |
| INTEGER,dimension(:),intent(in) | nchains, | ||
| INTEGER,dimension(:),intent(in) | nunits, | ||
| LOGICAL,intent(out) | loverlap, | ||
| INTEGER,dimension(:),intent(in) | mol_type, | ||
| REAL(KIND=dp),dimension(1:3),intent(in),optional | cell_length, | ||
| INTEGER,intent(in),optional | molecule_number | ||
| ) |
looks for overlaps (intermolecular distances less than rmin)
| force_env | the force environment containing the coordinates |
| nchains | the number of molecules of each type in the box |
| nunits | the number of interaction sites for each molecule |
| loverlap | returns .TRUE. if atoms overlap |
| mol_type | an array that indicates the type of each molecule |
| cell_length | the length of the box...if none is specified, it uses the cell found in the force_env |
| molecule_number | if present, just look for overlaps with this molecule |
Suitable for parallel use.
Definition at line 69 of file mc_coordinates.f90.
References cp_subsys_types::cp_subsys_get(), force_env_types::force_env_get(), and timings::timeset().
Referenced by generate_cbmc_swap_config(), mc_ensembles::mc_compute_virial(), mc_moves::mc_conformation_change(), mc_ge_moves::mc_ge_swap_move(), mc_ge_moves::mc_ge_volume_move(), mc_moves::mc_molecule_rotation(), mc_moves::mc_molecule_translation(), mc_ge_moves::mc_Quickstep_move(), mc_ensembles::mc_run_ensemble(), and mc_moves::mc_volume_move().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine,public mc_coordinates::create_discrete_array | ( | REAL(dp),dimension(1:3),intent(in) | cell, |
| INTEGER,dimension(1:3, 1:2),intent(out) | discrete_array, | ||
| REAL(dp),intent(in) | step_size | ||
| ) |
generates an array that tells us which sides of the simulation cell we can increase or decrease using a discrete volume move
| cell | the lengths of the sides of the cell |
| discrete_array | the array that indicates which sides we can move |
| step_size | the size of the discrete volume move |
Suitable for parallel.
Definition at line 931 of file mc_coordinates.f90.
| subroutine,public mc_coordinates::find_mc_test_molecule | ( | TYPE(mc_molecule_info_type),pointer | mc_molecule_info, |
| INTEGER,intent(out) | start_atom, | ||
| INTEGER,intent(out) | box_number, | ||
| INTEGER,intent(out) | molecule_type, | ||
| TYPE(rng_stream_type),pointer | rng_stream, | ||
| INTEGER,intent(in),optional | box, | ||
| INTEGER,intent(in),optional | molecule_type_old, | ||
| TYPE(cp_error_type),intent(inout) | error | ||
| ) |
selects a molecule at random to perform a MC move on...you can specify the box the molecule should be in, its type, both, or neither
| mc_molecule_info | the structure that contains some global molecule data |
| start_atom | the number of the first atom in the choosen molecule in relation to the force_env it's in |
| box_number | the box the choosen molecule is in |
| molecule_type | the type of molecule the choosen molecule is |
| rng_stream | the stream we pull random numbers from |
| box | if present, tells the routine which box to grab a molecule from |
| molecule_type_old | if present, tells the routine which molecule type to select from |
| error | the optional cp_error_type |
Designed only for serial use.
Definition at line 774 of file mc_coordinates.f90.
References CPPostcondition, error, mc_types::get_mc_molecule_info(), and timings::timeset().
Here is the call graph for this function:| subroutine,private mc_coordinates::generate_avbmc_insertion | ( | REAL(KIND=dp),intent(in) | rmin, |
| REAL(KIND=dp),intent(in) | rmax, | ||
| REAL(KIND=dp),dimension(1:3),intent(in) | r_target, | ||
| CHARACTER(LEN=*),intent(in) | move_type, | ||
| REAL(KIND=dp),dimension(1:3),intent(out) | r_insert, | ||
| REAL(KIND=dp),dimension(1:3),intent(in) | abc, | ||
| TYPE(rng_stream_type),pointer | rng_stream, | ||
| TYPE(cp_error_type),intent(inout) | error | ||
| ) | [private] |
generates an insertion point in either the "in" or the "out" volume of a target atom, where the "in" volume is a shell with inner radius rmin and outer radius rmax
| rmin | the minimum AVBMC radius for the shell around the target |
| rmax | the maximum AVBMC radius for the shell around the target |
| r_target | the coordinates of the target atom |
| move_type | generate configs in the "in" or "out" volume |
| r_insert | the output insertion site |
| abc | the lengths of the sides of the simulation box |
| rng_stream | the random number stream that we draw from |
Use only in serial.
Definition at line 997 of file mc_coordinates.f90.
References error.
Referenced by generate_cbmc_swap_config().
Here is the caller graph for this function:| subroutine,public mc_coordinates::generate_cbmc_swap_config | ( | TYPE(force_env_type),pointer | force_env, |
| REAL(KIND=dp),intent(in) | BETA, | ||
| REAL(KIND=dp),intent(in) | max_val, | ||
| REAL(KIND=dp),intent(in) | min_val, | ||
| REAL(KIND=dp),intent(in) | exp_max_val, | ||
| REAL(KIND=dp),intent(in) | exp_min_val, | ||
| INTEGER,intent(in) | nswapmoves, | ||
| REAL(KIND=dp),intent(out) | rosenbluth_weight, | ||
| INTEGER,intent(in) | start_atom, | ||
| INTEGER,intent(in) | natoms_tot, | ||
| INTEGER,dimension(:),intent(in) | nunits, | ||
| INTEGER,intent(in) | nunits_mol, | ||
| REAL(dp),dimension(1:nunits_mol),intent(in) | mass, | ||
| LOGICAL,intent(out) | loverlap, | ||
| REAL(KIND=dp),intent(out) | choosen_energy, | ||
| REAL(KIND=dp),intent(in) | old_energy, | ||
| LOGICAL,intent(in) | ionode, | ||
| LOGICAL,intent(in) | lremove, | ||
| INTEGER,dimension(:),intent(in) | mol_type, | ||
| INTEGER,dimension(:),intent(in) | nchains, | ||
| INTEGER,intent(in) | source, | ||
| INTEGER,intent(in) | group, | ||
| TYPE(rng_stream_type),pointer | rng_stream, | ||
| TYPE(cp_error_type) | error, | ||
| INTEGER,intent(in),optional | avbmc_atom, | ||
| REAL(KIND=dp),intent(in),optional | rmin, | ||
| REAL(KIND=dp),intent(in),optional | rmax, | ||
| CHARACTER(LEN=*),intent(in),optional | move_type, | ||
| INTEGER,intent(in),optional | target_atom | ||
| ) |
takes the last molecule in a force environment and moves it around to different center of mass positions and orientations, selecting one based on the rosenbluth weight
| force_env | the force environment containing the coordinates |
| BETA | the value of 1/kT for this simulations, in a.u. |
| nswapmoves | the number of desired trial configurations |
| rosenbluth_weight | the Rosenbluth weight for this set of configs |
| start_atom | the atom number that the molecule to be swapped starts on |
| natoms_tot | the total number of interaction sites in the box |
| nunits | the number of interaction sites for every molecule_type |
| nunits_tot | the number of interaction sites in the choosen molecule |
| mass | the mass for every interaction site of every molecule type |
| loverlap | the flag that indicates if all of the configs have an atomic overlap |
| choosen_energy | the energy of the choosen config |
| old_energy | the energy that we subtract from all of the trial energies to prevent numerical overflows |
| ionode | indicates if we're on the main CPU |
| lremove | is this the Rosenbluth weight for a removal box? |
| mol_type | an array that contains the molecule type for every atom in the box |
| nchains | the number of molecules of each type in this box |
| source | the MPI source value, for broadcasts |
| group | the MPI group value, for broadcasts |
| rng_stream | the random number stream that we draw from |
| error | the the cp_error type |
Definition at line 338 of file mc_coordinates.f90.
References physcon::angstrom, check_for_overlap(), cp_subsys_types::cp_subsys_get(), error, force_env_methods::force_env_calc_energy_force(), force_env_types::force_env_get(), generate_avbmc_insertion(), get_center_of_mass(), rotate_molecule(), and timings::timeset().
Here is the call graph for this function:| subroutine,public mc_coordinates::get_center_of_mass | ( | REAL(KIND=dp),dimension(:, :),intent(in) | coordinates, |
| INTEGER,intent(in) | natom, | ||
| REAL(KIND=dp),dimension(1:3),intent(out) | center_of_mass, | ||
| REAL(KIND=dp),dimension(:),intent(in) | mass | ||
| ) |
calculates the center of mass of a given molecule
| coordinates | the coordiantes of the atoms in the molecule |
| natom | the number of atoms in the molecule |
| center_of_mass | the coordinates of the center of mass |
| mass | the mass of the atoms in the molecule |
Designed for parallel use.
Definition at line 200 of file mc_coordinates.f90.
References timings::timeset().
Referenced by generate_cbmc_swap_config(), mc_coordinate_fold(), and rotate_molecule().
Here is the call graph for this function:
Here is the caller graph for this function:| subroutine,public mc_coordinates::mc_coordinate_fold | ( | REAL(KIND=dp),dimension(:, :),intent(inout) | coordinates, |
| INTEGER,intent(in) | nchains_tot, | ||
| INTEGER,dimension(:),intent(in) | mol_type, | ||
| REAL(KIND=dp),dimension(:, :),intent(in) | mass, | ||
| INTEGER,dimension(:),intent(in) | nunits, | ||
| REAL(KIND=dp),dimension(1:3),intent(in) | box_length | ||
| ) |
folds all the coordinates into the center simulation box using a center of mass cutoff
| coordinates | the coordiantes of the atoms in the system |
| nchains_tot | the total number of molecules in the box |
| mol_type | an array that indicates the type of every molecule in the box |
| mass | the mass of every atom for all molecule types |
| nunits | the number of interaction sites for each molecule type |
| box_length | an array for the lengths of the simulation box sides |
Designed for parallel use.
Definition at line 250 of file mc_coordinates.f90.
References get_center_of_mass(), and timings::timeset().
Here is the call graph for this function:| subroutine,public mc_coordinates::rotate_molecule | ( | REAL(KIND=dp),dimension(1:3, 1:natoms),intent(inout) | r, |
| REAL(KIND=dp),dimension(1:natoms),intent(in) | mass, | ||
| INTEGER,intent(in) | natoms, | ||
| TYPE(rng_stream_type),pointer | rng_stream, | ||
| TYPE(cp_error_type),intent(inout) | error | ||
| ) |
rotates a molecule randomly around the center of mass, sequentially in x, y, and z directions
| r | the coordinates of the molecule to rotate |
| mass | the mass of all the atoms in the molecule |
| natoms | the number of atoms in the molecule |
| rng_stream | the stream we pull random numbers from |
Use only in serial.
Definition at line 678 of file mc_coordinates.f90.
References get_center_of_mass(), mathconstants::pi, and timings::timeset().
Referenced by generate_cbmc_swap_config().
Here is the call graph for this function:
Here is the caller graph for this function:| CHARACTER(len=*),parameter,private mc_coordinates::moduleN = 'mc_coordinates' |
Definition at line 50 of file mc_coordinates.f90.
1.7.3