Re: [ccp4bb] RMSD between superposed structures without moving
Just use the "rms_cur" command instead of "align". https://pymolwiki.org/index.php/rms_cur Cheers, Thomas > On Aug 28, 2017, at 10:04 AM, Johannes Sommerkamp > <155b9e78396e-dmarc-requ...@jiscmail.ac.uk> wrote: > > Thanks a lot for your answers and the PyMOL mailing list hint. I didnt had in > mind this list. > > I read the Pymol Wiki. The commands > align moving, target, cycles=0, transform=0 > > align moving, target, cycles=0 > > give identical values for RMSD. So, the only difference is, that the moving > structure is not moved in the graphical output. Additionally the RMSD with > the argument cycles=0 can't be the RMSD before any movement because the > values differ for the super and the align command. I think its just without > refinement. > Since the two structure I want to compare are already aligned based on the > central beta sheet CA atoms, I want to calculate the RMSD without any > movement. > > > Regards > Johannes > > > > On 27/08/17 19:18, Folmer Fredslund wrote: >> Hi Johannes, >> >> Did you read the PymoWIKI entry on the align command? >> >> https://pymolwiki.org/index.php/Align#RMSD >> >> I think this should give you what you want within PyMOL. >> >> Btw, there is a nice dedicated PyMOL mailing list >> https://pymolwiki.org/index.php/PyMOL_mailing_list >> It is rather low traffic, but the replies are generally from the developers >> or very knowledgeable users. >> >> Hope this helps, >> Folmer Fredslund >> >> On 2017-08-27 13:09, Johannes Sommerkamp wrote: >>> Hello everybody, >>> I have superposed two structures based on the central beta-sheet CA atoms >>> with the "super" command in Pymol. >>> Now, I want to calculate the RMSD between ALL atoms or ALL CA atoms without >>> moving the structures again. The rms_cur command in Pymol would do that, >>> but only works if all atom identifiers match. Adding "transform=0" to the >>> super, oder align command still does the alignment and moves the structure >>> but does not show the movement. >>> >>> Is there an easy way to just calculate the all atom RMSD between two >>> already superposed structures in pymol or any other programm? >>> >>> Thanks in advance! >>> Johannes >>> > > -- > Johannes Sommerkamp > Ruhr-Universität Bochum > AG Röntgenstrukturanalyse an Proteinen, LS Biophysik, ND04/396 > Universitätsstraße 150 > 44801 Bochum > Tel: +49-(0)234/32-25754 -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc.
Re: [ccp4bb] RMSD between superposed structures without moving
Or using cctbx: from scitbx.array_family import flex import iotbx.pdb def run(): xyz_1 = iotbx.pdb.input(file_name="file_1.pdb").atoms().extract_xyz() xyz_2 = iotbx.pdb.input(file_name="file_2.pdb").atoms().extract_xyz() print flex.mean(flex.sqrt((xyz_1 - xyz_2).dot())) if (__name__ == "__main__"): run() Pavel On Mon, Aug 28, 2017 at 9:46 AM, Tristan Croll wrote: > I should learn not to post while distracted. That last line was both > over-engineered, and wrong. What you want is: > > rmsd = sum(numpy.linalg.norm(xyz1-xyz2, axis=1))/len(xyz1) > > > On 2017-08-28 14:32, Tristan Croll wrote: > >> In this case calculating the rmsd is easy: >> >> - get the coordinates of each structure as n x 3 numpy arrays. The >> Pymol commands for this should look like: >> >> xyz1 = cmd.get_coords('sele1', 1) >> xyz2 = cmd.get_coords('sele2', 1) >> >> Then, >> >> rmsd = numpy.linalg.norm(numpy.sqrt((xyz1-xyz2)**2), axis=1) >> >> Tristan Croll >> Research Fellow >> Cambridge Institute for Medical Research >> University of Cambridge CB2 0XY >> >> On 28 Aug 2017, at 10:04, Johannes Sommerkamp >> <155b9e78396e-dmarc-requ...@jiscmail.ac.uk> wrote: >> >> Thanks a lot for your answers and the PyMOL mailing list hint. I >>> didnt had in mind this list. >>> >>> I read the Pymol Wiki. The commands >>> >>> align moving, target, cycles=0, transform=0 >>> >>> align moving, target, cycles=0 >>> >>> give identical values for RMSD. So, the only difference is, that >>> the moving structure is not moved in the graphical output. >>> Additionally the RMSD with the argument cycles=0 can't be the RMSD >>> before any movement because the values differ for the super and the >>> align command. I think its just without refinement. >>> Since the two structure I want to compare are already aligned based >>> on the central beta sheet CA atoms, I want to calculate the RMSD >>> without any movement. >>> >>> Regards >>> Johannes >>> >>> On 27/08/17 19:18, Folmer Fredslund wrote: >>> Hi Johannes, >>> >>> Did you read the PymoWIKI entry on the align command? >>> >>> https://pymolwiki.org/index.php/Align#RMSD [1] >>> >>> I think this should give you what you want within PyMOL. >>> >>> Btw, there is a nice dedicated PyMOL mailing list >>> https://pymolwiki.org/index.php/PyMOL_mailing_list [2] >>> It is rather low traffic, but the replies are generally from the >>> developers or very knowledgeable users. >>> >>> Hope this helps, >>> Folmer Fredslund >>> >>> On 2017-08-27 13:09, Johannes Sommerkamp wrote: >>> Hello everybody, >>> I have superposed two structures based on the central beta-sheet CA >>> atoms with the "super" command in Pymol. >>> Now, I want to calculate the RMSD between ALL atoms or ALL CA atoms >>> without moving the structures again. The rms_cur command in Pymol >>> would do that, but only works if all atom identifiers match. Adding >>> "transform=0" to the super, oder align command still does the >>> alignment and moves the structure but does not show the movement. >>> >>> Is there an easy way to just calculate the all atom RMSD between >>> two already superposed structures in pymol or any other programm? >>> >>> Thanks in advance! >>> Johannes >>> >> >> -- >> Johannes Sommerkamp >> Ruhr-Universität Bochum >> AG Röntgenstrukturanalyse an Proteinen, LS Biophysik, ND04/396 >> Universitätsstraße 150 >> 44801 Bochum >> Tel: +49-(0)234/32-25754 >> >> >> Links: >> -- >> [1] https://pymolwiki.org/index.php/Align#RMSD >> [2] https://pymolwiki.org/index.php/PyMOL_mailing_list >> >
Re: [ccp4bb] RMSD between superposed structures without moving
I should learn not to post while distracted. That last line was both over-engineered, and wrong. What you want is: rmsd = sum(numpy.linalg.norm(xyz1-xyz2, axis=1))/len(xyz1) On 2017-08-28 14:32, Tristan Croll wrote: In this case calculating the rmsd is easy: - get the coordinates of each structure as n x 3 numpy arrays. The Pymol commands for this should look like: xyz1 = cmd.get_coords('sele1', 1) xyz2 = cmd.get_coords('sele2', 1) Then, rmsd = numpy.linalg.norm(numpy.sqrt((xyz1-xyz2)**2), axis=1) Tristan Croll Research Fellow Cambridge Institute for Medical Research University of Cambridge CB2 0XY On 28 Aug 2017, at 10:04, Johannes Sommerkamp <155b9e78396e-dmarc-requ...@jiscmail.ac.uk> wrote: Thanks a lot for your answers and the PyMOL mailing list hint. I didnt had in mind this list. I read the Pymol Wiki. The commands align moving, target, cycles=0, transform=0 align moving, target, cycles=0 give identical values for RMSD. So, the only difference is, that the moving structure is not moved in the graphical output. Additionally the RMSD with the argument cycles=0 can't be the RMSD before any movement because the values differ for the super and the align command. I think its just without refinement. Since the two structure I want to compare are already aligned based on the central beta sheet CA atoms, I want to calculate the RMSD without any movement. Regards Johannes On 27/08/17 19:18, Folmer Fredslund wrote: Hi Johannes, Did you read the PymoWIKI entry on the align command? https://pymolwiki.org/index.php/Align#RMSD [1] I think this should give you what you want within PyMOL. Btw, there is a nice dedicated PyMOL mailing list https://pymolwiki.org/index.php/PyMOL_mailing_list [2] It is rather low traffic, but the replies are generally from the developers or very knowledgeable users. Hope this helps, Folmer Fredslund On 2017-08-27 13:09, Johannes Sommerkamp wrote: Hello everybody, I have superposed two structures based on the central beta-sheet CA atoms with the "super" command in Pymol. Now, I want to calculate the RMSD between ALL atoms or ALL CA atoms without moving the structures again. The rms_cur command in Pymol would do that, but only works if all atom identifiers match. Adding "transform=0" to the super, oder align command still does the alignment and moves the structure but does not show the movement. Is there an easy way to just calculate the all atom RMSD between two already superposed structures in pymol or any other programm? Thanks in advance! Johannes -- Johannes Sommerkamp Ruhr-Universität Bochum AG Röntgenstrukturanalyse an Proteinen, LS Biophysik, ND04/396 Universitätsstraße 150 44801 Bochum Tel: +49-(0)234/32-25754 Links: -- [1] https://pymolwiki.org/index.php/Align#RMSD [2] https://pymolwiki.org/index.php/PyMOL_mailing_list
Re: [ccp4bb] RMSD between superposed structures without moving
Look at CCP4 "compar" By default it averages RMSD over all atoms in mainchain and sidechain of the residue, but if you first awk out only CA (or use pdbset to pick CA) foreach structure, the mainchain value will presumably be the Euclidian CA distance (This may require identical sequences, at least no insertions): #test with all-atom pdb files: cd $CEXAM/unix/runnable/ ./refmac5_tls.exam ./compar.exam output: RMS xyz and B AVERAGES RES , MAIN CH,SIDECHAIN RESMAIN CHAIN SIDE CHAIN MAIN CHAIN SIDE CHAINMAIN CHAIN SIDE CHAIN MAIN CHAIN SIDE CHAIN 1 ASP A 0.21 10.10.44 24.9 2 VAL A 0.17 10.00.19 11.1 3 SER A 0.36 10.20.14 6.0 . . . #Awk the CA's into two new files: awk '$1~/ATOM/ && $3~/CA/' $CCP4_SCR/rnase_out.pdb > $CCP4_SCR/rnase_outCA.pdb awk '$1~/ATOM/ && $3~/CA/' $CEXAM/rnase/rnase.pdb > $CCP4_SCR/rn compar \ XYZIN1 $CCP4_SCR/rnaseCA.pdb \ XYZIN2 $CCP4_SCR/rnase_outCA.pdb \ RMSTAB $CCP4_SCR/rnaseCA.rms\ << END-compar comparing rnase coordinates before and after refinement 2 3.0 16 END-compar RMS xyz and B AVERAGES RES , MAIN CH,SIDECHAIN RESMAIN CHAIN SIDE CHAIN MAIN CHAIN SIDE CHAINMAIN CHAIN SIDE CHAIN MAIN CHAIN SIDE CHAIN 1 ASP A 0.24 13.30.00 0.0 2 VAL A 0.12 6.60.00 0.0 3 SER A 0.05 8.10.00 0.0 4 GLY A 0.29 6.40.00 0.0 5 THR A 0.11 8.50.00 0.0 6 VAL A . . . #compare with independently calculated distances: pdbd2b $CCP4_SCR/rnaseCA.pdb $CCP4_SCR/rnase_outCA.pdb 1 0 | moreFind distances greater than threshold between corresponding atoms in 2 PDB files Usage: pdbd2b file1 file2 startres# [thresh] CA ASP A 1 CA ASP A 1 0.2376 CA VAL A 2 CA VAL A 2 0.1173 CA SER A 3 CA SER A 3 0.0462 CA GLY A 4 CA GLY A 4 0.2865 CA THR A 5 CA THR A 5 0.1128 CA VAL A 6 CA VAL A 6 0.2899 On 08/27/2017 07:09 AM, Johannes Sommerkamp wrote: Hello everybody, I have superposed two structures based on the central beta-sheet CA atoms with the "super" command in Pymol. Now, I want to calculate the RMSD between ALL atoms or ALL CA atoms without moving the structures again. The rms_cur command in Pymol would do that, but only works if all atom identifiers match. Adding "transform=0" to the super, oder align command still does the alignment and moves the structure but does not show the movement. Is there an easy way to just calculate the all atom RMSD between two already superposed structures in pymol or any other programm? Thanks in advance! Johannes
Re: [ccp4bb] New version of SHELXE
Dear Carlos, You are correct. I reinstalled CCP4 two days ago and also got version 0044 and that did not incude the new shelxe_2017-1. However the new shelxe is definitely on the shelx server. It is a single statically linked executable with no dependencies (!) so you can simply replace the old file with it by hand (under Linux, 'which shelxe' will tell you where it is). The CCP4 people may be worried that the new shelxe will break some of their pipelines, but I am not expecting problems. Also some of them are at the Meeting in India. However they do need to change several of their pipelines to take advantage of the new tracing features such as -Q, -B3 and -a (without a number) that are a significant improvement at lower resolution. See 'recent changes' on the shelx homepage for details. Best wishes, George On 08/28/2017 03:40 PM, Carlos CONTRERAS-MARTEL wrote: Hi George, thank you very much for your answer, but I think that my updated version of ccp4-7.0.0044 is not using this version of shelxe, or am I wrong? Best Carlos -- Prof. George M. Sheldrick FRS Dept. Structural Chemistry, University of Goettingen, Tammannstr. 4, D37077 Goettingen, Germany Tel. +49-551-39-33021 or +49-5594-227312
Re: [ccp4bb] RMSD between superposed structures without moving
In this case calculating the rmsd is easy: - get the coordinates of each structure as n x 3 numpy arrays. The Pymol commands for this should look like: xyz1 = cmd.get_coords('sele1', 1) xyz2 = cmd.get_coords('sele2', 1) Then, rmsd = numpy.linalg.norm(numpy.sqrt((xyz1-xyz2)**2), axis=1) Tristan Croll Research Fellow Cambridge Institute for Medical Research University of Cambridge CB2 0XY > On 28 Aug 2017, at 10:04, Johannes Sommerkamp > <155b9e78396e-dmarc-requ...@jiscmail.ac.uk> wrote: > > Thanks a lot for your answers and the PyMOL mailing list hint. I didnt had in > mind this list. > > I read the Pymol Wiki. The commands > align moving, target, cycles=0, transform=0 > > align moving, target, cycles=0 > > give identical values for RMSD. So, the only difference is, that the moving > structure is not moved in the graphical output. Additionally the RMSD with > the argument cycles=0 can't be the RMSD before any movement because the > values differ for the super and the align command. I think its just without > refinement. > Since the two structure I want to compare are already aligned based on the > central beta sheet CA atoms, I want to calculate the RMSD without any > movement. > > > Regards > Johannes > > > >> On 27/08/17 19:18, Folmer Fredslund wrote: >> Hi Johannes, >> >> Did you read the PymoWIKI entry on the align command? >> >> https://pymolwiki.org/index.php/Align#RMSD >> >> I think this should give you what you want within PyMOL. >> >> Btw, there is a nice dedicated PyMOL mailing list >> https://pymolwiki.org/index.php/PyMOL_mailing_list >> It is rather low traffic, but the replies are generally from the developers >> or very knowledgeable users. >> >> Hope this helps, >> Folmer Fredslund >> >>> On 2017-08-27 13:09, Johannes Sommerkamp wrote: >>> Hello everybody, >>> I have superposed two structures based on the central beta-sheet CA atoms >>> with the "super" command in Pymol. >>> Now, I want to calculate the RMSD between ALL atoms or ALL CA atoms without >>> moving the structures again. The rms_cur command in Pymol would do that, >>> but only works if all atom identifiers match. Adding "transform=0" to the >>> super, oder align command still does the alignment and moves the structure >>> but does not show the movement. >>> >>> Is there an easy way to just calculate the all atom RMSD between two >>> already superposed structures in pymol or any other programm? >>> >>> Thanks in advance! >>> Johannes >>> > > -- > Johannes Sommerkamp > Ruhr-Universität Bochum > AG Röntgenstrukturanalyse an Proteinen, LS Biophysik, ND04/396 > Universitätsstraße 150 > 44801 Bochum > Tel: +49-(0)234/32-25754
Re: [ccp4bb] RMSD between superposed structures without moving
Thanks a lot for your answers and the PyMOL mailing list hint. I didnt had in mind this list. I read the Pymol Wiki. The commands align moving, target, cycles=0, transform=0 align moving, target, cycles=0 give identical values for RMSD. So, the only difference is, that the moving structure is not moved in the graphical output. Additionally the RMSD with the argument cycles=0 can't be the RMSD before any movement because the values differ for the super and the align command. I think its just without refinement. Since the two structure I want to compare are already aligned based on the central beta sheet CA atoms, I want to calculate the RMSD without any movement. Regards Johannes On 27/08/17 19:18, Folmer Fredslund wrote: Hi Johannes, Did you read the PymoWIKI entry on the align command? https://pymolwiki.org/index.php/Align#RMSD I think this should give you what you want within PyMOL. Btw, there is a nice dedicated PyMOL mailing list https://pymolwiki.org/index.php/PyMOL_mailing_list It is rather low traffic, but the replies are generally from the developers or very knowledgeable users. Hope this helps, Folmer Fredslund On 2017-08-27 13:09, Johannes Sommerkamp wrote: Hello everybody, I have superposed two structures based on the central beta-sheet CA atoms with the "super" command in Pymol. Now, I want to calculate the RMSD between ALL atoms or ALL CA atoms without moving the structures again. The rms_cur command in Pymol would do that, but only works if all atom identifiers match. Adding "transform=0" to the super, oder align command still does the alignment and moves the structure but does not show the movement. Is there an easy way to just calculate the all atom RMSD between two already superposed structures in pymol or any other programm? Thanks in advance! Johannes -- Johannes Sommerkamp Ruhr-Universität Bochum AG Röntgenstrukturanalyse an Proteinen, LS Biophysik, ND04/396 Universitätsstraße 150 44801 Bochum Tel: +49-(0)234/32-25754