From: lina <lin...@gm...> - 2011-07-19 02:49:14
|
Hi, I don't know how to save a NEW.pdb which based on the old one but with different coordinate, do I need reset the axis? I loaded a pdb, after rotate it to an ideal position, at this situation, I wish the Z-dimension is perpedicular to its this surface (mainly screen), but fact is that the Z-dimension is other place. Thanks for any advice, -- Best Regards, lina |
From: Jason V. <jas...@sc...> - 2011-07-19 14:29:47
|
Hi Lina, > I don't know how to save a NEW.pdb which based on the old one but with > different coordinate, > do I need reset the axis? Just go into Editing Mode with the mouse by clicking Mouse > 3 Button Editing. Then, while holding down the SHIFT key, position the molecule as you want it (SHIFT-LEFT will rotate; SHIFT-MIDDLE will translate). Once this is done, you can save the molecule and it will honor the new coordinates. If you want an exact rotation/translation you can use either the rotate command (see "help rotate") or the matrix_copy command if you know the transformation matrix to use. Cheers, -- Jason On Mon, Jul 18, 2011 at 10:49 PM, lina <lin...@gm...> wrote: > Hi, > > I don't know how to save a NEW.pdb which based on the old one but with > different coordinate, > do I need reset the axis? > > I loaded a pdb, after rotate it to an ideal position, at this > situation, I wish the Z-dimension is perpedicular to its this surface > (mainly screen), but fact is that the Z-dimension is other place. > > Thanks for any advice, > > -- > Best Regards, > > lina > > ------------------------------------------------------------------------------ > Magic Quadrant for Content-Aware Data Loss Prevention > Research study explores the data loss prevention market. Includes in-depth > analysis on the changes within the DLP market, and the criteria used to > evaluate the strengths and weaknesses of these DLP solutions. > http://www.accelacomm.com/jaw/sfnl/114/51385063/ > _______________________________________________ > PyMOL-users mailing list (PyM...@li...) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pym...@li... > -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) Jas...@sc... (o) +1 (603) 374-7120 |
From: lina <lin...@gm...> - 2011-07-19 15:13:20
|
On Tue, Jul 19, 2011 at 10:29 PM, Jason Vertrees <jas...@sc...> wrote: > Hi Lina, > >> I don't know how to save a NEW.pdb which based on the old one but with >> different coordinate, >> do I need reset the axis? > > Just go into Editing Mode with the mouse by clicking Mouse > 3 Button > Editing. Then, while holding down the SHIFT key, position the > molecule as you want it (SHIFT-LEFT will rotate; SHIFT-MIDDLE will > translate). Once this is done, you can save the molecule and it will > honor the new coordinates. Thanks, but I still failed to get this new pdb. File -- Save molecular --> I wish the present coordinate will be saved as a new pdb after rotation. sorry. > > If you want an exact rotation/translation you can use either the > rotate command (see "help rotate") or the matrix_copy command if you > know the transformation matrix to use. > > Cheers, > > -- Jason > > > > > On Mon, Jul 18, 2011 at 10:49 PM, lina <lin...@gm...> wrote: >> Hi, >> >> I don't know how to save a NEW.pdb which based on the old one but with >> different coordinate, >> do I need reset the axis? >> >> I loaded a pdb, after rotate it to an ideal position, at this >> situation, I wish the Z-dimension is perpedicular to its this surface >> (mainly screen), but fact is that the Z-dimension is other place. >> >> Thanks for any advice, >> >> -- >> Best Regards, >> >> lina >> >> ------------------------------------------------------------------------------ >> Magic Quadrant for Content-Aware Data Loss Prevention >> Research study explores the data loss prevention market. Includes in-depth >> analysis on the changes within the DLP market, and the criteria used to >> evaluate the strengths and weaknesses of these DLP solutions. >> http://www.accelacomm.com/jaw/sfnl/114/51385063/ >> _______________________________________________ >> PyMOL-users mailing list (PyM...@li...) >> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users >> Archives: http://www.mail-archive.com/pym...@li... >> > > > > -- > Jason Vertrees, PhD > PyMOL Product Manager > Schrodinger, LLC > > (e) Jas...@sc... > (o) +1 (603) 374-7120 > -- Best Regards, lina |
From: Jason V. <jas...@sc...> - 2011-07-19 18:04:55
|
Hi Lina, Use the command line: save newPDB.pdb, rotatedObject Cheers, -- Jason On Tue, Jul 19, 2011 at 11:13 AM, lina <lin...@gm...> wrote: > On Tue, Jul 19, 2011 at 10:29 PM, Jason Vertrees > <jas...@sc...> wrote: >> Hi Lina, >> >>> I don't know how to save a NEW.pdb which based on the old one but with >>> different coordinate, >>> do I need reset the axis? >> >> Just go into Editing Mode with the mouse by clicking Mouse > 3 Button >> Editing. Then, while holding down the SHIFT key, position the >> molecule as you want it (SHIFT-LEFT will rotate; SHIFT-MIDDLE will >> translate). Once this is done, you can save the molecule and it will >> honor the new coordinates. > > Thanks, but I still failed to get this new pdb. > > File -- Save molecular --> > > I wish the present coordinate will be saved as a new pdb after rotation. > > sorry. > >> >> If you want an exact rotation/translation you can use either the >> rotate command (see "help rotate") or the matrix_copy command if you >> know the transformation matrix to use. >> >> Cheers, >> >> -- Jason >> >> >> >> >> On Mon, Jul 18, 2011 at 10:49 PM, lina <lin...@gm...> wrote: >>> Hi, >>> >>> I don't know how to save a NEW.pdb which based on the old one but with >>> different coordinate, >>> do I need reset the axis? >>> >>> I loaded a pdb, after rotate it to an ideal position, at this >>> situation, I wish the Z-dimension is perpedicular to its this surface >>> (mainly screen), but fact is that the Z-dimension is other place. >>> >>> Thanks for any advice, >>> >>> -- >>> Best Regards, >>> >>> lina >>> >>> ------------------------------------------------------------------------------ >>> Magic Quadrant for Content-Aware Data Loss Prevention >>> Research study explores the data loss prevention market. Includes in-depth >>> analysis on the changes within the DLP market, and the criteria used to >>> evaluate the strengths and weaknesses of these DLP solutions. >>> http://www.accelacomm.com/jaw/sfnl/114/51385063/ >>> _______________________________________________ >>> PyMOL-users mailing list (PyM...@li...) >>> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users >>> Archives: http://www.mail-archive.com/pym...@li... >>> >> >> >> >> -- >> Jason Vertrees, PhD >> PyMOL Product Manager >> Schrodinger, LLC >> >> (e) Jas...@sc... >> (o) +1 (603) 374-7120 >> > > > > -- > Best Regards, > > lina > -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) Jas...@sc... (o) +1 (603) 374-7120 |
From: Thomas H. <sp...@us...> - 2011-07-20 09:21:43
|
> Thanks, but I still failed to get this new pdb. > > File -- Save molecular --> > > I wish the present coordinate will be saved as a new pdb after rotation. I guess with present coordinate you mean what you see on screen. To get this you need to transform the atom coordinates by current camera orientation before saving to file. This python code will do that: def transform_by_camera_rotation(): view = list(cmd.get_view()) M = view[0:3] + [-view[12]] + \ view[3:6] + [-view[13]] + \ view[6:9] + [-view[14]] + \ view[12:15] + [1.] cmd.transform_selection('(all)', M, transpose=1) cmd.set_view([1,0,0,0,1,0,0,0,1] + view[9:]) cmd.extend('transform_by_camera_rotation', transform_by_camera_rotation) Example: fetch 2xwu orient transform_by_camera_rotation save /tmp/withneworientation.pdb Cheers, Thomas -- Thomas Holder MPI for Developmental Biology Spemannstr. 35 D-72076 Tübingen |
From: lina <lin...@gm...> - 2011-07-20 13:53:38
|
On Wed, Jul 20, 2011 at 5:21 PM, Thomas Holder <sp...@us...> wrote: >> Thanks, but I still failed to get this new pdb. >> >> File -- Save molecular --> >> >> I wish the present coordinate will be saved as a new pdb after rotation. > > I guess with present coordinate you mean what you see on screen. To get this > you need to transform the atom coordinates by current camera orientation > before saving to file. > > This python code will do that: > > def transform_by_camera_rotation(): > view = list(cmd.get_view()) > M = view[0:3] + [-view[12]] + \ > view[3:6] + [-view[13]] + \ > view[6:9] + [-view[14]] + \ > view[12:15] + [1.] > cmd.transform_selection('(all)', M, transpose=1) > cmd.set_view([1,0,0,0,1,0,0,0,1] + view[9:]) > cmd.extend('transform_by_camera_rotation', transform_by_camera_rotation) Thanks first, but here comes another question, once I touched a transform_by_camera_rotation.py and copy those inside it as following, $ more transform_by_camera_rotation.py #/usr/bin/python def transform_by_camera_rotation(): view = list(cmd.get_view()) M = view[0:3] + [-view[12]] + \ view[3:6] + [-view[13]] + \ view[6:9] + [-view[14]] + \ view[12:15] + [1.] cmd.transform_selection('(all)', M, transpose=1) cmd.set_view([1,0,0,0,1,0,0,0,1] + view[9:]) cmd.extend('transform_by_camera_rotation', transform_by_camera_rotation) > > Example: > > fetch 2xwu > orient > transform_by_camera_rotation PyMOL>transform_by_camera_rotation Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/pymol/parser.py", line 464, in parse exec(layer.com2+"\n",self.pymol_names,self.pymol_names) File "<string>", line 1, in <module> NameError: name 'transform_by_camera_rotation' is not defined I don't know how achieve this part. Thanks again with best regards, > save /tmp/withneworientation.pdb > > Cheers, > Thomas > > -- > Thomas Holder > MPI for Developmental Biology > Spemannstr. 35 > D-72076 Tübingen > |
From: Thomas H. <sp...@us...> - 2011-07-20 17:22:09
|
Hi Lina, >> transform_by_camera_rotation > > PyMOL>transform_by_camera_rotation > Traceback (most recent call last): > File "/usr/local/lib/python2.6/dist-packages/pymol/parser.py", line > 464, in parse > exec(layer.com2+"\n",self.pymol_names,self.pymol_names) > File "<string>", line 1, in <module> > NameError: name 'transform_by_camera_rotation' is not defined > > I don't know how achieve this part. Thanks again with best regards, sorry for not making this clear. You will find in the menu "File > Run..." to run python scripts. Or type into the command line: run transform_by_camera_rotation.py After that, PyMOL knows the transform_by_camera_rotation command. For more details see: http://pymolwiki.org/index.php/Run http://pymolwiki.org/index.php/Running_Scripts Cheers, Thomas -- Thomas Holder MPI for Developmental Biology Spemannstr. 35 D-72076 Tübingen |
From: lina <lin...@gm...> - 2011-07-22 10:55:59
|
On Thu, Jul 21, 2011 at 1:21 AM, Thomas Holder <sp...@us...> wrote: > Hi Lina, > >>> transform_by_camera_rotation >> >> PyMOL>transform_by_camera_rotation >> Traceback (most recent call last): >> File "/usr/local/lib/python2.6/dist-packages/pymol/parser.py", line >> 464, in parse >> exec(layer.com2+"\n",self.pymol_names,self.pymol_names) >> File "<string>", line 1, in <module> >> NameError: name 'transform_by_camera_rotation' is not defined >> >> I don't know how achieve this part. Thanks again with best regards, > > sorry for not making this clear. You will find in the menu "File > Run..." > to run python scripts. Or type into the command line: > > run transform_by_camera_rotation.py > > After that, PyMOL knows the transform_by_camera_rotation command. > > For more details see: > http://pymolwiki.org/index.php/Run > http://pymolwiki.org/index.php/Running_Scripts Thanks very much for your advice, but I don't know which part is wrong, the new saved one is not the ideal one I wanted, which was supposed to be the one I saw from screen. do I need to modify the transfrom_by_camera_rotation scrips a bit. actually I don't get it very well. Thanks again, > > Cheers, > Thomas > > -- > Thomas Holder > MPI for Developmental Biology > Spemannstr. 35 > D-72076 Tübingen > -- Best Regards, lina |
From: Thomas H. <sp...@us...> - 2011-07-24 17:27:44
|
Hi lina, lina wrote, On 07/22/11 12:55: > Thanks very much for your advice, but I don't know which part is wrong, > the new saved one is not the ideal one I wanted, which was supposed to > be the one I saw from screen. > > do I need to modify the transfrom_by_camera_rotation scrips a bit. > actually I don't get it very well. looks like I confused you, I'm sorry for that. No, you don't need to modify the script. The script defines a new command, so you first need to run the script, and then call the command, otherwise nothing will happen actually. run transform_by_camera_rotation.py # run the script transform_by_camera_rotation # call the new command save /tmp/withneworientation.pdb # save the file Is that clear? Cheers, Thomas -- Thomas Holder MPI for Developmental Biology Spemannstr. 35 D-72076 Tübingen |
From: lina <lin...@gm...> - 2011-07-25 03:14:47
|
On Mon, Jul 25, 2011 at 1:27 AM, Thomas Holder <sp...@us...> wrote: > Hi lina, > > lina wrote, On 07/22/11 12:55: >> >> Thanks very much for your advice, but I don't know which part is wrong, >> the new saved one is not the ideal one I wanted, which was supposed to >> be the one I saw from screen. >> >> do I need to modify the transfrom_by_camera_rotation scrips a bit. >> actually I don't get it very well. > > looks like I confused you, I'm sorry for that. No, you don't need to modify > the script. The script defines a new command, so you first need to run the > script, and then call the command, otherwise nothing will happen actually. > > run transform_by_camera_rotation.py # run the script > transform_by_camera_rotation # call the new command Last time I forget calling the new command, It works very well. Thanks with best regards, lina > save /tmp/withneworientation.pdb # save the file > > Is that clear? > > Cheers, > Thomas > > -- > Thomas Holder > MPI for Developmental Biology > Spemannstr. 35 > D-72076 Tübingen > |