Editing
UPU
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== USAGE == '''Example #1''' (level 1) upu '{cartesian;ls;save;export xsf}' ''/path/to/''CONTCAR The command proceeds the following steps: reads a CONTCAR file, switches easily from the default direct coordinates to Cartesian, prints this half-edited version of CONTCAR to the the <TT>stdout</TT>, saves it the modification (output file "CONTCAR"), exports and saves the supercell to the XCrysDen format (output file "CONTCAR.xsf") and quits to BASH shell. '''Example #2''' (level 2) upu '{cartesian ;\ measure distance a 0 a 1 ;\ measure angle a 0 a 1 a 2 ;\ measure dihedral a 0 a 1 a 2 a 3 }' ''/path/to/''CONTCAR The command reads in a stucture-*CAR file, and measures the distance between atoms # 1 and 2, the bond angle between the atoms # 1-2-3 and the dihedral angle on the atoms # 1-2-3-4. Each ''measure''ment has a one-line numerical output, thus it is easy to be parsed. So if the output of the <TT>upu</TT> command is redirected into a file ("<TT>upu '{commands}' CONTCAR > data.dat</TT>"), you can easily parse the variable in a BASH-script using e.g. tail -3 data.dat > temp.dat for i in `seq 1 3` ; do var[$i]=`awk -v line=$i '(NR==line){print $1}' temp.dat` done
Summary:
Please note that all contributions to Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information