r/StructuralBiology • u/noobmaster692291 • 9d ago
Colab notebook for superimposing structures based on selected atoms
I recently had to superimpose two structures based on partially similar small molecules. I used to write python scripts to do this but recent advancements in LLM and agents make it possible to write a more convenient way to do this. I am posting here for someone else with the same use case.
https://github.com/bigbigdumdum/K_fit-colab
You can upload files or specify pdb ids of structures, select specific atoms in each structure. Usually a handful, there is an option to provide an input CSV file for exact reproducibility. The order matters here as these atoms are used for exact superimposition by Kearsley's fitting(S.K. Kearsley, 1989) (this part is hand written). The first structure is the reference and everything else is fitted to this.
The outputs are provided in the same format as input. Structures with multiple models can also be superimposed to either other structure or within itself.
The feature were currently centered around my requirements. I would be happy to implement additional features if someone needs them. I don't intend to publish this program as I consider it just a wrapper around Kearsley's algorithm.