Skip to content

Instantly share code, notes, and snippets.

@physicshinzui
Last active February 3, 2022 00:55
Show Gist options
  • Save physicshinzui/2a6475e0131c4bf138e80634106c907e to your computer and use it in GitHub Desktop.
Save physicshinzui/2a6475e0131c4bf138e80634106c907e to your computer and use it in GitHub Desktop.
One-liner: generating a CSV file of relative SASA of each residues via PyMOL
read -p "Input PDB:" pdb; pymol -ckd "cmd.load('${pdb}'); cmd.do('get_sasa_relative')" | grep "%" | sed -e 's;/; ;g' -e 's;`; ;g' -e 's;%;;g'| awk '{print $3 "," $4 "," $5 "," $6}' | awk 'NR==1{print "chainID,resname,resid,rSASA[%]"}1' > rsasa.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment