Created
May 30, 2022 16:15
-
-
Save leiterenato/75e2d43af2f7834f65df35402a5b4aac to your computer and use it in GitHub Desktop.
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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"! conda install -c schrodinger pymol-bundle" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from pymol import cmd" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"filename_1 = 'relaxed_model_1_pred_0.pdb'\n", | |
"filename_2 = 'relaxed_protein.pdb'\n", | |
"\n", | |
"with open(filename_1, 'r') as fp:\n", | |
" file1 = fp.read()\n", | |
"\n", | |
"pdb1 = cmd.read_pdbstr(file1, 'pdb1')\n", | |
"\n", | |
"with open(filename_2, 'r') as fp:\n", | |
" file2 = fp.read()\n", | |
"\n", | |
"pdb2 = cmd.read_pdbstr(file2, 'pdb2')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"['pdb1', 'pdb2']" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"cmd.get_names()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(1.2936300039291382, 12188, 0, 1.2936300039291382, 12188, 4195.0, 779)" | |
] | |
}, | |
"execution_count": 4, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"cmd.align('pdb1', 'pdb2', cycles=0, transform=0)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"(1.2333121299743652,\n", | |
" 12131,\n", | |
" 0,\n", | |
" 1.2333121299743652,\n", | |
" 12131,\n", | |
" 3733.83642578125,\n", | |
" 775)" | |
] | |
}, | |
"execution_count": 7, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"cmd.super('pdb1', 'pdb2', cycles=0, transform=0)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
" ExecutiveRMSPairs: RMSD = 1.295 (12189 to 12189 atoms)\n" | |
] | |
}, | |
{ | |
"data": { | |
"text/plain": [ | |
"1.2949023246765137" | |
] | |
}, | |
"execution_count": 9, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"cmd.pair_fit('pdb1', 'pdb2')" | |
] | |
} | |
], | |
"metadata": { | |
"interpreter": { | |
"hash": "cd30d8f35cf76d6f481890c0c669267e97b0a0370baaf98c81ab5620aceed69e" | |
}, | |
"kernelspec": { | |
"display_name": "Python 3.7.12 ('rmsd')", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.7.12" | |
}, | |
"orig_nbformat": 4 | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment