SDA (SDA flex)  7.2
Simulation of Diffusional Association
Data Types | Functions/Subroutines
mod_onecomplexe Module Reference

Module to define one_complexe Theses objects are stored in record. More...

Data Types

type  one_complexe
 Objects stored in the list ( for complexes ) or in the array ( for trajectory ) More...
 

Functions/Subroutines

subroutine, public new_onecomplexe (this, nb_int, nb_real, nb_other_real, opt_ibox)
 Allocate an instance of one_complexe
Need only size of variable fields, optional ibox for sdamm. More...
 
subroutine delete_onecomplexe (this)
 Delete onecomplexe. More...
 
subroutine set_onecomplexe (this, position, box, orient_x, orient_y, array_int_compl, array_real_compl, other_real, size_other_real, bit_integer, bit_energy, opt_sum, nb_to_sum)
 Set values of an one_complexe instance. More...
 
subroutine return_compatible_array (this, array_int, array_real, other_real, size_other_real, bit_integer, bit_energy, opt_sum, nb_to_sum)
 Return arrays of data of fixed size. More...
 
subroutine return_array_int (this, array_int, bit_integer)
 Same as return compatible array, only for int_ocompl. More...
 
subroutine return_array_real (this, array_real, bit_energy, opt_sum, nb_to_sum)
 Same as return_compatible_array, only for real_ocompl. More...
 
subroutine update_statistics (this, previous, opt_other_real)
 Update statistics for complexes : occurency, average and std deviation. More...
 
subroutine print_onecomplexe (this)
 Test function, convenient for debug. More...
 
subroutine make_ascii_string (this, string, format_str)
 Make string, send back a string, only for ascii. More...
 
subroutine read_ascii_string (this, string, format_str)
 reading file is done by record or derived, same logic than for writting for binary should change, for both reading and writting.... More...
 
subroutine read_binary_string (this, io_file, box_info, io_err)
 For reading binary. More...
 
subroutine write_binary_string (this, io_file, io_err)
 For writing binary. More...
 

Detailed Description

Module to define one_complexe Theses objects are stored in record.

Function/Subroutine Documentation

◆ delete_onecomplexe()

