MODULE mod_record
Define type record and subtypes Trajectory and ListComplexe.
More...
Data Types | |
type | nodecomplexe |
Define one Node for the ListComplexe . More... | |
type | listcomplexe |
Complexes implemented as a list, fast insertion and deletion To define a list, we use type NodeComplexe which contains one object Can extend the description here. More... | |
type | trajectory |
Implemented as an array, fixed size and append data only at the end. More... | |
type | record |
Main "base" class All derived can be created from this one. More... | |
Functions/Subroutines | |
subroutine, public | new_record (this, type_record_string, type_calc, nb_max_complexe, filename_out, io_compl, opt_sum, box_info, ntraj_rec, freq_print, rmsd_min, one_run, one_conf, format_ascii, nb_types) |
for creation, copy and deletion More... | |
subroutine, public | init_record (this, opt_iocmx) |
A simpler initialization, used when reading an existing file nullify the pointers mainly new add opt_iocmx if want to force. More... | |
subroutine, public | initialize_record (this, tab_prot, opt_read, opt_nb_protein, opt_large_traj) |
Finalize the creation of a record. Setup the bits for variable fields, assign tab_prot and writes the header, except if opt_read is true. This function has been improved and allocate basic trajectory / list_complexe automatically if not done before Usefull for tools, shoud make tab_prot an option also ( want to use easy construction without tab_prot ) More... | |
subroutine, public | delete_record (this, opt_donot_check_array) |
Delete record : complexe or trajectory Only nullify the pointer to ptab_protein, do not delete the object. More... | |
subroutine, public | copy_record (this, p_copy, opt_header, opt_newsizemax) |
Make a copy of a record Note : it is a copy of all data members, the content of the array or list is not copied. Use by tools, and by parallelisation to assign a complexe to each thread test if p_copy is already associated ( tool ), or create one ( OpenMP ) More... | |
subroutine | extract_version_number (version_str, int_version) |
Get version from the header string. More... | |
character *10 function | create_version_str (int_version) |
Create the string for the versino number. More... | |
subroutine | set_bit_energy (this, position) |
Set bit of bit_energy or bit_integer to 1 Better for internal usage, or Should consider than the order will not change in futur. More... | |
subroutine | set_bit_integer (this, position) |
subroutine | set_variable_field (this) |
Set the size of the variable field ( energy and integer ) nb_int and nb_real Convenient function to call set_nb_int and set_nb_real at once. Need the bits to be set correclty before the call Adviced to use this function from sda and external ( tools ). . More... | |
subroutine | set_nb_int (this) |
For internal use. Call set_variable_field adviced. More... | |
subroutine | set_nb_real (this) |
For internal use. Call set_variable_field adviced. More... | |
subroutine | return_compatible_array_wrap (this, array_int, array_real, array_other, opt_p_onecomplexe) |
Function wrapper to mod_onecomplexe::return_compatible_array. More... | |
subroutine, public | set_onecomplexe_wrap (this, position, box, orient_x, orient_y, array_int_compl, array_real_compl, other_real, opt_p_onecomplexe) |
Function wrapper to mod_onecomplexe::set_onecomplexe. More... | |
integer function | get_max_bit_energy (this) |
Return the maximum indice used for energy. used to set size array_energy of sda_2proteins correctly. Order of array_energy is fixed. More... | |
integer function | get_nbterms_energy_compatible (this, opt_force_split) |
Get the minimum size of the array to contain the energy terms. More... | |
integer function, public | get_nbterms_integer_compatible (this) |
Similar for integer terms. . More... | |
subroutine, public | reset_position (this, opt_status) |
Reset the current pointer of trajectory or complexe to the first element Kind of rewind. More... | |
subroutine, public | getnext (this, status, opt_step, opt_p_onecomplexe) |
Update the current pointers to the next position. Update the current node p_current and and the pointer on a one_complexe to the next element of the list or array. Usefull for traversing complexe or trajectory records. More... | |
subroutine, public | compute_all_occurencies (this, total_occur) |
Compute the sum of all occurencies in the complex file Used mainly by sda_2proteins and sda_koff. If trajectory return the size of the array. Occurrencies are always stored at the first index of other_real_ocompl. More... | |
subroutine | write_header_record (this) |
Function to write only the header to the output file Called by write_record. More... | |
subroutine | make_format_header_ascii (this, to_write, opt_version) |
Make the format string for the header, for reading and writing the header. More... | |
subroutine | make_header_ascii (this) |
subroutine | make_header_energy_ascii (this, if_var) |
header with variance, used by tools More... | |
subroutine | make_header_int_pairs_ascii (this, if_var) |
?? More... | |
subroutine | make_format_string_ascii (this) |
Make format for all one_complexe instances, for read and write. Common to trajectory and complexes. For internal use normally. to check if used correctly, should be called only once ! here works for read and write. More... | |
subroutine | write_header_ascii (this) |
Write header in ascii format. More... | |
subroutine | write_header_bin (this) |
Write header in binary format, always print cm. More... | |
subroutine, public | read_header_record (this, filename, opt_cm, opt_nb_record, opt_summary) |
Read the header of the record, call appropriate ascii or binary sub-functions Setup internal variables with inforamtion from the header. Adviced to use this function directly. . More... | |
subroutine | read_header_binary (this, type_calc, int_type_record, nb_prot, nb_type, bit_integer, bit_real, nb_other_real, opt_sum, box_info, cm, int_version) |
Internal use. . More... | |
subroutine | read_header_ascii (this, type_calc, int_type_record, nb_prot, nb_type, bit_integer, bit_real, nb_other_real, opt_sum, box_info, cm, int_version) |
Internal use. . More... | |
subroutine, public | add_record (this, array_prot, ntraj, nstep, array_energy, time, opt_nconf) |
Add a new entry into the record Creates a new one_complexe if needed ( in case of complex ) This function is not thread-safe, critical sections are needed. More... | |
integer function | get_indice_ntraj (this) |
Function to get the indice of the trajectory number. . More... | |
integer function | get_indice_nconf (this) |
Same for conformation number. More... | |
subroutine | print_bits (this, opt_for_choice) |
Print info about bits. More... | |
subroutine | print_record (this, opt_recompute_dispersion) |
Print infos about the record. for complexes can ask to recompute the dispersion when printing. More... | |
subroutine, public | write_record (this, opt_recompute_dispersion) |
Main function to write the record. Make internal call to write header. . More... | |
subroutine, public | read_file_record (this, opt_rebuild_sum_square) |
Read the record and fill the array or list with the data. More... | |
subroutine | count_records (this, nb_line) |
Function to count the number of lines. Tricky for binary : need to read data without saving, read in temporary variables . More... | |
subroutine | test_binary (this, filename, version) |
Test if a file is in binary or ascii format. Called internally test version not used yet \TODO NJB: Make check for ascii/binary more robust. See check used for grid files. More... | |
subroutine | new_trajectory (this, nb_max_complexe) |
Allocate a trajectory. More... | |
subroutine | initialize_trajectory (this, basecl, opt_large_traj) |
Finalize the creation of a trajectory. More... | |
subroutine | delete_trajectory (this, basecl, donot_check_array) |
Delete trajectory. More... | |
subroutine | write_array (this, basecl, opt_last_conf) |
Write trajectory files. . More... | |
subroutine | write_part_array (this, basecl, first, last) |
this is the real writing to disk part other More... | |
subroutine | read_string_trajectory (this, basecl, io_err) |
subroutine | print_array (this, basecl) |
subroutine | new_listcomplexe (this, rmsd_min, one_run, one_conf) |
Allocate the ListComplexe. More... | |
subroutine | delete_listcomplexe (this, opt_clean) |
Delete the ListComplex. More... | |
subroutine | merge_complexe (this, p_copy) |
Merge 2 records into 1 unique Implemented only for "ListComplexe" ( DO NOT USE with trajectory ! ) More... | |
subroutine | delete_last_data (this, status) |
Delete the last data of the list. More... | |
subroutine | fill_listcomplexe (this, basecl, position, orient_x, orient_y, array_energy, array_integer, dist_max, opt_other_real) |
Create and insert a new one_complexe into the list Normally called by add_record, but can be filled manually. More... | |
subroutine | read_string_complexe (this, basecl, rebuild_sum_square, io_err) |
Read a binary or ascii line from a complexe file. More... | |
subroutine | insert_new_node (this, pnew_onecomplexe) |
Allocate and insert a new NodeComplexe always BEFORE this one. More... | |
subroutine | insert_node (this, pnew_node) |
Insert an existing node before this one. More... | |
subroutine | delete_onecomplexe_fromlist (this) |
Delete one_complexe from the list. More... | |
subroutine | write_listcomplexe (this, basecl, recompute_dispersion) |
Write the entire list of complexes to the disk. More... | |
subroutine | print_listcomplexe (this, recompute_dispersion) |
Only for test keep as example of recursive function for dealing with a list. More... | |
recursive integer function | print_node_list (this, recompute_dispersion) |
Only for test. More... | |
subroutine | rms_complexe (rmsd2, dist_max, r1, y11, y12, r2, y21, y22) |
Compute an approximation of the root mean square difference between 2 complexes. If rmsd2 < "rmsd_min", the complexe with the minimum energy will conserved. The other deleted Only an approximation for rigid body protein, we use only the orientation axis for the computation Typical values should be rmsd_min <= 2 when a large number of binding sites want to be recorded and <= 1 for more accuracy close to a binding site . More... | |
Variables | |
integer, parameter | last_version_rec = 2 |
Versioning. More... | |
integer, parameter | intern = 0 |
enumeration for the state of the node More... | |
integer, parameter | first = 1 |
integer, parameter | last = 2 |
integer, parameter | trajectory_enum =1 |
enumeration for type_record More... | |
integer, parameter | complexe_enum =2 |
integer, parameter | off_record = 3 |
character(13), dimension(8) | ener_colnames = (/ character(13):: 'TotEn', 'El', 'ED', 'HD', 'rLJ', 'LJ', 'ImgChg', 'MetDes' /) |
names of the energy terms for the output More... | |
character(13), dimension(8) | var_colnames = (/ character(13):: 'varTotEn', 'varEl', 'varED', 'varHD', 'varRLJ', 'varLJ', 'varImgChg', 'varMetDes' /) |
MODULE mod_record
Define type record and subtypes Trajectory and ListComplexe.
Used for dealing with trajectories and complexes
They both store mod_onecomplexe objects, and then share the same format and rules for output
Trajectory is a fixed array of one_complexe, the size can be fixed for output optimisation
ListComplexe is a list implemenation of one_necomplexe ( fast insertion and deletion whatever the position ), but has a max_nb_complexe to limit the size
All records can read/writen in ascii or binary format
Output are variable:
Maximum 4 integer : ntraj(nrun), nstep, nprotein, nconf
Maximum 20 real for energy: total energy, electrostatic,...
But the content can be modified at run-time ( do not store or print what is not used )
subroutine, public mod_record::add_record | ( | type ( record ) | this, |
type ( protein ), dimension ( : ), intent(in) | array_prot, | ||
integer, intent(in) | ntraj, | ||
integer, intent(in) | nstep, | ||
real ( kind=8 ), dimension ( :, : ), intent(in) | array_energy, | ||
real ( kind=4 ), intent(in) | time, | ||
integer, intent(in), optional | opt_nconf | ||
) |
Add a new entry into the record
Creates a new one_complexe if needed ( in case of complex )
This function is not thread-safe, critical sections are needed.
this | : an instance of record |
array_prot | : an instance of array_protein_type |
ntraj | : the current trajectory number |
nstep | : the current step number |
array_energy | : input array which contains energies terms |
time | : the current time |
opt_nconf | : optionaly the current conformation |
subroutine, public mod_record::compute_all_occurencies | ( | type ( record ) | this, |
integer, intent(out) | total_occur | ||
) |
Compute the sum of all occurencies in the complex file
Used mainly by sda_2proteins and sda_koff. If trajectory return the size of the array. Occurrencies are always stored at the first index of other_real_ocompl.
this | : an instance of record |
total_occur | : sum of occurencies |
subroutine, public mod_record::copy_record | ( | type ( record ) | this, |
type ( record ), pointer | p_copy, | ||
logical, optional | opt_header, | ||
integer, optional | opt_newsizemax | ||
) |
Make a copy of a record Note : it is a copy of all data members, the content of the array or list is not copied.
Use by tools, and by parallelisation to assign a complexe to each thread
test if p_copy is already associated ( tool ), or create one ( OpenMP )
this | : an instance of record |
p_copy | : a pointer to the destination record |
opt_header | : optional copy the header informations or initialize them |
opt_newsizemax | : optional fixe the value of nb_max_complexe of the destination record to opt_newsizemax or copy the value from the source |
subroutine mod_record::count_records | ( | type ( record ) | this, |
integer, intent(out) | nb_line | ||
) |
Function to count the number of lines.
Tricky for binary : need to read data without saving, read in temporary variables
.
this | : an instance of record |
nb_line | : return the number of lines |
character*10 function mod_record::create_version_str | ( | integer, intent(in) | int_version | ) |
Create the string for the versino number.
int_version | : version as integer |
subroutine mod_record::delete_last_data | ( | type ( listcomplexe ) | this, |
integer, intent(out) | status | ||
) |
Delete the last data of the list.
Used when the size of complexes exceeds the maximum and for deleting all the list
this | : an instance of ListComplexe |
status | : return 0 if the data have correctly deleted |
subroutine mod_record::delete_listcomplexe | ( | type ( listcomplexe ) | this, |
logical, optional | opt_clean | ||
) |
Delete the ListComplex.
this | : an instance of ListComplexe |
opt_clean | : optionaly reset member data nb_complexe ?? to check |
subroutine mod_record::delete_onecomplexe_fromlist | ( | type ( nodecomplexe ), target | this | ) |
Delete one_complexe from the list.
Delete the content ( one_complexe ) and rearrange the pointers of the list
The deallocation of the node itself must be done by an other function ( cannot delete itself )
this | : an instance of NodeComplexe |
subroutine, public mod_record::delete_record | ( | type ( record ) | this, |
logical, optional | opt_donot_check_array | ||
) |
Delete record : complexe or trajectory
Only nullify the pointer to ptab_protein, do not delete the object.
this | : an instance of record |
opt_donot_check_array | : by default write on disk the last configurations in trajectory before deleting it. Set to true to deactivate ( tool or restart ) |
subroutine mod_record::delete_trajectory | ( | type ( trajectory ) | this, |
type ( record ) | basecl, | ||
logical | donot_check_array | ||
) |
Delete trajectory.
For some tools we want to desable automatic writing of array when finishing the program
this | : an instance of Trajectory |
basecl | : an instance of record |
donot_check_array | : bool if true do not write the last in the array into the disk |
subroutine mod_record::extract_version_number | ( | character, dimension(*), intent(in) | version_str, |
integer | int_version | ||
) |
Get version from the header string.
version_str | : string to parse |
int_version | : the version number as integer |
subroutine mod_record::fill_listcomplexe | ( | type ( listcomplexe ) | this, |
type ( record ) | basecl, | ||
real ( kind=8 ), dimension ( 3 ), intent(in) | position, | ||
real ( kind=8 ), dimension ( 3 ), intent(in) | orient_x, | ||
real ( kind=8 ), dimension ( 3 ), intent(in) | orient_y, | ||
real ( kind=8 ), dimension ( : ), intent(in) | array_energy, | ||
integer, dimension ( 4 ), intent(in) | array_integer, | ||
real ( kind=8 ), intent(in) | dist_max, | ||
real ( kind=8 ), dimension ( : ), optional | opt_other_real | ||
) |
Create and insert a new one_complexe into the list
Normally called by add_record, but can be filled manually.
The instance one_complexe is inserted according to its total energy
A check is performed if a previous one is closer than rmsd_min. See doc for the complete story
this | : an instance of ListComplexe |
basecl | : an instance of record |
position | : position of the solute |
orient_x,orient_y | : orientation of the axis |
array_energy | : store energy terms in the expected order |
array_integer | : correspond to ntraj, nstep,... |
dist_max | : maximal radius of the protein 2, sogrid % distance_max |
opt_other_real | : optionaly the array other_real_ocompl, default (0.,0.,0.) |
integer function mod_record::get_indice_nconf | ( | type ( record ) | this | ) |
Same for conformation number.
this | : an instance of record |
integer function mod_record::get_indice_ntraj | ( | type ( record ) | this | ) |
Function to get the indice of the trajectory number.
.
Function to use in collaboration with return_compatible_array, return_array_int and return_array_real Safer to use than directly access the data, easier to maintain when there will be modification.
this | : an instance of record |
integer function mod_record::get_max_bit_energy | ( | type ( record ) | this | ) |
Return the maximum indice used for energy.
used to set size array_energy of sda_2proteins correctly. Order of array_energy is fixed.
this | : an instance of record |
integer function mod_record::get_nbterms_energy_compatible | ( | type ( record ) | this, |
logical, optional | opt_force_split | ||
) |
Get the minimum size of the array to contain the energy terms.
Normally for reading, but if force_split get the minimum size of array_1d ( sda_2proteins ) or for sdamm if opt_sum of record is one
this | : an instance of record |
opt_force_split | : force the size to take account than the energy terms are splitted |
integer function, public mod_record::get_nbterms_integer_compatible | ( | type ( record ) | this | ) |
Similar for integer terms.
.
this | : an instance of record |
subroutine, public mod_record::getnext | ( | type ( record ) | this, |
integer | status, | ||
integer, intent(in), optional | opt_step, | ||
type ( one_complexe ), optional, pointer | opt_p_onecomplexe | ||
) |
Update the current pointers to the next position.
Update the current node p_current and and the pointer on a one_complexe to the next element of the list or array. Usefull for traversing complexe or trajectory records.
this | : an instance of record |
status | : return 1 if no data are present, otherwise 0 |
opt_step | : optional, specify how many complexes should the jump omit (default: 1) |
opt_p_onecomplexe | : optional, will point to the same than adress than p_onecompl, used for shortcut to p_onecompl |
subroutine, public mod_record::init_record | ( | type (record ) | this, |
integer, optional | opt_iocmx | ||
) |
A simpler initialization, used when reading an existing file nullify the pointers mainly new add opt_iocmx if want to force.
this | : an instance of record |
opt_iocmx | : optional, gives a file descriptor, usefull if more than 1 record opened at the same time |
subroutine, public mod_record::initialize_record | ( | type (record ) | this, |
type ( array_protein_type ), optional, target | tab_prot, | ||
logical, intent(in), optional | opt_read, | ||
integer, intent(in), optional | opt_nb_protein, | ||
logical, intent(in), optional | opt_large_traj | ||
) |
Finalize the creation of a record.
Setup the bits for variable fields, assign tab_prot and writes the header, except if opt_read is true.
This function has been improved and allocate basic trajectory / list_complexe automatically if not done before Usefull for tools, shoud make tab_prot an option also ( want to use easy construction without tab_prot )
the bit_integer and bit_energy should have been set before the call
need to be separate, because need to set value of bits before
this | : an instance of record |
tab_prot | : optional, an instance of array_protein_type |
opt_read | : optional, open the record for reading, will not write the header file |
opt_nb_protein | : optional, indicates the number of the number of proteins, by default use the size of array_protein |
opt_large_traj | : optional, boolean: if the trajectory file is large, it will be read one by one, instead of allocating the entire trajectory at once |
subroutine mod_record::initialize_trajectory | ( | type ( trajectory ) | this, |
type ( record ) | basecl, | ||
logical, intent(in), optional | opt_large_traj | ||
) |
Finalize the creation of a trajectory.
Called by initialize_record
To call after initialisation of bit energy and bit_integer of type record
by default use nb_max_complexe of basecl, could add optional size ( for large file )
this | : an instance of Trajectory |
basecl | : an instance of record |
opt_large_traj | : optional, boolean: if the trajectory is large, it will be read one by one |
subroutine mod_record::insert_new_node | ( | type ( nodecomplexe ), target | this, |
type ( one_complexe ), pointer | pnew_onecomplexe | ||
) |
Allocate and insert a new NodeComplexe always BEFORE this one.
Associate the pointer to the one_complexe to the new created node
this | : an instance of NodeComplexe |
pnew_onecomplexe | : pointer to a rencently created one_complexe |
subroutine mod_record::insert_node | ( | type ( nodecomplexe ), target | this, |
type ( nodecomplexe ), pointer | pnew_node | ||
) |
Insert an existing node before this one.
this | : an instance of NodeComplexe |
pnew_node | : pointer one_complexe |
subroutine mod_record::make_format_header_ascii | ( | type ( record ) | this, |
logical | to_write, | ||
integer, optional | opt_version | ||
) |
Make the format string for the header, for reading and writing the header.
this | : an instance of record |
to_write | : if true make the format for writing, otherwise for reading |
opt_version | : optional, force the version number |
subroutine mod_record::make_format_string_ascii | ( | type ( record ) | this | ) |
Make format for all one_complexe instances, for read and write.
Common to trajectory and complexes. For internal use normally. to check if used correctly, should be called only once ! here works for read and write.
this | : an instance of record |
subroutine mod_record::make_header_ascii | ( | type ( record ) | this | ) |
subroutine mod_record::make_header_energy_ascii | ( | type ( record ) | this, |
logical | if_var | ||
) |
header with variance, used by tools
this | : an instance of record |
if_var | : true will add column for variance of the energy terms |
subroutine mod_record::make_header_int_pairs_ascii | ( | type ( record ), intent(inout) | this, |
logical, intent(in) | if_var | ||
) |
??
this | : an instance of record |
if_var | : true will add column for variance of the energy terms |
Merge 2 records into 1 unique
Implemented only for "ListComplexe" ( DO NOT USE with trajectory ! )
Respect the energetic order when doing the merging
The total size will not exceed the size of this % nb_max_complexe, the other data will be deleted
Used with OpenMP for merging the complexes of different threads
this | : an instance of record |
p_copy | : pointer to the record to be merged into this |
subroutine mod_record::new_listcomplexe | ( | type ( listcomplexe ) | this, |
real ( kind=8 ) | rmsd_min, | ||
logical | one_run, | ||
logical | one_conf | ||
) |
Allocate the ListComplexe.
Create the nodes necessary for the ListComplexe management
this | : an instance of "ListComplexe" |
rmsd_min | : parameter for the recording of complexes |
one_run | : parameter for the recording of complexes |
one_conf | : parameter for the recording of complexes |
subroutine, public mod_record::new_record | ( | type ( record ) | this, |
character, dimension(*) | type_record_string, | ||
type ( type_calculation ) | type_calc, | ||
integer | nb_max_complexe, | ||
character ( 128 ) | filename_out, | ||
integer | io_compl, | ||
logical | opt_sum, | ||
logical | box_info, | ||
integer | ntraj_rec, | ||
integer | freq_print, | ||
real ( kind=8 ) | rmsd_min, | ||
logical | one_run, | ||
logical | one_conf, | ||
logical | format_ascii, | ||
integer, optional | nb_types | ||
) |
for creation, copy and deletion
Allocate a object record : complexe or trajectory
allocate a list_complexe or an array for trajectory and open the output file with the correct format
The obect is not fully ready to use at this stage
It needs correct "bit_integer" and "bit_energy" and a call to initialize_trajectory
this | : an instance of record |
type_record_string | : "complexe" or "trajectory" |
type_calc | : instance of type_calculation |
nb_max_complexe | : fixe the size of array for trajectory, or the maximum size of a list |
filename_out | : filename of output |
io_compl | : file descriptor |
opt_sum | : bool indicates if the energy terms should be added ( ep1_2+ep2_1 ) or separated in the output. Internally always splitted, influences only the output |
box_info | : bool if box information is present ( used only for sdamm ) |
ntraj_rec | : the trajectory number to record |
freq_print | : the frequence in steps (not in time ) with which the trajectory is written |
rmsd_min | : value used for complexes output |
one_run | : value used for complexes output |
one_conf | : value used for complexes output |
format_ascii | : bool, if true ascii output, else bunary output |
nb_types | : number of different types of proteins |
subroutine mod_record::new_trajectory | ( | type ( trajectory ) | this, |
integer | nb_max_complexe | ||
) |
Allocate a trajectory.
Allocate the array with instances of empty one_complexe
Need to give nb_max_complexe for allocating the array
this | : an instance of "Trajectory" |
nb_max_complexe | : size of the array to allocate |
subroutine mod_record::print_array | ( | type ( trajectory ) | this, |
type ( record ) | basecl | ||
) |
subroutine mod_record::print_bits | ( | type ( record ) | this, |
logical, optional | opt_for_choice | ||
) |
Print info about bits.
this | : an instance of record |
opt_for_choice | : bool if true less output used in tool when a choice is expected, default false |
subroutine mod_record::print_listcomplexe | ( | type ( listcomplexe ) | this, |
logical | recompute_dispersion | ||
) |
Only for test
keep as example of recursive function for dealing with a list.
Function crash if recursivity > 10 000 approx.
recursive integer function mod_record::print_node_list | ( | type ( nodecomplexe ) | this, |
logical | recompute_dispersion | ||
) |
Only for test.
subroutine mod_record::print_record | ( | type ( record ) | this, |
logical, optional | opt_recompute_dispersion | ||
) |
Print infos about the record.
for complexes can ask to recompute the dispersion when printing.
this | : an instance of record |
opt_recompute_dispersion | : optionaly recompute the dispersion ( only for complexes ). Default true. |
subroutine, public mod_record::read_file_record | ( | type ( record ) | this, |
logical, optional | opt_rebuild_sum_square | ||
) |
Read the record and fill the array or list with the data.
The file is first "rewinded"
this | : an instance of record |
opt_rebuild_sum_square | : optional, if the square energy must be recomputed (restart complexe) |
subroutine mod_record::read_header_ascii | ( | type ( record ) | this, |
type ( type_calculation ) | type_calc, | ||
integer | int_type_record, | ||
integer, intent(inout) | nb_prot, | ||
integer, intent(inout) | nb_type, | ||
integer ( kind=2 ), intent(inout) | bit_integer, | ||
integer ( kind=2 ), intent(inout) | bit_real, | ||
integer, intent(inout) | nb_other_real, | ||
logical, intent(out) | opt_sum, | ||
logical, intent(out) | box_info, | ||
real ( kind = 8 ), dimension ( 2, 3 ) | cm, | ||
integer | int_version | ||
) |
Internal use.
.
subroutine mod_record::read_header_binary | ( | type ( record ) | this, |
type ( type_calculation ) | type_calc, | ||
integer | int_type_record, | ||
integer, intent(inout) | nb_prot, | ||
integer, intent(inout) | nb_type, | ||
integer ( kind=2 ), intent(inout) | bit_integer, | ||
integer ( kind=2 ), intent(inout) | bit_real, | ||
integer, intent(inout) | nb_other_real, | ||
logical, intent(out) | opt_sum, | ||
logical, intent(out) | box_info, | ||
real ( kind = 8 ), dimension ( 2, 3 ) | cm, | ||
integer | int_version | ||
) |
Internal use.
.
subroutine, public mod_record::read_header_record | ( | type ( record ) | this, |
character(len=*), intent(in) | filename, | ||
real ( kind = 8 ), dimension ( 2, 3 ), intent(out), optional | opt_cm, | ||
integer, intent(out), optional | opt_nb_record, | ||
logical, intent(in), optional | opt_summary | ||
) |
Read the header of the record, call appropriate ascii or binary sub-functions
Setup internal variables with inforamtion from the header. Adviced to use this function directly.
.
this | : an instance of record |
filename | : file to read |
opt_cm | : optionaly read the center of proteins ( only for sda_2proteins ). Safe with sdamm : do nothing |
opt_nb_record | : optionaly as input, count the number of lines ( set opt_nb_record for return and nb_max_complexe ) |
opt_summary | : should summary data be written to output |
subroutine mod_record::read_string_complexe | ( | type ( listcomplexe ) | this, |
type ( record ) | basecl, | ||
logical | rebuild_sum_square, | ||
integer | io_err | ||
) |
Read a binary or ascii line from a complexe file.
Create a new one_complexe and insert in the list
this | : an instance of "ListComplexe" |
basecl | : an instance of record |
rebuild_sum_square | : logicalm if the square of energy needs to be recomputed ( complex as restart ) |
io_err | : used as status ?? |
subroutine mod_record::read_string_trajectory | ( | type ( trajectory ) | this, |
type ( record ) | basecl, | ||
integer | io_err | ||
) |
subroutine, public mod_record::reset_position | ( | type ( record ) | this, |
integer, intent(out), optional | opt_status | ||
) |
Reset the current pointer of trajectory or complexe to the first element
Kind of rewind.
this | : an instance of record |
opt_status | : optional, return 1 if the list is empty |
subroutine mod_record::return_compatible_array_wrap | ( | type ( record ) | this, |
integer, dimension(:) | array_int, | ||
real( kind=8 ), dimension(:) | array_real, | ||
real( kind=8 ), dimension(:) | array_other, | ||
type ( one_complexe ), optional, pointer | opt_p_onecomplexe | ||
) |
Function wrapper to mod_onecomplexe::return_compatible_array.
Easier to use, in combination with getNext(). Most of parameters come from record.
by default use use internal p_onecompl pointer to one_complexe, but can pass an other pointer as an option.
this | : an instance of record |
array_int,array_real,array_other | : array to fill with data |
opt_p_onecomplexe | : optional, use this pointer to retrieve the data |
subroutine mod_record::rms_complexe | ( | real ( kind=8 ), intent(out) | rmsd2, |
real ( kind=8 ), intent(in) | dist_max, | ||
real ( kind=8 ), dimension ( 3 ) | r1, | ||
real ( kind=8 ), dimension ( 3 ) | y11, | ||
real ( kind=8 ), dimension ( 3 ) | y12, | ||
real ( kind=8 ), dimension ( 3 ) | r2, | ||
real ( kind=8 ), dimension ( 3 ) | y21, | ||
real ( kind=8 ), dimension ( 3 ) | y22 | ||
) |
Compute an approximation of the root mean square difference between 2 complexes.
If rmsd2 < "rmsd_min", the complexe with the minimum energy will conserved. The other deleted
Only an approximation for rigid body protein, we use only the orientation axis for the computation
Typical values should be rmsd_min <= 2 when a large number of binding sites
want to be recorded and <= 1 for more accuracy close to a binding site
.
rmsd2 | : return mean square difference between 2 complexes |
dist_max | : maximal radius of the protein 2, sogrid % distance_max |
r1 | : position of complex 1 |
y11,y12 | : orientation of complex 1 |
r2 | : position of complex 2 |
y21,y22 | : orientation of complex 2 |
subroutine mod_record::set_bit_energy | ( | type ( record ) | this, |
integer | position | ||
) |
Set bit of bit_energy or bit_integer to 1
Better for internal usage, or Should consider than the order will not change in futur.
this | : an instance of record |
position | : bit position to set {@ |
subroutine mod_record::set_bit_integer | ( | type ( record ) | this, |
integer | position | ||
) |
subroutine mod_record::set_nb_int | ( | type ( record ) | this | ) |
For internal use. Call set_variable_field adviced.
subroutine mod_record::set_nb_real | ( | type ( record ) | this | ) |
For internal use. Call set_variable_field adviced.
subroutine, public mod_record::set_onecomplexe_wrap | ( | type ( record ) | this, |
real ( kind=8 ), dimension( 3 ), intent(in) | position, | ||
integer, dimension ( 3 ), intent(in) | 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, | ||
type ( one_complexe ), optional, pointer | opt_p_onecomplexe | ||
) |
Function wrapper to mod_onecomplexe::set_onecomplexe.
same idea than return_compatible_array, easy to use with getNext() function. for sdamm must be called in a loop, maybe to extend later ( in the wrapper for simplicity ) add optional opt_p_onecomplexe, to set a new onecomplexe before it is inserted inside the record
subroutine mod_record::set_variable_field | ( | type ( record ) | this | ) |
Set the size of the variable field ( energy and integer ) nb_int and nb_real Convenient function to call set_nb_int and set_nb_real at once. Need the bits to be set correclty before the call
Adviced to use this function from sda and external ( tools ).
.
this | : an instance of record |
subroutine mod_record::test_binary | ( | type ( record ) | this, |
character(len=*) | filename, | ||
character*10 | version | ||
) |
Test if a file is in binary or ascii format.
Called internally
test version not used yet \TODO NJB: Make check for ascii/binary more robust. See check used for grid files.
this | : an instance of record |
filename | : name of the file |
version | : not used yet |
subroutine mod_record::write_array | ( | type ( trajectory ) | this, |
type ( record ) | basecl, | ||
logical, optional | opt_last_conf | ||
) |
Write trajectory files.
.
Called when the array is full and for writing the restart file ( last conformation ). Size array can be of any size for the trajectory, but for restart need to be larger than nb_proteins.
this | : an instance of trajectory |
basecl | : an instance of record |
opt_last_conf | : optionaly write only the last configuration ( for write_restart ) |
subroutine mod_record::write_header_ascii | ( | type ( record ) | this | ) |
Write header in ascii format.
this | : an instance of record |
subroutine mod_record::write_header_bin | ( | type ( record ) | this | ) |
Write header in binary format, always print cm.
this | : an instance of record |
subroutine mod_record::write_header_record | ( | type ( record ) | this | ) |
Function to write only the header to the output file
Called by write_record.
this | : an instance of record |
subroutine mod_record::write_listcomplexe | ( | type ( listcomplexe ) | this, |
type ( record ) | basecl, | ||
logical, intent(in) | recompute_dispersion | ||
) |
Write the entire list of complexes to the disk.
Called by write_record Only the sum of the square of the total energy is stored during the computation
The dispersion is computed only before writing to disk
this | : an instance of mod_record::listcomplexe "ListComplexe" |
basecl | : an instance of record |
recompute_dispersion | : bool if true compute the dispersion |
subroutine mod_record::write_part_array | ( | type ( trajectory ) | this, |
type ( record ) | basecl, | ||
integer, intent(in) | first, | ||
integer, intent(in) | last | ||
) |
this is the real writing to disk part other
subroutine, public mod_record::write_record | ( | type ( record ) | this, |
logical, optional | opt_recompute_dispersion | ||
) |
Main function to write the record.
Make internal call to write header.
.
this | : an instance of record |
opt_recompute_dispersion | : optionaly recompute the dispersion ( only for complexes ). Default true. |
integer, parameter mod_record::complexe_enum =2 |
character ( 13 ), dimension ( 8 ) mod_record::ener_colnames = (/ character(13):: 'TotEn', 'El', 'ED', 'HD', 'rLJ', 'LJ', 'ImgChg', 'MetDes' /) |
names of the energy terms for the output
integer, parameter mod_record::first = 1 |
integer, parameter mod_record::intern = 0 |
enumeration for the state of the node
integer, parameter mod_record::last = 2 |
integer, parameter mod_record::last_version_rec = 2 |
Versioning.
integer, parameter mod_record::off_record = 3 |
integer, parameter mod_record::trajectory_enum =1 |
enumeration for type_record
character ( 13 ), dimension ( 8 ) mod_record::var_colnames = (/ character(13):: 'varTotEn', 'varEl', 'varED', 'varHD', 'varRLJ', 'varLJ', 'varImgChg', 'varMetDes' /) |