Module for dealing with 3 dimensional grids. More...
| Data Types | |
| type | type_dtgrid | 
| type | type_grid | 
| Contains all data related to grid.  More... | |
| type | type_uhbd_grid | 
| Functions/Subroutines | |
| subroutine | allocate_grid (this, xmax, ymax, zmax, opt_logical) | 
| Allocate grid.  More... | |
| subroutine | allocate_grid_uhbd (this, xmax, ymax, zmax, be_logical) | 
| Allocate the 3d imensional uhbd grid.  More... | |
| subroutine | allocate_dtgrid (this, filename, scfct, be_logical) | 
| subroutine | delete_grid (this) | 
| Delete the grid.  More... | |
| subroutine | delete_uhbd_grid (this) | 
| Delete UHBD grid Called by delete_grid.  More... | |
| subroutine | delete_dtgrid (this, be_logical) | 
| logical function | is_associated (this) | 
| function to test if the 3d grid is correctly initiliazed  More... | |
| integer function | is_associated_int (this) | 
| function to test the type of grid variant return type_of_grid  More... | |
| subroutine | read_grid (this, filename, grid_type_opt, scfct_opt, read_header_only_opt, iform_opt) | 
| Read grid file.  More... | |
| real(kind=8) function | get_value_real_uhbd (this, i, j, k) | 
| Test for uhbd and dtgrid.  More... | |
| real(kind=8) function | get_value_dtgrid (this, i, j, k) | 
| Get the value at a point of a dtgrid.  More... | |
| logical function | get_value_exclusion_dtgrid (this, i, j, k) | 
| subroutine | get_voxel_dtgrid (this, i, j, k, voxel) | 
| real(kind=8) function | get_value (this, i, j, k) | 
| Test function.  More... | |
| subroutine | copy_grid (this, outgrid, opt_form) | 
| Copy a grid.  More... | |
| subroutine | grid_scale (this, scaling) | 
| Multiply all grid points by a scaling factor.  More... | |
| subroutine | exclude (this, exclud_grid) | 
| Exclude potential interior of grid solute.  More... | |
| subroutine | make_sphere (this) | 
| Set to 0. all points further than a cutoff. The cutoff is the maximum shpere we can include inside the cube. More... | |
| subroutine | test_format_grid (this, io_unit) | 
| Error in make ep_grid, grdflag is a good variable for binary or ascii, but works only if created by module no rules for uhbd ( 1 ) or apbs ( -1 ) use title of electrostatic grid to decide by default in sda, force to read in binary, can be changed now.  More... | |
| subroutine | read_header_grid (this, io_unit, status) | 
| Read header of the file.  More... | |
| subroutine | write_grid (this, filename, opt_modif_name, opt_pgrid4) | 
| Write a grid to a file.  More... | |
| subroutine | write_uhbd_grid (this, base, filename, opt_pgrid4) | 
| Write UHBD grid to a file Called by write_grid.  More... | |
| subroutine | read_excl_grid (this, filename, prot_cm, param_probe, status) | 
| Specific function for reading an exclusion grid.  More... | |
| subroutine | write_excl_grid (this, filename, prot_cm, param_probe) | 
| Write exclusion grid.  More... | |
| subroutine | write_grid_dx (this, filename, opt_modif_name) | 
| Write grid to dx format.  More... | |
| subroutine | print_grid (this, io_unit) | 
| Print information about the grid into a log file.  More... | |
| integer function | get_gridtype (this) | 
| Return the grid type as defined in mod_gridtype.  More... | |
| subroutine | shift_origin (this, center) | 
| Shift the origin of the grid to the given position.  More... | |
| subroutine | print_origin (this) | 
| Print origin, for debug.  More... | |
| subroutine | info_grid (this) | 
| Print information about the grid, may extend.  More... | |
| Variables | |
| integer, parameter | enum_uhbd = 1 | 
| integer, parameter | enum_dtgrid = 2 | 
Module for dealing with 3 dimensional grids.
| subroutine mod_grid::allocate_dtgrid | ( | type ( type_dtgrid ) | this, | 
| character*128 | filename, | ||
| real ( kind=8 ) | scfct, | ||
| logical | be_logical | ||
| ) | 
| subroutine mod_grid::allocate_grid | ( | type ( type_grid ), intent(inout) | this, | 
| integer, intent(in) | xmax, | ||
| integer, intent(in) | ymax, | ||
| integer, intent(in) | zmax, | ||
| logical, intent(in), optional | opt_logical | ||
| ) | 
Allocate grid.
| this | : instance of type_grid | 
| xmax,ymax,zmax | : size of the grid in number of cells | 
| opt_logical | : if values stored are logical. Default real*4 in disk, real*8 in memory | 
| subroutine mod_grid::allocate_grid_uhbd | ( | type (type_uhbd_grid), intent(inout) | this, | 
| integer, intent(in) | xmax, | ||
| integer, intent(in) | ymax, | ||
| integer, intent(in) | zmax, | ||
| logical, intent(in) | be_logical | ||
| ) | 
Allocate the 3d imensional uhbd grid.
Called by allocate_grid
| subroutine mod_grid::copy_grid | ( | type ( type_grid ) | this, | 
| type ( type_grid ) | outgrid, | ||
| integer, optional | opt_form | ||
| ) | 
Copy a grid.
Used by tools only 
 Not a real copy, only the members are copied
 The pointer will use the original grid
 The new grid can modify some data members ( iform, origin ) and write a new version
May add an option real copy, or internal % real_copy, to known if need to delete
 
| this | : instance of type_grid, source grid | 
| outgrid | : instance of the target grid | 
| opt_form | : optionaly provides the new format. By default use the source format | 
| subroutine mod_grid::delete_dtgrid | ( | type ( type_dtgrid ) | this, | 
| logical | be_logical | ||
| ) | 
| subroutine mod_grid::delete_grid | ( | type ( type_grid ) | this | ) | 
Delete the grid.
deallocate 3 dimensional grid
| this | : instance of type_grid | 
| subroutine mod_grid::delete_uhbd_grid | ( | type ( type_uhbd_grid ) | this | ) | 
Exclude potential interior of grid solute.
this is a pointer to the input grid, can be overloaded in this case
| this | : instance of type_grid, pointer to the input grid called by convert_grid -exclude can be overloaded in this case | 
| exclud_grid | : grid already loaded in convert grid | 
| integer function mod_grid::get_gridtype | ( | type (type_grid) | this | ) | 
Return the grid type as defined in mod_gridtype.
| real ( kind=8 ) function mod_grid::get_value | ( | type ( type_grid ), intent(in) | this, | 
| integer, intent(in) | i, | ||
| integer, intent(in) | j, | ||
| integer, intent(in) | k | ||
| ) | 
Test function.
keep as intermediate, efficient call get directly the value
| real ( kind=8 ) function mod_grid::get_value_dtgrid | ( | type ( type_dtgrid ), intent(in) | this, | 
| integer, intent(in) | i, | ||
| integer, intent(in) | j, | ||
| integer, intent(in) | k | ||
| ) | 
Get the value at a point of a dtgrid.
Need a call to C++ function
| this | : instance of type_dtgrid | 
| i,j,k | : position of the cell | 
| logical function mod_grid::get_value_exclusion_dtgrid | ( | type ( type_dtgrid ), intent(in) | this, | 
| integer, intent(in) | i, | ||
| integer, intent(in) | j, | ||
| integer, intent(in) | k | ||
| ) | 
| real ( kind=8 ) function mod_grid::get_value_real_uhbd | ( | type ( type_uhbd_grid ), intent(in) | this, | 
| integer, intent(in) | i, | ||
| integer, intent(in) | j, | ||
| integer, intent(in) | k | ||
| ) | 
Test for uhbd and dtgrid.
| subroutine mod_grid::get_voxel_dtgrid | ( | type ( type_dtgrid ), intent(in) | this, | 
| integer, intent(in) | i, | ||
| integer, intent(in) | j, | ||
| integer, intent(in) | k, | ||
| real ( kind=8 ), dimension ( 8 ), intent(inout) | voxel | ||
| ) | 
| subroutine mod_grid::grid_scale | ( | type ( type_grid ) | this, | 
| real ( kind=8 ) | scaling | ||
| ) | 
| subroutine mod_grid::info_grid | ( | type (type_grid) | this | ) | 
Print information about the grid, may extend.
| logical function mod_grid::is_associated | ( | type ( type_grid ), intent(in) | this | ) | 
function to test if the 3d grid is correctly initiliazed
Will check if the correct pointer is associated
| this | : instance of type_grid | 
| integer function mod_grid::is_associated_int | ( | type ( type_grid ), intent(in) | this | ) | 
| subroutine mod_grid::make_sphere | ( | type ( type_grid ) | this | ) | 
Set to 0. all points further than a cutoff.
 The cutoff is the maximum shpere we can include inside the cube. 
| this | : instance of type_grid | 
| subroutine mod_grid::print_grid | ( | type ( type_grid ), intent(in) | this, | 
| integer, intent(in) | io_unit | ||
| ) | 
Print information about the grid into a log file.
Write slice of potential in fort.77 as before and convenient for comparing methods
| this | : instance of type_grid | 
| io_unit | : file descriptor of the output file. Use a log file in sda | 
| subroutine mod_grid::print_origin | ( | type (type_grid) | this | ) | 
Print origin, for debug.
| subroutine mod_grid::read_excl_grid | ( | type ( type_grid ) | this, | 
| character, dimension(*) | filename, | ||
| real ( kind = 8 ), dimension ( 3 ) | prot_cm, | ||
| type ( probe_type ) | param_probe, | ||
| logical | status | ||
| ) | 
Specific function for reading an exclusion grid.
Shortcut for exclusion grid. Always logical values Can read UHBD or dtgrid format
| this | : instance of type_grid | 
| filename | : name of the file | 
| prot_cm | : center of geometry of the pdb file. used to recenter the grid ?? needed ?? | 
| param_probe | : instance of probe_type | 
| status | : for error report | 
| subroutine mod_grid::read_grid | ( | type ( type_grid ) | this, | 
| character*128 | filename, | ||
| integer, intent(in), optional | grid_type_opt, | ||
| real ( kind=8 ), intent(in), optional | scfct_opt, | ||
| logical, intent(in), optional | read_header_only_opt, | ||
| integer, intent(in), optional | iform_opt | ||
| ) | 
Read grid file.
| this | : instance of type_grid | 
| filename | : name of the file | 
| grid_type_opt | : optionaly the grid number, mod_gridtype | 
| scfct_opt | : optionaly if a multiplicative factor must be applied to all grid points. Default 1 | 
| read_header_only_opt | : optionaly just print information of the header file. Do not load the grid | 
| iform_opt | : optionaly if the file is ascii ( 1 ) or binary ( 0 ). Not necessary for uhbd, will call test_format_grid | 
| subroutine mod_grid::read_header_grid | ( | type ( type_grid ) | this, | 
| integer, intent(in) | io_unit, | ||
| integer | status | ||
| ) | 
Read header of the file.
Fill data member with information of the header iform should be set correctly before calling the function
| this | : instance of type_grid | 
| io_unit | : file descriptor | 
| status | : return error code | 
| subroutine mod_grid::shift_origin | ( | type (type_grid), intent(inout) | this, | 
| real ( kind=8 ), dimension(3), intent(in) | center | ||
| ) | 
| subroutine mod_grid::test_format_grid | ( | type ( type_grid ) | this, | 
| integer | io_unit | ||
| ) | 
Error in make ep_grid, grdflag is a good variable for binary or ascii, but works only if created by module no rules for uhbd ( 1 ) or apbs ( -1 ) use title of electrostatic grid to decide by default in sda, force to read in binary, can be changed now.
Test the format of a grid file
Test if the grid is writen in binary or ascii format Trick : I use the filed 4 ( called grdflag ) to store this information in the grid writen by this software
 Does not apply to electrostatic grids produced by UHBD or APBS. Need to use header content
| this | : instance of type_grid | 
| io_unit | : file descriptor of the file | 
| subroutine mod_grid::write_excl_grid | ( | type ( type_grid ) | this, | 
| character, dimension(*) | filename, | ||
| real ( kind = 8 ), dimension ( 3 ) | prot_cm, | ||
| type ( probe_type ) | param_probe | ||
| ) | 
Write exclusion grid.
| this | : instance of type_grid | 
| filename | : name of the file | 
| prot_cm | : center of geometry of the solute | 
| param_probe | : instance of probe_type | 
| subroutine mod_grid::write_grid | ( | type ( type_grid ) | this, | 
| character*128 | filename, | ||
| logical, optional | opt_modif_name, | ||
| real ( kind=4 ), dimension (:, :, :), optional, pointer | opt_pgrid4 | ||
| ) | 
Write a grid to a file.
If a pointer to a real*4 3d grid is provided in option, its content will be printed into the file
 It avoids the conversion and copy from real*4 to real*8
 Apply only to UHBD grids
| this | : instance of type_grid | 
| filename | : name of the file | 
| opt_modif_name | : optionaly if true append a suffix ".bin.grd" or ".ascii.grd" | 
| opt_pgrid4 | : optionaly use an external pointer to 3d dimensional grid. Default use type_grid::p_grid | 
| subroutine mod_grid::write_grid_dx | ( | type ( type_grid ) | this, | 
| character*128 | filename, | ||
| logical, optional | opt_modif_name | ||
| ) | 
Write grid to dx format.
Used only by the tool read_record
| subroutine mod_grid::write_uhbd_grid | ( | type ( type_uhbd_grid ), intent(in) | this, | 
| type ( type_grid ), intent(in) | base, | ||
| character*128, intent(in) | filename, | ||
| real ( kind=4 ), dimension (:, :, :), optional, pointer | opt_pgrid4 | ||
| ) | 
| integer, parameter mod_grid::enum_dtgrid = 2 | 
| integer, parameter mod_grid::enum_uhbd = 1 | 
 1.8.13
Imprint/Privacy
 1.8.13
Imprint/Privacy