subroutine mod_onecomplexe::delete_onecomplexe ( type ( one_complexe this)

Delete onecomplexe.

Deallocate all arrays

Parameters
this: instance of one_complexe
Here is the caller graph for this function:

◆ make_ascii_string()

subroutine mod_onecomplexe::make_ascii_string ( type ( one_complexe this,
character, dimension(*), intent(out)  string,
character, dimension(*), intent(in)  format_str 
)

Make string, send back a string, only for ascii.

Give the format string as input, computed only once
Binary need an other function

Parameters
this: instance of one_complexe
string: return value
format_str: format of one line
Here is the caller graph for this function:

◆ new_onecomplexe()

subroutine, public mod_onecomplexe::new_onecomplexe ( type ( one_complexe this,
integer, intent(in)  nb_int,
integer, intent(in)  nb_real,
integer, intent(in)  nb_other_real,
logical, optional  opt_ibox 
)

Allocate an instance of one_complexe
Need only size of variable fields, optional ibox for sdamm.

Parameters
this: instance of one_complexe
nb_int: size of int_ocompl
nb_real: size of real_ocompl
nb_other_real: size of other_real_ocompl
opt_ibox: optionaly activate the box information
Here is the caller graph for this function:

◆ print_onecomplexe()

subroutine mod_onecomplexe::print_onecomplexe ( type ( one_complexe this)

Test function, convenient for debug.

Parameters
this: instance of one_complexe
Here is the caller graph for this function:

◆ read_ascii_string()

subroutine mod_onecomplexe::read_ascii_string ( type ( one_complexe this,
character, dimension(*), intent(in)  string,
character, dimension(*), intent(in)  format_str 
)

reading file is done by record or derived, same logic than for writting for binary should change, for both reading and writting....

Here is the caller graph for this function:

◆ read_binary_string()

subroutine mod_onecomplexe::read_binary_string ( type ( one_complexe this,
integer, intent(in)  io_file,
logical, intent(in)  box_info,
integer, intent(out)  io_err 
)

For reading binary.

Here is the caller graph for this function:

◆ return_array_int()

subroutine mod_onecomplexe::return_array_int ( type ( one_complexe this,
integer, dimension ( : ), intent(out)  array_int,
integer ( kind = 2 ), intent(in)  bit_integer 
)

Same as return compatible array, only for int_ocompl.

Here is the caller graph for this function:

◆ return_array_real()

subroutine mod_onecomplexe::return_array_real ( type ( one_complexe this,
real ( kind=8), dimension ( : ), intent(out)  array_real,
integer ( kind = 2 ), intent(in)  bit_energy,
logical, intent(in)  opt_sum,
integer, intent(in)  nb_to_sum 
)

Same as return_compatible_array, only for real_ocompl.

Extended with nb_types. Convenient if allocate the array inside.
The array should have the correct size, safer if allocated with mod::record::get_nbterms_energy_compatible.

Parameters
this: instance of one_complexe
array_real: array to fill, store only valid data
bit_energy: indicates which information are stored in one_complexe object
opt_sum: indicates if the sum of the terms must be given or all
nb_to_sum: number of types of grids
Here is the caller graph for this function:

◆ return_compatible_array()

subroutine mod_onecomplexe::return_compatible_array ( type ( one_complexe this,
integer, dimension ( : ), intent(out)  array_int,
real ( kind=8 ), dimension( : ), intent(out)  array_real,
real ( kind=8 ), dimension( : ), intent(out)  other_real,
integer, intent(in)  size_other_real,
integer ( kind=2 ), intent(in)  bit_integer,
integer ( kind=2 ), intent(in)  bit_energy,
logical, intent(in)  opt_sum,
integer, intent(in)  nb_to_sum 
)

Return arrays of data of fixed size.

Sort of inverse of set_onecomplexe, allow to extract easily the data
bit_integer and bit_energy will provide the information to select the returned data
Extract data from this one_complexe, order and size are fixed ( ntraj, nstep, nprot, nconf...) value is null by default, if not present in one_complexe

Easier to use record % return_compatible_array_wrapper.

Todo:
add box information

Need to extend with nb_to_sum, keep same variable name May add aprameter for size of other_real

Parameters
this: instance of one_complexe
array_int,array_real,other_real: array filled by the function
size_other_real: size of array other_real
bit_integer,bit_energy: information wanted in return of the function
opt_sum: if the energy terms should be added are kept separate
nb_to_sum: equal the number of types of solutes
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_onecomplexe()

subroutine mod_onecomplexe::set_onecomplexe ( type ( one_complexe this,
real ( kind=8 ), dimension( 3 ), intent(in)  position,
integer, dimension ( 3 )  box,
real ( kind=8 ), dimension( 3 ), intent(in)  orient_x,
real ( kind=8 ), dimension( 3 ), intent(in)  orient_y,
integer, dimension ( : ), intent(in)  array_int_compl,
real ( kind=8 ), dimension( : ), intent(in)  array_real_compl,
real ( kind=8 ), dimension( : ), intent(in)  other_real,
integer, intent(in)  size_other_real,
integer ( kind=2 )  bit_integer,
integer ( kind=2 )  bit_energy,
logical  opt_sum,
integer, intent(in)  nb_to_sum 
)

Set values of an one_complexe instance.

Should be allocated before
Input array from record have a fixed size, only the relevent informations ( gieven by the bits ) are stored in internal array of one_complexe

Parameters
this: instance of one_complexe
position,box: position of the complex and box information ( default ( 0, 0, 0) )
orient_x,orient_y: orientation of the complex
array_int_compl: to store in int_ocompl
array_real_compl: to store in real_ocompl
other_real: to store in other_real_ocompl
size_other_real: size of array other_real
bit_integer,bit_energy: bits information
opt_sum: if the sum of energy terms is required
nb_to_sum: equal to the number of types in the simulation
Here is the caller graph for this function:

◆ update_statistics()

subroutine mod_onecomplexe::update_statistics ( type ( one_complexe this,
type ( one_complexe ), pointer  previous,
real ( kind=8 ), dimension ( : ), optional  opt_other_real 
)

Update statistics for complexes : occurency, average and std deviation.

By default increase occurency by one with the last energy
if used from merge_trajectory, take into account correctly the previous data ( sum of the square of the energy )
should improve, general occurency, average.,.. and only one loop

Parameters
this: instance of one_complexe
previous: pointer to the original one_complexe to be merged in, if not associated update this
opt_other_real: optional update the other_real terms.
Here is the caller graph for this function:

◆ write_binary_string()

subroutine mod_onecomplexe::write_binary_string ( type ( one_complexe this,
integer  io_file,
integer  io_err 
)

For writing binary.

Here is the caller graph for this function:
Imprint/Privacy