57#ifndef DTGRID3DEX_HPP_
58#define DTGRID3DEX_HPP_
115 void set_projection2D(
int*,
int*,
int*,
int*,
int*,
int*,
int,
int,
int,
int,
int,
int);
160 bool *
getCell(
bool *,
int,
int,
int);
161 bool *
getCell2(
bool *,
int,
int,
int);
190 std::cout <<
"Error: Unknown file format" << std::endl;
488 file_bt.open(
Input, std::ifstream::in | std::ifstream::binary);
494 char *
buffer =
new char [120];
502 std::cout <<
"Test format dtgrid: No return statement, binary zeros found" << std::endl;
503 std::cout <<
"The file was detected to be of type binary" << std::endl;
511 std::cout <<
"Test format dtgrid: No return statement, no binary zeros" << std::endl;
512 std::cout <<
"The file was detected to be of type ASCII" << std::endl;
517 std::cout <<
"Test format dtgrid: No return statement, binary zeros found" << std::endl;
518 std::cout <<
"The file was detected to be of type binary" << std::endl;
524 std::cout <<
"Test format dtgrid: Return statement found" << std::endl;
525 std::cout <<
"The file was detected to be of type ASCII" << std::endl;
594 std::cout <<
"Type of grid: Excluded volume" << std::endl;
596 std::cout <<
"Type of grid: Potential/Energy" << std::endl;
598 std::cout <<
"Type of grid: Unknown/Not-Set" << std::endl;
600 std::cout <<
"DT-Grid Header information: " << std::endl;
601 std::cout <<
"Length of Value array:\t" <<
len_Value << std::endl;
602 std::cout <<
"Length of xCoord array:\t" <<
len_xcoord<< std::endl;
603 std::cout <<
"Length of yCoord array:\t" <<
len_ycoord << std::endl;
604 std::cout <<
"Length of zCoord array:\t" <<
len_zcoord << std::endl;
605 std::cout <<
"Length of acc1D array:\t" <<
len_acc << std::endl;
606 std::cout <<
"Length of acc2D array:\t" <<
len_acc2 << std::endl;
607 std::cout <<
"Length of acc3D array:\t" <<
len_acc3 << std::endl;
608 std::cout <<
"Length of proj1D array:\t" <<
len_projection << std::endl;
609 std::cout <<
"Length of proj2D array:\t" <<
len_projection2 << std::endl << std::endl;
791 std::cout <<
"Type of grid: Excluded volume" << std::endl;
793 std::cout <<
"Type of grid: Potential/Energy" << std::endl;
795 std::cout <<
"Type of grid: Unknown/Not-Set" << std::endl;
797 std::cout <<
"DT-Grid Header information: " << std::endl;
798 std::cout <<
"Length of Value array:\t" <<
len_Value << std::endl;
799 std::cout <<
"Length of xCoord array:\t" <<
len_xcoord<< std::endl;
800 std::cout <<
"Length of yCoord array:\t" <<
len_ycoord << std::endl;
801 std::cout <<
"Length of zCoord array:\t" <<
len_zcoord << std::endl;
802 std::cout <<
"Length of acc1D array:\t" <<
len_acc << std::endl;
803 std::cout <<
"Length of acc2D array:\t" <<
len_acc2 << std::endl;
804 std::cout <<
"Length of acc3D array:\t" <<
len_acc3 << std::endl;
805 std::cout <<
"Length of proj1D array:\t" <<
len_projection << std::endl;
806 std::cout <<
"Length of proj2D array:\t" <<
len_projection2 << std::endl << std::endl;
899 gb = 1024 * 1024 * 1024;
901 if ((
val /
gb) > 1) {
903 std::cout <<
"Size of DT-Grid data structure is " <<
dtgrid_size <<
" GB" << std::endl;
906 if ((
val /
mb) > 1) {
908 std::cout <<
"Size of DT-Grid data structure is " <<
dtgrid_size <<
" MB" << std::endl;
912 std::cout <<
"Size of DT-Grid data structure is " <<
dtgrid_size <<
" KB" << std::endl;
Define the array for storing pairs of indices.
Define the array for storing pointers into ArrayPrs.
Define arrays of regular type used in any of the DT-Grid layers.
Define 2D DT-Grid class and group its functions.
PairArray * PArray
Definition ArrayPrs.hpp:51
void Set_Pair_Array_Values(K *, int)
Setup the array that stores the complete icoord values.
Definition ArrayPrs.hpp:74
ArrayPrs< K >::PairArray ** PtrArray
Definition ArrayPtr.hpp:45
ArrayPtr< T, K > * Ptr_List_1D
Definition DTGrid1D.hpp:20
int set_countdown_1
Definition DTGrid1D.hpp:46
ArrayPrs< K > * Xcoord_List
Definition DTGrid1D.hpp:19
void set_projection1D(K *, K *, K *, int, int, int)
proj2D setup
Definition DTGrid2D.hpp:126
ArrayPrs< K >::PairArray * accessxy(int, int)
Reset pointers that temporarily store addresses for random access. Similar to that for DT-Grid3D.
Definition DTGrid2D.hpp:153
ArrayPrs< K > * Ycoord_List
Definition DTGrid2D.hpp:24
ArrayPtr< T, K > * Ptr_List_2D
Definition DTGrid2D.hpp:25
DTGrid1D< T, K > * proj1D
Definition DTGrid2D.hpp:27
void set_ptr_list_2D(K *, int)
acc (2D) array setup
Definition DTGrid2D.hpp:109
void set_ycoord_list(K *, int)
yCoord array setup
Definition DTGrid2D.hpp:96
void set_value_list_2D(K *, int)
DTGrid2D 'value' array setup.
Definition DTGrid2D.hpp:83
Definition DTGrid3D.hpp:65
int idummy3
Definition DTGrid3D.hpp:148
int grdflag
Definition DTGrid3D.hpp:144
float dummy5
Definition DTGrid3D.hpp:157
float dummy7
Definition DTGrid3D.hpp:159
float z
Definition DTGrid3D.hpp:122
float dummy3
Definition DTGrid3D.hpp:155
float dummy6
Definition DTGrid3D.hpp:158
char * Title
Definition DTGrid3D.hpp:143
float x
Definition DTGrid3D.hpp:120
struct DTGrid3D::@2::origin o
float y
Definition DTGrid3D.hpp:121
float scale
scaling factor
Definition DTGrid3D.hpp:92
int j
Definition DTGrid3D.hpp:114
float dummy1
Definition DTGrid3D.hpp:153
float spacing
Definition DTGrid3D.hpp:93
int i
Definition DTGrid3D.hpp:113
int idummy2
Definition DTGrid3D.hpp:147
int idummy4
Definition DTGrid3D.hpp:149
float dummy4
Definition DTGrid3D.hpp:156
int k
Definition DTGrid3D.hpp:115
int idummy5
Definition DTGrid3D.hpp:150
struct DTGrid3D::@2::dimensions dim
int idummy1
Definition DTGrid3D.hpp:146
int one
Definition DTGrid3D.hpp:145
float dummy2
Definition DTGrid3D.hpp:154
Definition DTGrid3Dex.hpp:73
int one
Definition DTGrid3Dex.hpp:130
float z
Definition DTGrid3Dex.hpp:110
~DTGrid3Dex()
DTGrid3Dex destructor.
Definition DTGrid3Dex.hpp:170
struct DTGrid3Dex::@5::origin o
bool * getCell2(bool *, int, int, int)
Random access to grid cells. (2nd version)
Definition DTGrid3Dex.hpp:454
struct DTGrid3Dex::@5 uhbd
UHBD header information.
void format_binary(char *)
Open and Read the binary grid file.
Definition DTGrid3Dex.hpp:542
int idummy5
Definition DTGrid3Dex.hpp:135
void set_zcoord_list(int *, int)
zCoord array setup
Definition DTGrid3Dex.hpp:201
float dummy7
Definition DTGrid3Dex.hpp:144
char * Title
Definition DTGrid3Dex.hpp:128
int idummy1
Definition DTGrid3Dex.hpp:131
struct DTGrid3Dex::@5::dimensions dim
DTGrid3Dex(char *)
DTGrid3Dex constructor.
Definition DTGrid3Dex.hpp:179
float spacing
not used for data scaling
Definition DTGrid3Dex.hpp:97
float y
Definition DTGrid3Dex.hpp:109
int idummy4
Definition DTGrid3Dex.hpp:134
int i
Definition DTGrid3Dex.hpp:101
void getCellyz(bool *, int, int, int, typename ArrayPrs< int >::PairArray *)
Random access function for grid cells (y direction, DTGrid2D).
Definition DTGrid3Dex.hpp:360
int Length_of_Value_List_3D
Definition DTGrid3Dex.hpp:86
int grdflag
Definition DTGrid3Dex.hpp:129
void size_ds(unsigned int)
Estimate the grid file size.
Definition DTGrid3Dex.hpp:892
int idummy3
Definition DTGrid3Dex.hpp:133
struct DTGrid3Dex::@4 origin
hold the coordinates (in x, y and z) of the grid origin.
void set_uhbd_parameters(float, float, float, float, float, int, int, int)
Read and set the grid parameters.
Definition DTGrid3Dex.hpp:246
int iform
grid file format: binary = 0; ascii = 1
Definition DTGrid3Dex.hpp:91
void Reset_pointers_3D(void)
void set_projection2D(int *, int *, int *, int *, int *, int *, int, int, int, int, int, int)
proj2D setup
Definition DTGrid3Dex.hpp:223
int k
Definition DTGrid3Dex.hpp:103
float dummy6
Definition DTGrid3Dex.hpp:143
struct DTGrid3Dex::@3 dimensions
grid resolution
float dummy2
Definition DTGrid3Dex.hpp:139
void getCellz(bool *, int, int, int, typename ArrayPrs< int >::PairArray *)
Random access to grid cells in z direction.
Definition DTGrid3Dex.hpp:317
int Length_of_Ptr_List_3D
Definition DTGrid3Dex.hpp:88
void format_ascii(char *)
Open and Read the ascii grid file.
Definition DTGrid3Dex.hpp:699
int idummy2
Definition DTGrid3Dex.hpp:132
float dummy3
Definition DTGrid3Dex.hpp:140
float scale
Definition DTGrid3Dex.hpp:96
void test_format_dtgrid(char *)
Determine the DT-Grid file format.
Definition DTGrid3Dex.hpp:485
float dummy5
Definition DTGrid3Dex.hpp:142
float dummy1
Definition DTGrid3Dex.hpp:138
bool * getCell(bool *, int, int, int)
Random access to grid cells.
Definition DTGrid3Dex.hpp:412
int grid_type
grid type: exclusion grid = 0; normal grid = 1
Definition DTGrid3Dex.hpp:94
ArrayReg< bool > * Value_List_3D
Definition DTGrid3Dex.hpp:80
int Length_of_Zcoord_List
Definition DTGrid3Dex.hpp:87
int j
Definition DTGrid3Dex.hpp:102
bool accessxyz(int, int, int)
Random access function.
Definition DTGrid3Dex.hpp:273
float dummy4
Definition DTGrid3Dex.hpp:141
float x
Definition DTGrid3Dex.hpp:108
ArrayPrs< int > * Zcoord_List
Definition DTGrid3Dex.hpp:81
DTGrid2D< bool, int > * proj2D
Definition DTGrid3Dex.hpp:84
ArrayPtr< bool, int > * Ptr_List_3D
Definition DTGrid3Dex.hpp:82