Editing
Posutil d2c
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!
go back to [[Main Page]], [[Group Pages]], [[Núria López and Group]], [[Scripts_for_VASP]] Converts a POSCAR from direct to cartesian coordinates, format: VASP 5.x. =Instructions= * Install the vasputil package [https://github.com/jabl/vasputil] * Create ~/bin/posutil_d2c: #!/bin/bash # Rodrigo García Muelas # July 6th, 2016 # # Convert a POSCAR 5.x from direct to cartesians # # INPUT: # $1 : Input file # $2 : Output file (optional, default $1.cart) # Remove any .cart file, just in case rm -f $1.cart # Take the species from line 6 into line 1 specs=`head -n 6 $1 | tail -n 1` sed -i "1s/.*/ $specs /" $1 # Convert to cartesians uisg vasputil ~/bin/vasputil_direct2cartesian $1 # Convert from VASP 4x to 5x by adding species into line 6 sed -i "6i\ $specs \ " $1.cart # If an output file is specified, mv .cart to $2 if [ -n "$2" ] ; then mv -f $1.cart $2 fi * Make it executable chmod +x posutil_d2c * You can use it in two different forms; the first one is specifying the output (in this case, output.vasp). Useful for doing scripts when you need to apply several transformations to a file: ./posutil_d2c POSCAR output.vasp # the input is POSCAR # the output is output.vasp * If you do not specify the output, the default is <<input>>.cart ./posutil_d2c POSCAR # the output will be POSCAR.cart ./posutil_d2c CONTCAR # the output will be CONTCAR.cart
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