There are two files named ‘OUTCAR’ and ‘POSCAR’.
The ‘OUTCAR’ file consists of many lines including the following (Screenshot 1):
(It is noted that, there are data for 48 ions in that OUTCAR file, though the screenshot-1 shows here a portion till 3rd ion)
And the ‘POSCAR’ file consists of many lines including the following (Screenshot 2):
(It is noted that, the screenshot-2 shows a portion of data. But we will be interested to consider up to 48th row of data, after the 'Direct' heading)
What I need is, I need to extract and multiply data from the OUTCAR and POSCAR files in the following way (Screenshot 3):
That is, the result will be,
result = (1_22 * X_13) + (2_22 * X_23) + (3_22 * X_33) + . . . .+ (48_22 * X_483)
For example, according to the screenshot, the result will be:
result = (1.01531*0.2396715232098912) + (1.01531*0.2396715232098912) + (1.01531*0.2603284767901088) + ..... till 48th
Therefore, I need to get the calculation result for 48 ions, according to the screenshot-3.
Then I need to print and save the "result" and the "list of the individual product" in an excel/text file.
I am requesting how to do this with the help of Python? Any kind of help is greatly appreciated.
(Screenshot 1)
For convenience, I have uploaded the OUTCAR and POSCAR files in this drive link: Downloadable Link
(Optional: Somehow I could not upload it in the mattermodeling git link, it will be highly appreciated if the two files can be taken to there - in needed)