Difference between revisions of "Conversion between different data file formats"
Jump to navigation
Jump to search
import>Em427 |
import>Em427 |
||
Line 15: | Line 15: | ||
awk '{printf"%4s%7d %-4s %4s%5d%12.3f%8.3f%8.3f\n", "ATOM",$1,$4,$3,$2,$5,$6,$7}' input.crd_nohead > input.pdb |
awk '{printf"%4s%7d %-4s %4s%5d%12.3f%8.3f%8.3f\n", "ATOM",$1,$4,$3,$2,$5,$6,$7}' input.crd_nohead > input.pdb |
||
rm input.crd_nohead |
rm input.crd_nohead |
||
+ | |||
+ | |||
+ | '''pdb -> crd''' |
||
+ | |||
+ | awk '{if ($1!="TER" && $1!="END") printf"%5d%5d%4s %-4s%17.12f%17.12f%17.12f%6s %-4d\n", $2, $5, $4, $3, $6, $7, $8, "NAME", $5}' input.pdb > input.crd |
Revision as of 13:56, 30 April 2008
xyz -> inpcrd
prepare file xyz2inpcrd containing the following line:
{printf("%.7f %.7f %.7f "), $1, $2, $3} {getline} {printf("%.7f %.7f %.7f\n"), $1, $2, $3}
next type
awk -f xyz2inpcrd input.xyz outpur.inpcrd
crd -> pdb
tail +2 input.crd > input.crd_nohead awk '{printf"%4s%7d %-4s %4s%5d%12.3f%8.3f%8.3f\n", "ATOM",$1,$4,$3,$2,$5,$6,$7}' input.crd_nohead > input.pdb rm input.crd_nohead
pdb -> crd
awk '{if ($1!="TER" && $1!="END") printf"%5d%5d%4s %-4s%17.12f%17.12f%17.12f%6s %-4d\n", $2, $5, $4, $3, $6, $7, $8, "NAME", $5}' input.pdb > input.crd