Created
January 17, 2024 10:24
-
-
Save quantixed/72f8a42ca3e995c3dd8b53a79de44970 to your computer and use it in GitHub Desktop.
shell script to open each pdb file in a file tree, colour by chain and take a raytraced image
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
#!/bin/zsh | |
# Find all *.pdb files recursively | |
find . -name "*.pdb" | while read -r file; do | |
# Extract the filename without extension | |
filename=$(basename "$file" .pdb) | |
# Extract the name of the directory | |
dirname=$(dirname "$file") | |
# Concatenate the directory name and the filename, separated by an underscore | |
output="${dirname}_${filename}" | |
# Run the pymol command | |
pymol -qc "$file" -d "util.cbc; ray 1280, 1024; png ${output}.png; quit" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment