- #1
kranthi4689
- 16
- 0
I'm new to prorgramming . I have been working with Fortran90 for my physics project and I have to read data from a file. I need to find a specific matrix and then print the said matrix onto a different file and diagonalize it. How do I read the matrix that follows a specific line from a file . My file looks like this:
OVERLAP MATRIX - CELL N. 1( 0 0 0)
1 2 3 4 5 6 ...
1 1.0000E+00
2 6.5891E-01 1.0000E+00
3 0.0000E+00 0.0000E+00 1.0000E+00
4 0.0000E+00 0.0000E+00 0.0000E+00 1.0000E+00
5 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 1.0000E+00
6 0.0000E+00 0.0000E+00 6.7373E-01 0.0000E+00 0.0000E+00 1.0000E+00
7 0.0000E+00 0.0000E+00 0.0000E+00 6.7373E-01 0.0000E+00 0.0000E+00 ...
......
Now, If the line overlap matrix -cell n is found then I need to read the matrix below it. How can I achieve this using fortran. thank you.
OVERLAP MATRIX - CELL N. 1( 0 0 0)
1 2 3 4 5 6 ...
1 1.0000E+00
2 6.5891E-01 1.0000E+00
3 0.0000E+00 0.0000E+00 1.0000E+00
4 0.0000E+00 0.0000E+00 0.0000E+00 1.0000E+00
5 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 1.0000E+00
6 0.0000E+00 0.0000E+00 6.7373E-01 0.0000E+00 0.0000E+00 1.0000E+00
7 0.0000E+00 0.0000E+00 0.0000E+00 6.7373E-01 0.0000E+00 0.0000E+00 ...
......
Now, If the line overlap matrix -cell n is found then I need to read the matrix below it. How can I achieve this using fortran. thank you.