Is extraction of dipole moments from real-time TDDFT a Python command?


Click here for full thread
Forum Regular
python nw_rtparse.py -xdipole -px -tkick_x h2o_abs.nwo > x.dat

"-xdipole" tells the script that you want to extract the dipole moment from the output file
"-px" tells the script that you want to extract the x-component of the dipole moment
"-tkick_x" tells the script that you have set the tag option of the RT-TDDFT input block to kick_x
"h2o_abs.nwo" is the name of your output file
">" is standard Linux for redirecting the output from the script to a file
"x.dat" is the file that you are telling the computer to use for the redirect above

if you used the command

python nw_rtparse.py -xdipole -px -tkick_x h2o_abs.nwo

the output would just print to the screen

You need to modify the options and the name of the output to fit what you actually want/have. So if you based your calculation on the water absorption spectrum example in the QA directory and did not change the tag option from what is in that file and the output file from your calculation is called h2o.log then you would need to execute the command

python nw_rtparse.py -xdipole -px -tkickx h2o.log > x.dat

in order to put the x-component of the dipole into the file x.dat. For the y-component you would do

python nw_rtparse.py -xdipole -py -tkicky h2o.log > y.dat

to put the y-component in the file y.dat, and likewise for the z-component.
As mentioned in another comment above, it would benefit you greatly to do a little reading on basic Linux commands as there are many that can make life much easier when processing the data from your calculations. Mac OS X is a Linux based operating system so almost all Linux commands will work in your terminal.

Best,
Sean