Skip to content

a-szymanska/pymol-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PyMOL Script Collection

This repository is a small collection of PyMOL scripts created for visualization and analysis.

Overview

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 $O(n \log n)$, where $n$ is the total number of atoms, and thus it runs several dozen times faster than the brute force approach.

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.

Dependencies

  • PyMOL
  • NumPy
  • SciPy

About

A small collection of pymol scripts

Resources

License

Stars

Watchers

Forks

Languages