Skip to content

Instantly share code, notes, and snippets.

@dacarlin
Created July 5, 2014 23:36
Show Gist options
  • Save dacarlin/0b93e56eaf9b57a0a1bb to your computer and use it in GitHub Desktop.
Save dacarlin/0b93e56eaf9b57a0a1bb to your computer and use it in GitHub Desktop.
Awk script that lists alpha carbons within a specified distance of an atom
awk -v x=21.810 -v y=40.733 -v z=38.672 '/CA/ { if (((x-$7)^2+(y-$8)^2+(z-$9)^2)^.5<12) {print $6} }' > [save-to-file]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment