From 7d17a97ca482832fd55259b3133c2d7e2d24598a Mon Sep 17 00:00:00 2001 From: Marcin Magnus Date: Fri, 19 Jul 2024 16:53:30 +0200 Subject: [PATCH 1/2] Update tips.rst --- docs/source/tips.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/source/tips.rst b/docs/source/tips.rst index 1d440d42c..ef8caf7b6 100644 --- a/docs/source/tips.rst +++ b/docs/source/tips.rst @@ -84,6 +84,11 @@ To renumber residues:: Alter: modified 708 atoms. PyMOL>sort +Renumber again, your chain starts at 123, renumber it, so it starts at 1. + + PyMOL>alter (sele), resv -= 122 + Alter: modified 2921 atoms. + Read more_. .. _more: https://pymolwiki.org/index.php?title=Iterate&redirect=no From a2a58cf15235d65dc2c5535f787e260984e2e3b4 Mon Sep 17 00:00:00 2001 From: Marcin Magnus Date: Thu, 1 Aug 2024 17:38:24 +0200 Subject: [PATCH 2/2] Fix PyMOL4RNA.py benasque --- rna_tools/tools/PyMOL4RNA/PyMOL4RNA.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rna_tools/tools/PyMOL4RNA/PyMOL4RNA.py b/rna_tools/tools/PyMOL4RNA/PyMOL4RNA.py index 47d442add..f54599dc6 100644 --- a/rna_tools/tools/PyMOL4RNA/PyMOL4RNA.py +++ b/rna_tools/tools/PyMOL4RNA/PyMOL4RNA.py @@ -514,23 +514,26 @@ def clarna(selection, folder:str=''): .. image:: ../../rna_tools/tools/PyMOL4RNA/doc/clarna.png """ + # save the file f = tempfile.NamedTemporaryFile(delete=False) # True) if not folder: output = f.name + '_clarna.pdb' else: output= folder + os.sep + os.path.basename(f.name) + '_clarna.pdb' - cmd.save(output, selection) + # run cmd CLARNA_RUN = 'rna_clarna_run.py' cmdline = CLARNA_RUN + " -ipdb " + output + ' -bp+stack' - print(cmdline) out, err = exe(cmdline) + # get the output print('\n'.join(out.split('\n')[1:])) # to remove first line of py3dna /tmp/xxx if err: print(err) + # load a (sele) pdb file cmd.load(output) f.close() - + +cmd.extend('clarna', clarna) # export the function for pymol def seq(selection): """Get sequence of the selected fragment using ``rna_pdb_tools.py --get_seq ``.