Utilities¶
Utilities program are provided in the util directory in the download. Util directory consists of multiple small fortran and C/C++ program. These small program are used to convert output file generated by QXMD to a formatted structure. This section gives an overveiw of utility program available with QXMD. It should be noted that this list is not comprehensive and any user can create there own utility program to extract data from QXMD output. output file stucture can be referred to section 4.2.
All the utility program can be compiled using following step.
util $ ifort $(util_program).f -o $(util_program)
All the utility programs take argument -h for help. -h flag prints the argument taken by utility programs.
util $ ./$(util_program) -h
Each program takes path of output data directory as a command line argument. To run the program please eter following steps
util $ ./$(util_program) -d $(path of output data directory)
Utility files may also take more than one argument depending on their calculation. Please check below about the command line section for each analysis.
NOTE: All the utility program are written for INTEL Fortran compiler. It is possible the your program will not compile with gfortran.
Creating PDB file from output¶
Program toPDBcell.f is used to create the PDB file from QXMD output. This program requires following files in the output directory.
Input file¶
qm_ion.d
qm_box.d
md_spc.d
Output file¶
config.pdb
The program will read complete trajectory after a simulation and create a PDB trajectory file. PDB file format can be read by multiple visualization software including VMD, OVITO.
Executing program¶
The program takes one argument.
-d $(Path of the output data directory)
Path of the output data directory is mandatory.
To run the program, please use following step
Example:
./toPDBcell -d data
It will create a file name config.pdb. It will also print timestep on the terminal
open :
data/qm_ion.d
open :
data/qm_box.d
open :
data/md_spc.d
0
1
2
3
4
5
6
7
..
..
..
Picking last configuration from simulation¶
Program pick_config.f90 is used to obtain the last configuration from a trajectory. This program is useful to restart the job in case you have not saved restart files. The program requires following files.
Input file¶
qm_ion.d
qm_box.d
md_spc.d
qm_cel.d
md_vel.d (optional)
Output file¶
IN.VELOC (Velocity data)
IN.CONFIG (Coordinate of each atom)
Lattice_vector.dat (Supercell size)
md_vel.d file is optional, if md_vel.d file exist. Otherwise, program will igonre the option. Program will create three file IN.VELOC, IN. CONFIG and Lattice_vector.dat. IN.VELOC contains velocity data for each atoms. IN.CONFIG contains coordiates of all the atoms in the system and Lattice_vecotr.dat has supercell data.
Executing program¶
The program takes two argument.
-d $(Path of the output data directory)
-n $(TIMESTEP)
Path of the output data directory is mandatory. TIMESTEP selection is optional. If you do not specify -n TIMESTEP option, the program will create output from last snanshot of the trajectory. If you would like to pick certain step from the complete trajectory, specify the timestep.
To run the program, please use following step.
Example:
To pick 5th step from 100 step trajectory
./pick_config -d ../examples/01_Water/optimization/data -n 5
To pick last step from 100 step trajecotry
./pick_config -d ../examples/01_Water/optimization/data
If the program is executed correctely. It will show output on terminal as following.
open :
../examples/01_Water/optimization/data//md_spc.d
open :
../examples/01_Water/optimization/data//qm_ion.d
open :
../examples/01_Water/optimization/data//qm_box.d
open :
../examples/01_Water/optimization/data//qm_cel.d
open :
../examples/01_Water/optimization/data//md_vel.d
Pick up the configuration & velocity files at 100 step
BOX at 0 step [A]
7.0000, 7.0000, 7.0000 : angles between cell vec. in [deg.]
90.0000, 90.0000, 90.0000 : lengths of cell vectors
CELL at 0 step [A]
7.00000 0.00000 0.00000 : super cell vector L1
0.00000 7.00000 0.00000 : super cell vector L2
0.00000 0.00000 7.00000 : super cell vector L3
First 14 lines shows all the file indentified and opened by the program. Next line
Pick up the configuration & velocity files at 100 step
should correspond to your selected step.
Create gaussian cube file to visualize wave function¶
This program is used to create gaussian cube file to visualize wave function. It is to be noted that input files are this program are not outputed as default. You must set dump wavefunctions true in obtain the input files qm_eigv.d. Wavefunction dumping is extremely I/O intesive and each files are very large. You should dump minimal amount of wavefunction files.
Input file¶
qm_ion.d
qm_box.d
md_spc.d
qm_eigv.d.***
Output file¶
state.****.cube
Executing program¶
The program can take upto 5 argument.
-d $(Path_of_the_output_data_directory)
-n $(frequency_of_snapshot)
-ib $(create cube file from state number)
-eb $(create cube file till state number)
-w $(selector between wave function or square of wave function )
Path of the output data directory is mandatory. -n option allows you to choose frequency of cube file created. If you have printed several cube files for each iteration, -ib and -eb allows you to choose create dump file in one run. -w is optional. Adding -w flag will print wave function Ψ. If you would like to print Ψ2, please do not include -w flag.
To run the program, use the
Example:
Create cube files for wave function every 5th step for band 3, 4 and 5
./gcube -d ../examples/01_Water/adiabatic_qmd/data -n 5 -ib 3 -eb 5 -w
Create cube files for square of wave function every 10th step for band 2, 3, 4 and 5
./gcube -d ../examples/01_Water/adiabatic_qmd/data -n 10 -ib 2 -eb 5
If the program is executed correctely. It will show output on terminal as following.
Open:
../examples/01_Water/optimization/data/qm_ion.d
2
2
Open:
./state.02.000110.cube
3
3
Open:
./state.03.000110.cube
4
4
Open:
./state.04.000110.cube
5
5
Open:
./state.05.000110.cube
2
2
Open:
./state.02.000120.cube
....
....
....
....
Kohn Sham eigenvalues¶
This program is used to provide Kohn Sham eigenvales in table format.
Input file¶
qm_eig.d
qm_fer.d
Output file¶
EIG.dat
Executing program¶
The program can take upto 1 argument. Providing the data path is mandotory
-d $(Path_of_the_output_data_directory)
Path of the output data directory is mandatory which is passed as a argument by -d flag.
To run the program, use the
Example:
Create cube files for wave function every 5th step for band 3, 4 and 5
./eig -d ../examples/01_Water/adiabatic_qmd/data
If the program is executed correctely. It will show output on terminal as following.
open :
../examples/01_Water/optimization/data/qm_eig.d
open :
../examples/01_Water/optimization/data/qm_fer.d
0
1
2
3
4
5
6
7
....
....
....
....
The program will create ‘EIG.dat’ file. EIG.dat file contains two column. First column represent to TIMESTEP and second column corresponds to eigenvalues for timestep. For example, in case of single water molecule in box example in example directory, we have used 10 total bands. Thus, first row represent to 10 eigenvalues. Timesteps will remain same for first column of first 10 row. Afterthat, it will change to step 1 and next 10 rows will corresponds to 10 eigenvalues for timestep 1.
Format of EIG.dat:
0 -0.2318E+01
0 -0.4377E+00
0 -0.3899E+00
0 -0.3797E+00
0 0.3797E+00
0 0.5791E+00
0 0.6430E+00
0 0.6445E+00
0 0.6462E+00
0 0.6562E+00
1 -0.2320E+01
1 -0.4662E+00
1 -0.3909E+00
1 -0.3763E+00
1 0.3763E+00
....
....
....
....