This repository is a small collection of PyMOL scripts created for visualization and analysis.
mark_termini.py
Marks all C-termini or N-termini in a protein
mark_termini(name="6RVV", term="C")
pack_cgo.py
Fits a CGO solid to a molecular structure, possible bounding shapes: sphere, cylinder, cuboid, cone
pack_sphere("1HZH", color=(1,0,1), margin=10)
pack_cuboid("1HZH", cube=False)
align_structures.py
Aligns structure A at a specified point and orients it perpendicular to structure B based on provided points
align(v0, v1, p0, p1, p2, "1HZH")Points v0, v1 determine the axis along structure A, points p0, p1, p2 determine the perpendicular plane on structure B. Structure A is 'attached' to p0 at v0.
measure.py
Generates a bounding box for a structure and measures its size in the three dimensions
m = Measurement("1HZH") # the default is "all"
m.rotate('x', -10)
print(m)
min_distance.py
Finds minimum distance between atoms of the two input structures. It uses a Divide-and-Conquer algorithm with a complexity of
print(min_dist("1AAC", "5AAC", C_only=False))With C_only=True, only carbon atoms are considered, which gives an approximate result, but can noticeably speed up calculations for large structures.
- PyMOL
- NumPy
- SciPy