Created
January 26, 2022 03:36
-
-
Save jmbr/2c86ebc308c82c713ed966ae896158c2 to your computer and use it in GitHub Desktop.
Protein (PDB) viewer written in AWK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
BEGIN { | |
gnuplot = "gnuplot -p"; | |
print "set terminal wxt noraise" | gnuplot; | |
print "set view equal xyz" | gnuplot; | |
print "set linetype 1 linecolor palette z linewidth 5" | gnuplot; | |
print "unset tics" | gnuplot; | |
print "unset border" | gnuplot; | |
print "unset colorbox" | gnuplot; | |
print "splot '-' notitle with lines" | gnuplot; | |
} | |
$1 == "ATOM" && $3 == "CA" { | |
printf "%f %f %f\n", $7, $8, $9 | gnuplot; | |
} | |
END { | |
print "e\n" | gnuplot; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment