You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(13) |
Nov
(22) |
Dec
(35) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(33) |
Feb
(46) |
Mar
(56) |
Apr
(29) |
May
(56) |
Jun
(30) |
Jul
(64) |
Aug
(54) |
Sep
(86) |
Oct
(106) |
Nov
(50) |
Dec
(67) |
2003 |
Jan
(78) |
Feb
(98) |
Mar
(51) |
Apr
(95) |
May
(53) |
Jun
(103) |
Jul
(93) |
Aug
(64) |
Sep
(87) |
Oct
(93) |
Nov
(78) |
Dec
(86) |
2004 |
Jan
(83) |
Feb
(90) |
Mar
(64) |
Apr
(112) |
May
(103) |
Jun
(57) |
Jul
(101) |
Aug
(84) |
Sep
(92) |
Oct
(96) |
Nov
(86) |
Dec
(32) |
2005 |
Jan
(88) |
Feb
(108) |
Mar
(111) |
Apr
(107) |
May
(120) |
Jun
(134) |
Jul
(143) |
Aug
(129) |
Sep
(75) |
Oct
(171) |
Nov
(125) |
Dec
(65) |
2006 |
Jan
(95) |
Feb
(105) |
Mar
(114) |
Apr
(124) |
May
(87) |
Jun
(66) |
Jul
(88) |
Aug
(65) |
Sep
(71) |
Oct
(92) |
Nov
(94) |
Dec
(60) |
2007 |
Jan
(81) |
Feb
(84) |
Mar
(82) |
Apr
(68) |
May
(58) |
Jun
(80) |
Jul
(30) |
Aug
(47) |
Sep
(68) |
Oct
(92) |
Nov
(59) |
Dec
(17) |
2008 |
Jan
(69) |
Feb
(81) |
Mar
(60) |
Apr
(34) |
May
(47) |
Jun
(65) |
Jul
(46) |
Aug
(49) |
Sep
(84) |
Oct
(43) |
Nov
(33) |
Dec
(30) |
2009 |
Jan
(62) |
Feb
(48) |
Mar
(123) |
Apr
(73) |
May
(72) |
Jun
(69) |
Jul
(78) |
Aug
(72) |
Sep
(99) |
Oct
(82) |
Nov
(70) |
Dec
(53) |
2010 |
Jan
(112) |
Feb
(95) |
Mar
(127) |
Apr
(110) |
May
(135) |
Jun
(91) |
Jul
(91) |
Aug
(79) |
Sep
(136) |
Oct
(63) |
Nov
(38) |
Dec
(64) |
2011 |
Jan
(59) |
Feb
(109) |
Mar
(191) |
Apr
(130) |
May
(94) |
Jun
(90) |
Jul
(89) |
Aug
(127) |
Sep
(135) |
Oct
(113) |
Nov
(136) |
Dec
(140) |
2012 |
Jan
(158) |
Feb
(131) |
Mar
(151) |
Apr
(88) |
May
(121) |
Jun
(85) |
Jul
(82) |
Aug
(56) |
Sep
(55) |
Oct
(125) |
Nov
(87) |
Dec
(65) |
2013 |
Jan
(81) |
Feb
(64) |
Mar
(90) |
Apr
(77) |
May
(80) |
Jun
(92) |
Jul
(92) |
Aug
(70) |
Sep
(69) |
Oct
(60) |
Nov
(99) |
Dec
(50) |
2014 |
Jan
(89) |
Feb
(66) |
Mar
(52) |
Apr
(70) |
May
(68) |
Jun
(44) |
Jul
(68) |
Aug
(81) |
Sep
(152) |
Oct
(106) |
Nov
(74) |
Dec
(57) |
2015 |
Jan
(93) |
Feb
(48) |
Mar
(60) |
Apr
(107) |
May
(82) |
Jun
(64) |
Jul
(74) |
Aug
(38) |
Sep
(49) |
Oct
(99) |
Nov
(105) |
Dec
(51) |
2016 |
Jan
(68) |
Feb
(87) |
Mar
(55) |
Apr
(90) |
May
(68) |
Jun
(25) |
Jul
(25) |
Aug
(41) |
Sep
(35) |
Oct
(55) |
Nov
(24) |
Dec
(26) |
2017 |
Jan
(59) |
Feb
(49) |
Mar
(24) |
Apr
(50) |
May
(45) |
Jun
(63) |
Jul
(36) |
Aug
(26) |
Sep
(22) |
Oct
(23) |
Nov
(26) |
Dec
(29) |
2018 |
Jan
(17) |
Feb
(21) |
Mar
(30) |
Apr
(34) |
May
(24) |
Jun
(47) |
Jul
(65) |
Aug
(30) |
Sep
(24) |
Oct
(52) |
Nov
(21) |
Dec
(17) |
2019 |
Jan
(9) |
Feb
(39) |
Mar
(32) |
Apr
(22) |
May
(30) |
Jun
(69) |
Jul
(40) |
Aug
(48) |
Sep
(17) |
Oct
(26) |
Nov
(30) |
Dec
(19) |
2020 |
Jan
(32) |
Feb
(26) |
Mar
(16) |
Apr
(34) |
May
(50) |
Jun
(87) |
Jul
(51) |
Aug
(23) |
Sep
(25) |
Oct
(48) |
Nov
(32) |
Dec
(6) |
2021 |
Jan
(12) |
Feb
(31) |
Mar
(15) |
Apr
(31) |
May
(13) |
Jun
(13) |
Jul
(24) |
Aug
(9) |
Sep
(11) |
Oct
(28) |
Nov
(26) |
Dec
(25) |
2022 |
Jan
(47) |
Feb
(22) |
Mar
(22) |
Apr
(12) |
May
(4) |
Jun
(26) |
Jul
(17) |
Aug
(2) |
Sep
(13) |
Oct
(6) |
Nov
(13) |
Dec
(4) |
2023 |
Jan
(7) |
Feb
(6) |
Mar
(13) |
Apr
(2) |
May
(25) |
Jun
(13) |
Jul
(12) |
Aug
(10) |
Sep
(5) |
Oct
(13) |
Nov
(19) |
Dec
(7) |
2024 |
Jan
(3) |
Feb
(12) |
Mar
(1) |
Apr
(13) |
May
(11) |
Jun
|
Jul
(20) |
Aug
(4) |
Sep
(4) |
Oct
(5) |
Nov
(4) |
Dec
(6) |
2025 |
Jan
(16) |
Feb
(8) |
Mar
(10) |
Apr
(6) |
May
(13) |
Jun
(7) |
Jul
(4) |
Aug
(1) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
|
|
|
|
|
1
|
2
|
3
(3) |
4
(2) |
5
(3) |
6
(6) |
7
(1) |
8
|
9
|
10
|
11
(1) |
12
(1) |
13
(3) |
14
(2) |
15
(2) |
16
(1) |
17
(1) |
18
|
19
|
20
|
21
|
22
|
23
(3) |
24
(9) |
25
(17) |
26
(11) |
27
(3) |
28
|
29
|
30
|
|
|
|
|
|
|
From: James S. <jms...@gm...> - 2019-06-27 13:49:59
|
update: for the realisation I have tried to use sep_state script with python version so I modified sep_state adding superimposition # pymol_save.py# from pymol import cmd import glob import re def save_sep(prefix=''): obj_list = cmd.get_names("public_objects") if obj_list: for i in range(len(obj_list)): obj_name = "%s%s.pdb" % (prefix, obj_list[i]) cmd.save(obj_name, obj_list[i]) print "Saving %s" % obj_name else: print "No objects found" cmd.extra_fit('name CA', '*', 'super') cmd.extend('save_sep', save_sep) and use it with my pdbs pymol ${output}/*.pdb -ckqr pymol_save.py > ${output}/!temp/rmsf_fit.log it align ensemble but did not save the resulted pdbs in separate files. Finally, the same happenes when I open it in Pymol GUI pymol-2.2.0 *.pdb pymol_save.py remarkably when I use in this GUI session just a command 'save_sep' it saves the files within the same directory (Which is ok!) however cmd.extend('prefix', save_sep)does not work :( чт, 27 июн. 2019 г. в 11:48, James Starlight <jms...@gm...>: > > Dear Pymol users! > > I have a folder with many pdb files. I would like to use pymol in > no-gui mode in order to i)load all pdb within the pymol; ii) > superimpose each pdb agains the first (top) pdb; iii) save sperimposed > pdbs into the new folder under the SAME names of pdbs. > > Here is model of my script, which should be modified according to the > indicated commentaries (mostly on the step of saving results). > > ${pymol} -c -d " > from pymol import cmd > # we open at once all pdbs which have "B-factors" suffix in its name! > cmd.load('${output}/!temp/B-factors*') > # it do almost what I want in terms of the superimposition, however > not all snapshots are aligned properly > cmd.extra_fit('name CA', '*', 'super') > # here the most tricky part that should be modified since I need to > save snapshots using some command keeping its original names! > cmd.save('output' + '.pdb') > " > > so the task is that I would like to use it in one command rather then > to put inside the loop (e.g. opening 2 snapshots for each time to make > mobile, reference superimposition, which is more easy way). > > Thank you in advance! > James |
From: James S. <jms...@gm...> - 2019-06-27 09:48:32
|
Dear Pymol users! I have a folder with many pdb files. I would like to use pymol in no-gui mode in order to i)load all pdb within the pymol; ii) superimpose each pdb agains the first (top) pdb; iii) save sperimposed pdbs into the new folder under the SAME names of pdbs. Here is model of my script, which should be modified according to the indicated commentaries (mostly on the step of saving results). ${pymol} -c -d " from pymol import cmd # we open at once all pdbs which have "B-factors" suffix in its name! cmd.load('${output}/!temp/B-factors*') # it do almost what I want in terms of the superimposition, however not all snapshots are aligned properly cmd.extra_fit('name CA', '*', 'super') # here the most tricky part that should be modified since I need to save snapshots using some command keeping its original names! cmd.save('output' + '.pdb') " so the task is that I would like to use it in one command rather then to put inside the loop (e.g. opening 2 snapshots for each time to make mobile, reference superimposition, which is more easy way). Thank you in advance! James |
From: brisvag <br...@gm...> - 2019-06-27 07:53:10
|
Hi Thomas, I see! Is it supposed to work with other formats too? Or at least, is it planned to be expanded? I'm trying to switch to PyMOL to view GROMACS `.xtc` trajectories, and this feature would be a great addition. Cheers, Lorenzo |
From: Thomas H. <tho...@sc...> - 2019-06-26 18:12:01
|
Hi Lorenzo, You are correct, it's doing nothing for most trajectory formats. Only the implementation for AMBER .trj files uses it. It looks like it allows selecting a subset of atoms. Cheers, Thomas > On Jun 25, 2019, at 4:05 PM, Lorenzo Gaifas <br...@gm...> wrote: > > Dear pymol users, > > What is the purpose of the `selection` argument in the `load_traj` command? > > My intuition would say that it allows to somehow select which atoms to load into pymol before the actual loading happens. However, it seems to do nothing whatsoever. What am I missing? > > Thanks, > Lorenzo > _______________________________________________ > PyMOL-users mailing list > Archives: http://www.mail-archive.com/pym...@li... > Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. |
From: Sarameri, J. <jes...@he...> - 2019-06-26 12:17:44
|
Hello, That might also explain why the same molecule loaded in LiteMol gives different colouring. So the conclusion is that the colors are not defined in molecules but instead in programs that displays them. Thank you! Regards, Jesse Sarameri ________________________________ Lähettäjä: Ali Kusay <aku...@un...> Lähetetty: tiistai 25. kesäkuuta 2019 20.52.33 Vastaanottaja: Sarameri, Jesse Kopio: pym...@li... Aihe: Re: [PyMOL] Export molecule does not keep changes Hi Jesse, I am not aware of a structure file (i.e. PDB) which can store information such as color and thus when you load a PDB file pymol applies the default colors to it. You can however make it so that all proteins loaded into pymol are automatically assigned the grey colour, this is done by editing the pymolrc. In the menu go: File -> Edit -> pymolrc (will create file) -> type “set cartoon_color, grey80” When you close and reopen pymol, this will ensure that all proteins loaded into pymol are given the grey80 colour, you can make any additional edits to the pymolrc file as you please i.e stick color is still default Cheers, Ali Ali Kusay | BPharm (Hons) | PhD Candidate & Pharmacist Supervised by A/Prof Thomas Balle The University of Sydney School of Pharmacy | Faculty of Medicine and Health 424, Brain and Mind Centre | The University of Sydney | NSW 2050 From: "Sarameri, Jesse" <jes...@he...> Date: Wednesday, 26 June 2019 at 6:34 pm To: "pym...@li..." <pym...@li...> Subject: [PyMOL] Export molecule does not keep changes Hello! (English is not my native language; please excuse typing errors.) Goal is to recolor molecule so it stays that way after the edit. This is how I thought it would work: Lets start by opening any molecule (like downloading 5jh0.cif from https://www.rcsb.org/structure/5jh0) Changed the color of the molecule to grey, save as session (.pse file), open it and still grey, great! But if I want to export to molecule (.pdb for example), open the molecule, no changes applied. Tried to change Saved state settings and different formats but no effect. No error messages either. I did RTFM and STFW not able to find answer. (If I missed it, feel free to send pics with red circles and arrows to highlight it.) Software and hardware used: Open source PyMOL version 2.1.0. Windows 10 Lenovo X280 Laptop Many thanks for help incase someone else might encounter this problem. Regards, Jesse Sarameri |
From: koji n. <pas...@gm...> - 2019-06-26 10:07:22
|
Mr. Thomas Holder, Many thanks for your help. I can manage it. Best regards, Koji 2019年6月26日(水) 18:56 Thomas Holder <tho...@sc...>: > Hi Koji, > > Yes it is my understanding that sphere_scale 1.1932 would correspond to > 30% probability. > > Cheers, > Thomas > > > On Jun 25, 2019, at 12:26 PM, koji naka <pas...@gm...> wrote: > > > > Dear Mr. Thomas Holder, > > > > Thank you very much for your kind reply. > > I am very happy to know the scale factor for the 50% probability, but I > don't understand well. > > From the table, can I take a value the scale? For example, in case of > 30% probability, is it ok to set " set sphere_scale, 1.1932"? or not? > > > > I am sorry for bothering you again. > > > > Best regards, > > Koji > > > > 2019年6月25日(火) 18:49 Thomas Holder <tho...@sc...>: > > Hi Koji, > > > > Interesting question, I wasn't aware of the ellipsoid_probability > setting. > > > > The probability to radius conversion is done with a lookup table, see: > > > https://github.com/schrodinger/pymol-open-source/blob/d1359f125d/layer2/RepEllipsoid.cpp#L114 > > > > To get sphere scaling equivalent of ellipsoid_probability=0.5, you can > do: > > > > set sphere_scale, 1.53820 > > > > I calculated this value with the following script: > > > > problevel = [ \ > > 0.4299, 0.5479, 0.6334, 0.7035, 0.7644, \ > > 0.8192, 0.8694, 0.9162, 0.9605, 1.0026, \ > > 1.0430, 1.0821, 1.1200, 1.1570, 1.1932, \ > > 1.2288, 1.2638, 1.2985, 1.3330, 1.3672, \ > > 1.4013, 1.4354, 1.4695, 1.5037, 1.5382, \ > > 1.5729, 1.6080, 1.6436, 1.6797, 1.7164, \ > > 1.7540, 1.7924, 1.8318, 1.8724, 1.9144, \ > > 1.9580, 2.0034, 2.0510, 2.1012, 2.1544, \ > > 2.2114, 2.2730, 2.3404, 2.4153, 2.5003, \ > > 2.5997, 2.7216, 2.8829, 3.1365, 6.0000 ] > > > > iprob = int((cmd.get_setting_float('ellipsoid_probability') + 0.01) * 50 > - 1) > > pradius = problevel[iprob] > > > > cmd.set('sphere_scale', pradius * > cmd.get_setting_float('ellipsoid_scale')) > > > > Hope this helps. > > > > Cheers, > > Thomas > > > > > > > On Jun 24, 2019, at 7:21 AM, koji naka <pas...@gm...> wrote: > > > > > > Dear all, > > > > > > The size of isotropic atoms plotted by using "alter all, vdw = > sqrt(b/8)/pi" and "show sphere" looks small compared with the size of > anisotropic atoms displayed by "show ellipsoid" in PyMOL default setting > with 50% probability. > > > > > > How can I plot the isotropic atoms with 50% probability? > > > > > > The data is a pdb file converted from a cif through Mercury software. > > > > > > Thank you very much for your help. > > > > > > Best regards, > > > Koji > > > > > > > > > _______________________________________________ > > > PyMOL-users mailing list > > > Archives: > http://www.mail-archive.com/pym...@li... > > > Unsubscribe: > https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe > > > > -- > > Thomas Holder > > PyMOL Principal Developer > > Schrödinger, Inc. > > > > -- > Thomas Holder > PyMOL Principal Developer > Schrödinger, Inc. > > |
From: Thomas H. <tho...@sc...> - 2019-06-26 09:56:13
|
Hi Koji, Yes it is my understanding that sphere_scale 1.1932 would correspond to 30% probability. Cheers, Thomas > On Jun 25, 2019, at 12:26 PM, koji naka <pas...@gm...> wrote: > > Dear Mr. Thomas Holder, > > Thank you very much for your kind reply. > I am very happy to know the scale factor for the 50% probability, but I don't understand well. > From the table, can I take a value the scale? For example, in case of 30% probability, is it ok to set " set sphere_scale, 1.1932"? or not? > > I am sorry for bothering you again. > > Best regards, > Koji > > 2019年6月25日(火) 18:49 Thomas Holder <tho...@sc...>: > Hi Koji, > > Interesting question, I wasn't aware of the ellipsoid_probability setting. > > The probability to radius conversion is done with a lookup table, see: > https://github.com/schrodinger/pymol-open-source/blob/d1359f125d/layer2/RepEllipsoid.cpp#L114 > > To get sphere scaling equivalent of ellipsoid_probability=0.5, you can do: > > set sphere_scale, 1.53820 > > I calculated this value with the following script: > > problevel = [ \ > 0.4299, 0.5479, 0.6334, 0.7035, 0.7644, \ > 0.8192, 0.8694, 0.9162, 0.9605, 1.0026, \ > 1.0430, 1.0821, 1.1200, 1.1570, 1.1932, \ > 1.2288, 1.2638, 1.2985, 1.3330, 1.3672, \ > 1.4013, 1.4354, 1.4695, 1.5037, 1.5382, \ > 1.5729, 1.6080, 1.6436, 1.6797, 1.7164, \ > 1.7540, 1.7924, 1.8318, 1.8724, 1.9144, \ > 1.9580, 2.0034, 2.0510, 2.1012, 2.1544, \ > 2.2114, 2.2730, 2.3404, 2.4153, 2.5003, \ > 2.5997, 2.7216, 2.8829, 3.1365, 6.0000 ] > > iprob = int((cmd.get_setting_float('ellipsoid_probability') + 0.01) * 50 - 1) > pradius = problevel[iprob] > > cmd.set('sphere_scale', pradius * cmd.get_setting_float('ellipsoid_scale')) > > Hope this helps. > > Cheers, > Thomas > > > > On Jun 24, 2019, at 7:21 AM, koji naka <pas...@gm...> wrote: > > > > Dear all, > > > > The size of isotropic atoms plotted by using "alter all, vdw = sqrt(b/8)/pi" and "show sphere" looks small compared with the size of anisotropic atoms displayed by "show ellipsoid" in PyMOL default setting with 50% probability. > > > > How can I plot the isotropic atoms with 50% probability? > > > > The data is a pdb file converted from a cif through Mercury software. > > > > Thank you very much for your help. > > > > Best regards, > > Koji > > > > > > _______________________________________________ > > PyMOL-users mailing list > > Archives: http://www.mail-archive.com/pym...@li... > > Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe > > -- > Thomas Holder > PyMOL Principal Developer > Schrödinger, Inc. > -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. |
From: James S. <jms...@gm...> - 2019-06-26 09:27:46
|
OK, with latest pymol this works fine set cartoon_transparency, 0.5, object this does not work set cartoon_transparency, 0.5, ss H+S how I can select for example all of the objects in the current session + ss H+S ? ср, 26 июн. 2019 г. в 11:13, Thomas Holder <tho...@sc...>: > > Hi James and Ali, > > Are you using PyMOL 2.3 yet? > > "As of PyMOL version 2.3, cartoon transparency is now an atom-level setting." > > https://pymolwiki.org/index.php/Cartoon_transparency > > Cheers, > Thomas > > > On Jun 26, 2019, at 10:26 AM, Ali Kusay <aku...@un...> wrote: > > > > Hi James, > > > > I am not sure what the exact cause of your issue is but I think if you make a selection first then apply the transparency to the selection that should work, i.e.: > > > > sele ss H+S > > set cartoon_transparency, 0.5, sele > > > > Something to do with selection based transparency settings not enabling newer ones to be made > > > > Cheers, > > > > Ali > > > > On 26/6/19, 6:18 pm, "James Starlight" <jms...@gm...> wrote: > > > > Dear pymol users! > > > > I am trying to set transparency based on the secondary structure using > > pymol selection algebra > > > > # set transparency to all helix and sheets but not loops > > set cartoon_transparency, 0.5, ss H+S > > > > which produce the following output > > PyMOL>set cartoon_transparency, 0.5, ss H+S > > Setting: cartoon_transparency set for 144 atoms in object "0190_before_minim". > > > > but actually do nothing in terms of visualization. > > > > Could you suggest me how it would be possible to fix it? > > > > Thanks in advance! > > > > > > _______________________________________________ > > PyMOL-users mailing list > > Archives: http://www.mail-archive.com/pym...@li... > > Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe > > > > > > > > _______________________________________________ > > PyMOL-users mailing list > > Archives: http://www.mail-archive.com/pym...@li... > > Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe > > -- > Thomas Holder > PyMOL Principal Developer > Schrödinger, Inc. > |
From: Thomas H. <tho...@sc...> - 2019-06-26 09:13:10
|
Hi James and Ali, Are you using PyMOL 2.3 yet? "As of PyMOL version 2.3, cartoon transparency is now an atom-level setting." https://pymolwiki.org/index.php/Cartoon_transparency Cheers, Thomas > On Jun 26, 2019, at 10:26 AM, Ali Kusay <aku...@un...> wrote: > > Hi James, > > I am not sure what the exact cause of your issue is but I think if you make a selection first then apply the transparency to the selection that should work, i.e.: > > sele ss H+S > set cartoon_transparency, 0.5, sele > > Something to do with selection based transparency settings not enabling newer ones to be made > > Cheers, > > Ali > > On 26/6/19, 6:18 pm, "James Starlight" <jms...@gm...> wrote: > > Dear pymol users! > > I am trying to set transparency based on the secondary structure using > pymol selection algebra > > # set transparency to all helix and sheets but not loops > set cartoon_transparency, 0.5, ss H+S > > which produce the following output > PyMOL>set cartoon_transparency, 0.5, ss H+S > Setting: cartoon_transparency set for 144 atoms in object "0190_before_minim". > > but actually do nothing in terms of visualization. > > Could you suggest me how it would be possible to fix it? > > Thanks in advance! > > > _______________________________________________ > PyMOL-users mailing list > Archives: http://www.mail-archive.com/pym...@li... > Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe > > > > _______________________________________________ > PyMOL-users mailing list > Archives: http://www.mail-archive.com/pym...@li... > Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. |
From: Ali K. <aku...@un...> - 2019-06-26 08:52:37
|
Hi Jesse, I am not aware of a structure file (i.e. PDB) which can store information such as color and thus when you load a PDB file pymol applies the default colors to it. You can however make it so that all proteins loaded into pymol are automatically assigned the grey colour, this is done by editing the pymolrc. In the menu go: File -> Edit -> pymolrc (will create file) -> type “set cartoon_color, grey80” When you close and reopen pymol, this will ensure that all proteins loaded into pymol are given the grey80 colour, you can make any additional edits to the pymolrc file as you please i.e stick color is still default Cheers, Ali Ali Kusay | BPharm (Hons) | PhD Candidate & Pharmacist Supervised by A/Prof Thomas Balle The University of Sydney School of Pharmacy | Faculty of Medicine and Health 424, Brain and Mind Centre | The University of Sydney | NSW 2050 From: "Sarameri, Jesse" <jes...@he...> Date: Wednesday, 26 June 2019 at 6:34 pm To: "pym...@li..." <pym...@li...> Subject: [PyMOL] Export molecule does not keep changes Hello! (English is not my native language; please excuse typing errors.) Goal is to recolor molecule so it stays that way after the edit. This is how I thought it would work: Lets start by opening any molecule (like downloading 5jh0.cif from https://www.rcsb.org/structure/5jh0) Changed the color of the molecule to grey, save as session (.pse file), open it and still grey, great! But if I want to export to molecule (.pdb for example), open the molecule, no changes applied. Tried to change Saved state settings and different formats but no effect. No error messages either. I did RTFM and STFW not able to find answer. (If I missed it, feel free to send pics with red circles and arrows to highlight it.) Software and hardware used: Open source PyMOL version 2.1.0. Windows 10 Lenovo X280 Laptop Many thanks for help incase someone else might encounter this problem. Regards, Jesse Sarameri |
From: Ali K. <aku...@un...> - 2019-06-26 08:41:14
|
Hi James, I am not sure what the exact cause of your issue is but I think if you make a selection first then apply the transparency to the selection that should work, i.e.: sele ss H+S set cartoon_transparency, 0.5, sele Something to do with selection based transparency settings not enabling newer ones to be made Cheers, Ali On 26/6/19, 6:18 pm, "James Starlight" <jms...@gm...> wrote: Dear pymol users! I am trying to set transparency based on the secondary structure using pymol selection algebra # set transparency to all helix and sheets but not loops set cartoon_transparency, 0.5, ss H+S which produce the following output PyMOL>set cartoon_transparency, 0.5, ss H+S Setting: cartoon_transparency set for 144 atoms in object "0190_before_minim". but actually do nothing in terms of visualization. Could you suggest me how it would be possible to fix it? Thanks in advance! _______________________________________________ PyMOL-users mailing list Archives: http://www.mail-archive.com/pym...@li... Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe |
From: James S. <jms...@gm...> - 2019-06-26 08:15:18
|
Dear pymol users! I am trying to set transparency based on the secondary structure using pymol selection algebra # set transparency to all helix and sheets but not loops set cartoon_transparency, 0.5, ss H+S which produce the following output PyMOL>set cartoon_transparency, 0.5, ss H+S Setting: cartoon_transparency set for 144 atoms in object "0190_before_minim". but actually do nothing in terms of visualization. Could you suggest me how it would be possible to fix it? Thanks in advance! |
From: James S. <jms...@gm...> - 2019-06-26 06:47:00
|
Awesome, thanks so much Jared for your usefull suggestions! all the best james вт, 25 июн. 2019 г. в 22:00, Jared Sampson <jar...@co...>: > > Hi James - Glad you got it working. > > > chains_array = ["A", "B"] > > If you want a list of chains without having to hard-code them, try the `get_chains` command. > > ``` > chains_array = cmd.get_chains() > ``` > > > cmd.load('${pdb}') > > cmd.alter('chain ' + '+'.join(chains_array), 'chain=\"\"') > > Alternatively, if you want to remove all the chain IDs (which it appears you might), you don't need a list of chains at all, and can just do: > > ``` > alter all, chain='' > ``` > > Hope that helps. > > Cheers, > Jared > > > On June 25, 2019 at 11:48:32 AM, James Starlight (jms...@gm...) wrote: > > I have got it, it works now! > in my example the double quotes were not escaped in pymol script :-) > > the only (more python-oriented) question, would it be possible to > indicate chains_array for all letters A-Z (e.g. using some python > regex, rather just for A and B, chains_array = ["A", "B"], like in my > example? > > > вт, 25 июн. 2019 г. в 17:22, James Starlight <jms...@gm...>: > > > > I actually tried to do like that still defining chains_array = ["A", > > "B"] inside of pymol script and use external bash loop to loop over > > pdbs > > but it does not works ;( > > > > #!/bin/bash > > # this script rename chains in pdb to "empty" chain > > home=$(pwd) > > pdb_folder=$home/pdbs > > output=$home/output > > rm -r $output > > mkdir $output > > > > #pymol -cQkd " > > for pdb in "${pdb_folder}"/*.pdb ; do > > pdb_name2=$(basename "${pdb}") > > pdb_name="${pdb_name2/pdb}" > > pymol -c -d " > > from pymol import cmd > > chains_array = ["A", "B"] > > cmd.load('${pdb}') > > cmd.alter('chain ' + '+'.join(chains_array), 'chain=\"\"') > > cmd.set('pdb_use_ter_records', 1) > > cmd.set('retain_order', 1) > > cmd.save('${output}/output_without'+"".join(chains_array) + '.pdb') > > " > $output/pymol_${pdb_name}.log > > done > > > > вт, 25 июн. 2019 г. в 16:58, James Starlight <jms...@gm...>: > > > > > > yes, actually it is better because we avoid looping! > > > and how it would be possible to use array provided in the externall shell? > > > > > > #!/bin/bash > > > pdb="final.pdb" > > > output=$(pwd) > > > > > > # array given in bash > > > chains_array=('A' 'B') > > > > > > # chains are cutted by pymol > > > pymol -c -d " > > > cmd.load('${pdb}') > > > cmd.alter('chain ' + '+'.join($chains_array), 'chain=\"\"') > > > cmd.set('pdb_use_ter_records', 1) > > > cmd.set('retain_order', 1) > > > cmd.save('output_without'+"".join($chains_array) + '.pdb') > > > " > > > > > > вт, 25 июн. 2019 г. в 16:47, Thomas Holder <tho...@sc...>: > > > > > > > > If you want to rename multiple chains at once, make a selection like (chain A+B+C). This list selection syntax is documented here: https://pymolwiki.org/index.php/Property_Selectors > > > > > > > > cmd.load(pdb) > > > > cmd.alter('chain ' + '+'.join(chains_array), 'chain=""') > > > > cmd.save('output.pdb') > > > > > > > > Cheers, > > > > Thomas > > > > > > > > > > > > > On Jun 25, 2019, at 4:14 PM, James Starlight <jms...@gm...> wrote: > > > > > > > > > > thanks so much Thomas, for this example! > > > > > > > > > > Actually, your python script does exactly what my bash script - > > > > > produces number of pdbs for each of the renamed chain. > > > > > I would like rather to produce at the end ONE pdb with all chains > > > > > renamed to empty chain... > > > > > I guess I need to save the result outside of the loop something like this > > > > > > > > > > ################ hop hey lalaley ##### > > > > > from pymol import cmd > > > > > pdb = "Ev_complex_model_final.pdb" > > > > > chains_array = ["A", "B"] # add more chains in case of more complex pdb > > > > > > > > > > # loop over chains to rename it > > > > > for chain in chains_array: > > > > > cmd.load(pdb) > > > > > cmd.alter('chain ' + chain, 'chain=""') > > > > > cmd.delete('*') > > > > > ###################################### > > > > > > > > > > # save output as pdb > > > > > # I need to add something in the name of output indicating how much > > > > > chains have been renamed > > > > > # like output_withoutAB.pdb > > > > > cmd.save('output_' + '.pdb') > > > > > > > > > > thanks in advance for help! > > > > > > > > -- > > > > Thomas Holder > > > > PyMOL Principal Developer > > > > Schrödinger, Inc. > > > > > > > _______________________________________________ > PyMOL-users mailing list > Archives: http://www.mail-archive.com/pym...@li... > Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe |
From: Sarameri, J. <jes...@he...> - 2019-06-26 06:23:19
|
Hello! (English is not my native language; please excuse typing errors.) Goal is to recolor molecule so it stays that way after the edit. This is how I thought it would work: Lets start by opening any molecule (like downloading 5jh0.cif from https://www.rcsb.org/structure/5jh0) Changed the color of the molecule to grey, save as session (.pse file), open it and still grey, great! But if I want to export to molecule (.pdb for example), open the molecule, no changes applied. Tried to change Saved state settings and different formats but no effect. No error messages either. I did RTFM and STFW not able to find answer. (If I missed it, feel free to send pics with red circles and arrows to highlight it.) Software and hardware used: Open source PyMOL version 2.1.0. Windows 10 Lenovo X280 Laptop Many thanks for help incase someone else might encounter this problem. Regards, Jesse Sarameri |
From: Jared S. <jar...@co...> - 2019-06-25 20:00:10
|
Hi James - Glad you got it working. > chains_array = ["A", "B"] If you want a list of chains without having to hard-code them, try the `get_chains` command. ``` chains_array = cmd.get_chains() ``` > cmd.load('${pdb}') > cmd.alter('chain ' + '+'.join(chains_array), 'chain=\"\"') Alternatively, if you want to remove all the chain IDs (which it appears you might), you don't need a list of chains at all, and can just do: ``` alter all, chain='' ``` Hope that helps. Cheers, Jared On June 25, 2019 at 11:48:32 AM, James Starlight (jms...@gm...) wrote: I have got it, it works now! in my example the double quotes were not escaped in pymol script :-) the only (more python-oriented) question, would it be possible to indicate chains_array for all letters A-Z (e.g. using some python regex, rather just for A and B, chains_array = ["A", "B"], like in my example? вт, 25 июн. 2019 г. в 17:22, James Starlight <jms...@gm...>: > > I actually tried to do like that still defining chains_array = ["A", > "B"] inside of pymol script and use external bash loop to loop over > pdbs > but it does not works ;( > > #!/bin/bash > # this script rename chains in pdb to "empty" chain > home=$(pwd) > pdb_folder=$home/pdbs > output=$home/output > rm -r $output > mkdir $output > > #pymol -cQkd " > for pdb in "${pdb_folder}"/*.pdb ; do > pdb_name2=$(basename "${pdb}") > pdb_name="${pdb_name2/pdb}" > pymol -c -d " > from pymol import cmd > chains_array = ["A", "B"] > cmd.load('${pdb}') > cmd.alter('chain ' + '+'.join(chains_array), 'chain=\"\"') > cmd.set('pdb_use_ter_records', 1) > cmd.set('retain_order', 1) > cmd.save('${output}/output_without'+"".join(chains_array) + '.pdb') > " > $output/pymol_${pdb_name}.log > done > > вт, 25 июн. 2019 г. в 16:58, James Starlight <jms...@gm...>: > > > > yes, actually it is better because we avoid looping! > > and how it would be possible to use array provided in the externall shell? > > > > #!/bin/bash > > pdb="final.pdb" > > output=$(pwd) > > > > # array given in bash > > chains_array=('A' 'B') > > > > # chains are cutted by pymol > > pymol -c -d " > > cmd.load('${pdb}') > > cmd.alter('chain ' + '+'.join($chains_array), 'chain=\"\"') > > cmd.set('pdb_use_ter_records', 1) > > cmd.set('retain_order', 1) > > cmd.save('output_without'+"".join($chains_array) + '.pdb') > > " > > > > вт, 25 июн. 2019 г. в 16:47, Thomas Holder <tho...@sc...>: > > > > > > If you want to rename multiple chains at once, make a selection like (chain A+B+C). This list selection syntax is documented here: https://pymolwiki.org/index.php/Property_Selectors > > > > > > cmd.load(pdb) > > > cmd.alter('chain ' + '+'.join(chains_array), 'chain=""') > > > cmd.save('output.pdb') > > > > > > Cheers, > > > Thomas > > > > > > > > > > On Jun 25, 2019, at 4:14 PM, James Starlight <jms...@gm...> wrote: > > > > > > > > thanks so much Thomas, for this example! > > > > > > > > Actually, your python script does exactly what my bash script - > > > > produces number of pdbs for each of the renamed chain. > > > > I would like rather to produce at the end ONE pdb with all chains > > > > renamed to empty chain... > > > > I guess I need to save the result outside of the loop something like this > > > > > > > > ################ hop hey lalaley ##### > > > > from pymol import cmd > > > > pdb = "Ev_complex_model_final.pdb" > > > > chains_array = ["A", "B"] # add more chains in case of more complex pdb > > > > > > > > # loop over chains to rename it > > > > for chain in chains_array: > > > > cmd.load(pdb) > > > > cmd.alter('chain ' + chain, 'chain=""') > > > > cmd.delete('*') > > > > ###################################### > > > > > > > > # save output as pdb > > > > # I need to add something in the name of output indicating how much > > > > chains have been renamed > > > > # like output_withoutAB.pdb > > > > cmd.save('output_' + '.pdb') > > > > > > > > thanks in advance for help! > > > > > > -- > > > Thomas Holder > > > PyMOL Principal Developer > > > Schrödinger, Inc. > > > _______________________________________________ PyMOL-users mailing list Archives: http://www.mail-archive.com/pym...@li... Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe |
From: James S. <jms...@gm...> - 2019-06-25 15:46:41
|
I have got it, it works now! in my example the double quotes were not escaped in pymol script :-) the only (more python-oriented) question, would it be possible to indicate chains_array for all letters A-Z (e.g. using some python regex, rather just for A and B, chains_array = ["A", "B"], like in my example? вт, 25 июн. 2019 г. в 17:22, James Starlight <jms...@gm...>: > > I actually tried to do like that still defining chains_array = ["A", > "B"] inside of pymol script and use external bash loop to loop over > pdbs > but it does not works ;( > > #!/bin/bash > # this script rename chains in pdb to "empty" chain > home=$(pwd) > pdb_folder=$home/pdbs > output=$home/output > rm -r $output > mkdir $output > > #pymol -cQkd " > for pdb in "${pdb_folder}"/*.pdb ; do > pdb_name2=$(basename "${pdb}") > pdb_name="${pdb_name2/pdb}" > pymol -c -d " > from pymol import cmd > chains_array = ["A", "B"] > cmd.load('${pdb}') > cmd.alter('chain ' + '+'.join(chains_array), 'chain=\"\"') > cmd.set('pdb_use_ter_records', 1) > cmd.set('retain_order', 1) > cmd.save('${output}/output_without'+"".join(chains_array) + '.pdb') > " > $output/pymol_${pdb_name}.log > done > > вт, 25 июн. 2019 г. в 16:58, James Starlight <jms...@gm...>: > > > > yes, actually it is better because we avoid looping! > > and how it would be possible to use array provided in the externall shell? > > > > #!/bin/bash > > pdb="final.pdb" > > output=$(pwd) > > > > # array given in bash > > chains_array=('A' 'B') > > > > # chains are cutted by pymol > > pymol -c -d " > > cmd.load('${pdb}') > > cmd.alter('chain ' + '+'.join($chains_array), 'chain=\"\"') > > cmd.set('pdb_use_ter_records', 1) > > cmd.set('retain_order', 1) > > cmd.save('output_without'+"".join($chains_array) + '.pdb') > > " > > > > вт, 25 июн. 2019 г. в 16:47, Thomas Holder <tho...@sc...>: > > > > > > If you want to rename multiple chains at once, make a selection like (chain A+B+C). This list selection syntax is documented here: https://pymolwiki.org/index.php/Property_Selectors > > > > > > cmd.load(pdb) > > > cmd.alter('chain ' + '+'.join(chains_array), 'chain=""') > > > cmd.save('output.pdb') > > > > > > Cheers, > > > Thomas > > > > > > > > > > On Jun 25, 2019, at 4:14 PM, James Starlight <jms...@gm...> wrote: > > > > > > > > thanks so much Thomas, for this example! > > > > > > > > Actually, your python script does exactly what my bash script - > > > > produces number of pdbs for each of the renamed chain. > > > > I would like rather to produce at the end ONE pdb with all chains > > > > renamed to empty chain... > > > > I guess I need to save the result outside of the loop something like this > > > > > > > > ################ hop hey lalaley ##### > > > > from pymol import cmd > > > > pdb = "Ev_complex_model_final.pdb" > > > > chains_array = ["A", "B"] # add more chains in case of more complex pdb > > > > > > > > # loop over chains to rename it > > > > for chain in chains_array: > > > > cmd.load(pdb) > > > > cmd.alter('chain ' + chain, 'chain=""') > > > > cmd.delete('*') > > > > ###################################### > > > > > > > > # save output as pdb > > > > # I need to add something in the name of output indicating how much > > > > chains have been renamed > > > > # like output_withoutAB.pdb > > > > cmd.save('output_' + '.pdb') > > > > > > > > thanks in advance for help! > > > > > > -- > > > Thomas Holder > > > PyMOL Principal Developer > > > Schrödinger, Inc. > > > |
From: James S. <jms...@gm...> - 2019-06-25 15:22:21
|
I actually tried to do like that still defining chains_array = ["A", "B"] inside of pymol script and use external bash loop to loop over pdbs but it does not works ;( #!/bin/bash # this script rename chains in pdb to "empty" chain home=$(pwd) pdb_folder=$home/pdbs output=$home/output rm -r $output mkdir $output #pymol -cQkd " for pdb in "${pdb_folder}"/*.pdb ; do pdb_name2=$(basename "${pdb}") pdb_name="${pdb_name2/pdb}" pymol -c -d " from pymol import cmd chains_array = ["A", "B"] cmd.load('${pdb}') cmd.alter('chain ' + '+'.join(chains_array), 'chain=\"\"') cmd.set('pdb_use_ter_records', 1) cmd.set('retain_order', 1) cmd.save('${output}/output_without'+"".join(chains_array) + '.pdb') " > $output/pymol_${pdb_name}.log done вт, 25 июн. 2019 г. в 16:58, James Starlight <jms...@gm...>: > > yes, actually it is better because we avoid looping! > and how it would be possible to use array provided in the externall shell? > > #!/bin/bash > pdb="final.pdb" > output=$(pwd) > > # array given in bash > chains_array=('A' 'B') > > # chains are cutted by pymol > pymol -c -d " > cmd.load('${pdb}') > cmd.alter('chain ' + '+'.join($chains_array), 'chain=\"\"') > cmd.set('pdb_use_ter_records', 1) > cmd.set('retain_order', 1) > cmd.save('output_without'+"".join($chains_array) + '.pdb') > " > > вт, 25 июн. 2019 г. в 16:47, Thomas Holder <tho...@sc...>: > > > > If you want to rename multiple chains at once, make a selection like (chain A+B+C). This list selection syntax is documented here: https://pymolwiki.org/index.php/Property_Selectors > > > > cmd.load(pdb) > > cmd.alter('chain ' + '+'.join(chains_array), 'chain=""') > > cmd.save('output.pdb') > > > > Cheers, > > Thomas > > > > > > > On Jun 25, 2019, at 4:14 PM, James Starlight <jms...@gm...> wrote: > > > > > > thanks so much Thomas, for this example! > > > > > > Actually, your python script does exactly what my bash script - > > > produces number of pdbs for each of the renamed chain. > > > I would like rather to produce at the end ONE pdb with all chains > > > renamed to empty chain... > > > I guess I need to save the result outside of the loop something like this > > > > > > ################ hop hey lalaley ##### > > > from pymol import cmd > > > pdb = "Ev_complex_model_final.pdb" > > > chains_array = ["A", "B"] # add more chains in case of more complex pdb > > > > > > # loop over chains to rename it > > > for chain in chains_array: > > > cmd.load(pdb) > > > cmd.alter('chain ' + chain, 'chain=""') > > > cmd.delete('*') > > > ###################################### > > > > > > # save output as pdb > > > # I need to add something in the name of output indicating how much > > > chains have been renamed > > > # like output_withoutAB.pdb > > > cmd.save('output_' + '.pdb') > > > > > > thanks in advance for help! > > > > -- > > Thomas Holder > > PyMOL Principal Developer > > Schrödinger, Inc. > > |
From: James S. <jms...@gm...> - 2019-06-25 14:59:02
|
yes, actually it is better because we avoid looping! and how it would be possible to use array provided in the externall shell? #!/bin/bash pdb="final.pdb" output=$(pwd) # array given in bash chains_array=('A' 'B') # chains are cutted by pymol pymol -c -d " cmd.load('${pdb}') cmd.alter('chain ' + '+'.join($chains_array), 'chain=\"\"') cmd.set('pdb_use_ter_records', 1) cmd.set('retain_order', 1) cmd.save('output_without'+"".join($chains_array) + '.pdb') " вт, 25 июн. 2019 г. в 16:47, Thomas Holder <tho...@sc...>: > > If you want to rename multiple chains at once, make a selection like (chain A+B+C). This list selection syntax is documented here: https://pymolwiki.org/index.php/Property_Selectors > > cmd.load(pdb) > cmd.alter('chain ' + '+'.join(chains_array), 'chain=""') > cmd.save('output.pdb') > > Cheers, > Thomas > > > > On Jun 25, 2019, at 4:14 PM, James Starlight <jms...@gm...> wrote: > > > > thanks so much Thomas, for this example! > > > > Actually, your python script does exactly what my bash script - > > produces number of pdbs for each of the renamed chain. > > I would like rather to produce at the end ONE pdb with all chains > > renamed to empty chain... > > I guess I need to save the result outside of the loop something like this > > > > ################ hop hey lalaley ##### > > from pymol import cmd > > pdb = "Ev_complex_model_final.pdb" > > chains_array = ["A", "B"] # add more chains in case of more complex pdb > > > > # loop over chains to rename it > > for chain in chains_array: > > cmd.load(pdb) > > cmd.alter('chain ' + chain, 'chain=""') > > cmd.delete('*') > > ###################################### > > > > # save output as pdb > > # I need to add something in the name of output indicating how much > > chains have been renamed > > # like output_withoutAB.pdb > > cmd.save('output_' + '.pdb') > > > > thanks in advance for help! > > -- > Thomas Holder > PyMOL Principal Developer > Schrödinger, Inc. > |
From: Thomas H. <tho...@sc...> - 2019-06-25 14:47:13
|
If you want to rename multiple chains at once, make a selection like (chain A+B+C). This list selection syntax is documented here: https://pymolwiki.org/index.php/Property_Selectors cmd.load(pdb) cmd.alter('chain ' + '+'.join(chains_array), 'chain=""') cmd.save('output.pdb') Cheers, Thomas > On Jun 25, 2019, at 4:14 PM, James Starlight <jms...@gm...> wrote: > > thanks so much Thomas, for this example! > > Actually, your python script does exactly what my bash script - > produces number of pdbs for each of the renamed chain. > I would like rather to produce at the end ONE pdb with all chains > renamed to empty chain... > I guess I need to save the result outside of the loop something like this > > ################ hop hey lalaley ##### > from pymol import cmd > pdb = "Ev_complex_model_final.pdb" > chains_array = ["A", "B"] # add more chains in case of more complex pdb > > # loop over chains to rename it > for chain in chains_array: > cmd.load(pdb) > cmd.alter('chain ' + chain, 'chain=""') > cmd.delete('*') > ###################################### > > # save output as pdb > # I need to add something in the name of output indicating how much > chains have been renamed > # like output_withoutAB.pdb > cmd.save('output_' + '.pdb') > > thanks in advance for help! -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. |
From: James S. <jms...@gm...> - 2019-06-25 14:37:48
|
in python version I have got it # to be run with PyMOL: #pymol -ckqr pymol_cut_off.py ################ cut_off.py ##### from pymol import cmd pdb = "final.pdb" chains_array = ["A", "B"] # two chains will be cuted for chain in chains_array: cmd.load(pdb) cmd.alter('chain ' + chain, 'chain=""') cmd.set('pdb_use_ter_records', 1) cmd.set('retain_order', 1) cmd.save('output_without'+"".join(chains_array) + '.pdb') now the question would it be possible to do the same but in my bash script? вт, 25 июн. 2019 г. в 16:20, James Starlight <jms...@gm...>: > > OK Lorenzo, thank you ! > > As an alternative question, would it be possible to put that loop > while renaming of the chains in the processed PBD within the bash > loop? > > Here is an idea > > #!/bin/bash > # this script rename chains in pdb to "empty" chain > pdb="my.pdb" > output=$(pwd) > > # chain array is provided in a shell array > chains=('A' 'B') > > # create several pdbs without individual chains > #pymol -cQkd " > pymol -c -d " > # I need to add loop within PYMOL over the elements of external arrays > for chains > # mb for i in chains: > cmd.load('${pdb}') > cmd.alter('(chain $i)', 'chain=\"\"') > cmd.set('pdb_use_ter_records', 1) > cmd.set('retain_order', 1) > # close the loop and save final output as 1 pdb > cmd.save('${output}/output_withoutAB.pdb','all') > " > > вт, 25 июн. 2019 г. в 16:14, James Starlight <jms...@gm...>: > > > > thanks so much Thomas, for this example! > > > > Actually, your python script does exactly what my bash script - > > produces number of pdbs for each of the renamed chain. > > I would like rather to produce at the end ONE pdb with all chains > > renamed to empty chain... > > I guess I need to save the result outside of the loop something like this > > > > ################ hop hey lalaley ##### > > from pymol import cmd > > pdb = "Ev_complex_model_final.pdb" > > chains_array = ["A", "B"] # add more chains in case of more complex pdb > > > > # loop over chains to rename it > > for chain in chains_array: > > cmd.load(pdb) > > cmd.alter('chain ' + chain, 'chain=""') > > cmd.delete('*') > > ###################################### > > > > # save output as pdb > > # I need to add something in the name of output indicating how much > > chains have been renamed > > # like output_withoutAB.pdb > > cmd.save('output_' + '.pdb') > > > > thanks in advance for help! > > > > вт, 25 июн. 2019 г. в 16:03, Thomas Holder <tho...@sc...>: > > > > > > > generally if I integrate a pymol silent script inside my > > > > bash script, I do not need to use cmd.* syntax, right? > > > > > > Correct. The -d argument takes PyMOL commands, like a .pml script. Python syntax is optional. > > > > > > Python syntax (cmd.*) is necessary and most useful if you write a Python script (.py extension) and run that with PyMOL. You could write your multi-chains loop as a Python script: > > > > > > ################ example.py ########## > > > from pymol import cmd > > > pdb = "my.pdb" > > > chains_arrays = ["A", "B", "C", "D", "E", "F", "G"] > > > > > > for chain in chains_array: > > > cmd.load(pdb) > > > cmd.alter('chain ' + chain, 'chain=""') > > > cmd.save('output_' + chain + '.pdb') > > > cmd.delete('*') > > > ###################################### > > > > > > Then run it with PyMOL: > > > pymol -ckqr example.py > > > > > > See also: > > > https://pymolwiki.org/index.php/Launching_From_a_Script > > > https://pymolwiki.org/index.php/Python_Integration > > > > > > Cheers, > > > Thomas > > > > > > > On Jun 25, 2019, at 3:08 PM, James Starlight <jms...@gm...> wrote: > > > > > > > > one extra programming question: > > > > > > > > imagine now in my pdb I have severals chain which I would like to > > > > rename to blank chain. > > > > > > > > I can do it simply like this > > > > # a case for 3 chains to be renamed > > > > > > > > #!/bin/bash > > > > pdb="my.pdb" > > > > output=$(pwd) > > > > pymol -c -d " > > > > cmd.load('${pdb}') > > > > cmd.alter('(chain A)', 'chain=\"\"') > > > > cmd.alter('(chain B)', 'chain=\"\"') > > > > cmd.alter('(chain C)', 'chain=\"\"') > > > > cmd.save('${output}/output.pdb','all') > > > > " > > > > > > > > or for multi-chain protein I can alternatively create external loop, > > > > thus running pymol 3 times iteratively (which is not good realization) > > > > providin array info from external shell session > > > > > > > > # this example save 7 different pdbs renaming one chain in each of them > > > > #!/bin/bash > > > > pdb="my.pdb" > > > > output=$(pwd) > > > > chains_arrays=( A B C D E F G ) > > > > > > > > for i in "$chains_array[@]}"; do > > > > pymol -c -d " > > > > cmd.load('${pdb}') > > > > cmd.alter('(chain $i)', 'chain=\"\"') > > > > cmd.save('${output}/output_$i.pdb','all') > > > > " > > > > done > > > > > > > > would it be possible rather to make an array and loop inside the pymol > > > > to rename all chains into the blank chain during one execution of > > > > pymol? > > > > > > > > Thanks in advance! > > > > > > > > вт, 25 июн. 2019 г. в 14:50, James Starlight <jms...@gm...>: > > > >> > > > >> I have got the idea! > > > >> thank you so much Thomas! > > > >> One question: generally if I integrate a pymol silent script inside my > > > >> bash script, I do not need to use cmd.* syntax, right? In what cases > > > >> cmd.* sytax might be usefull? > > > >> > > > >> Thank you again! > > > >> > > > >> вт, 25 июн. 2019 г. в 12:05, Thomas Holder <tho...@sc...>: > > > >>> > > > >>> > > > >>>> On Jun 25, 2019, at 11:48 AM, James Starlight <jms...@gm...> wrote: > > > >>>> > > > >>>> so what I need is just to update my pymol, keep using the same command? > > > >>> > > > >>> Yes > > > >>> > > > >>>> P.S.would the following integration of the code into bash script be > > > >>>> usefull to remove chains in no gui mode? > > > >>>> > > > >>>> pymol -cQkd " > > > >>>> from pymol import cmd > > > >>>> fetch $pdb, type=pdb, tmp > > > >>>> cmd.alter('(chain A)',chain='') > > > >>>> " > > > >>>> I am not sure whether I used here cmd.alter in correct way .. > > > >>> > > > >>> > > > >>> With fetch, use "async=0" or use Python syntax. And keyword arguments (type=) must be after positional arguments (tmp). > > > >>> > > > >>> It's easier if you don't use Python syntax for alter, otherwise you'll need three levels of nested quotes, which gets ugly: > > > >>> > > > >>> pymol -cQkd " > > > >>> fetch $pdb, tmp, type=pdb, async=0 > > > >>> alter (chain A), chain='' > > > >>> " > > > >>> > > > >>> With Python syntax (note the ugly escaping of quotes): > > > >>> > > > >>> pymol -cQkd " > > > >>> cmd.fetch('$pdb', 'tmp', type='pdb') > > > >>> cmd.alter('(chain A)', 'chain=\"\"') > > > >>> " > > > >>> > > > >>> Cheers, > > > >>> Thomas > > > >>> > > > >>> -- > > > >>> Thomas Holder > > > >>> PyMOL Principal Developer > > > >>> Schrödinger, Inc. > > > >>> > > > > > > -- > > > Thomas Holder > > > PyMOL Principal Developer > > > Schrödinger, Inc. > > > |
From: James S. <jms...@gm...> - 2019-06-25 14:20:50
|
OK Lorenzo, thank you ! As an alternative question, would it be possible to put that loop while renaming of the chains in the processed PBD within the bash loop? Here is an idea #!/bin/bash # this script rename chains in pdb to "empty" chain pdb="my.pdb" output=$(pwd) # chain array is provided in a shell array chains=('A' 'B') # create several pdbs without individual chains #pymol -cQkd " pymol -c -d " # I need to add loop within PYMOL over the elements of external arrays for chains # mb for i in chains: cmd.load('${pdb}') cmd.alter('(chain $i)', 'chain=\"\"') cmd.set('pdb_use_ter_records', 1) cmd.set('retain_order', 1) # close the loop and save final output as 1 pdb cmd.save('${output}/output_withoutAB.pdb','all') " вт, 25 июн. 2019 г. в 16:14, James Starlight <jms...@gm...>: > > thanks so much Thomas, for this example! > > Actually, your python script does exactly what my bash script - > produces number of pdbs for each of the renamed chain. > I would like rather to produce at the end ONE pdb with all chains > renamed to empty chain... > I guess I need to save the result outside of the loop something like this > > ################ hop hey lalaley ##### > from pymol import cmd > pdb = "Ev_complex_model_final.pdb" > chains_array = ["A", "B"] # add more chains in case of more complex pdb > > # loop over chains to rename it > for chain in chains_array: > cmd.load(pdb) > cmd.alter('chain ' + chain, 'chain=""') > cmd.delete('*') > ###################################### > > # save output as pdb > # I need to add something in the name of output indicating how much > chains have been renamed > # like output_withoutAB.pdb > cmd.save('output_' + '.pdb') > > thanks in advance for help! > > вт, 25 июн. 2019 г. в 16:03, Thomas Holder <tho...@sc...>: > > > > > generally if I integrate a pymol silent script inside my > > > bash script, I do not need to use cmd.* syntax, right? > > > > Correct. The -d argument takes PyMOL commands, like a .pml script. Python syntax is optional. > > > > Python syntax (cmd.*) is necessary and most useful if you write a Python script (.py extension) and run that with PyMOL. You could write your multi-chains loop as a Python script: > > > > ################ example.py ########## > > from pymol import cmd > > pdb = "my.pdb" > > chains_arrays = ["A", "B", "C", "D", "E", "F", "G"] > > > > for chain in chains_array: > > cmd.load(pdb) > > cmd.alter('chain ' + chain, 'chain=""') > > cmd.save('output_' + chain + '.pdb') > > cmd.delete('*') > > ###################################### > > > > Then run it with PyMOL: > > pymol -ckqr example.py > > > > See also: > > https://pymolwiki.org/index.php/Launching_From_a_Script > > https://pymolwiki.org/index.php/Python_Integration > > > > Cheers, > > Thomas > > > > > On Jun 25, 2019, at 3:08 PM, James Starlight <jms...@gm...> wrote: > > > > > > one extra programming question: > > > > > > imagine now in my pdb I have severals chain which I would like to > > > rename to blank chain. > > > > > > I can do it simply like this > > > # a case for 3 chains to be renamed > > > > > > #!/bin/bash > > > pdb="my.pdb" > > > output=$(pwd) > > > pymol -c -d " > > > cmd.load('${pdb}') > > > cmd.alter('(chain A)', 'chain=\"\"') > > > cmd.alter('(chain B)', 'chain=\"\"') > > > cmd.alter('(chain C)', 'chain=\"\"') > > > cmd.save('${output}/output.pdb','all') > > > " > > > > > > or for multi-chain protein I can alternatively create external loop, > > > thus running pymol 3 times iteratively (which is not good realization) > > > providin array info from external shell session > > > > > > # this example save 7 different pdbs renaming one chain in each of them > > > #!/bin/bash > > > pdb="my.pdb" > > > output=$(pwd) > > > chains_arrays=( A B C D E F G ) > > > > > > for i in "$chains_array[@]}"; do > > > pymol -c -d " > > > cmd.load('${pdb}') > > > cmd.alter('(chain $i)', 'chain=\"\"') > > > cmd.save('${output}/output_$i.pdb','all') > > > " > > > done > > > > > > would it be possible rather to make an array and loop inside the pymol > > > to rename all chains into the blank chain during one execution of > > > pymol? > > > > > > Thanks in advance! > > > > > > вт, 25 июн. 2019 г. в 14:50, James Starlight <jms...@gm...>: > > >> > > >> I have got the idea! > > >> thank you so much Thomas! > > >> One question: generally if I integrate a pymol silent script inside my > > >> bash script, I do not need to use cmd.* syntax, right? In what cases > > >> cmd.* sytax might be usefull? > > >> > > >> Thank you again! > > >> > > >> вт, 25 июн. 2019 г. в 12:05, Thomas Holder <tho...@sc...>: > > >>> > > >>> > > >>>> On Jun 25, 2019, at 11:48 AM, James Starlight <jms...@gm...> wrote: > > >>>> > > >>>> so what I need is just to update my pymol, keep using the same command? > > >>> > > >>> Yes > > >>> > > >>>> P.S.would the following integration of the code into bash script be > > >>>> usefull to remove chains in no gui mode? > > >>>> > > >>>> pymol -cQkd " > > >>>> from pymol import cmd > > >>>> fetch $pdb, type=pdb, tmp > > >>>> cmd.alter('(chain A)',chain='') > > >>>> " > > >>>> I am not sure whether I used here cmd.alter in correct way .. > > >>> > > >>> > > >>> With fetch, use "async=0" or use Python syntax. And keyword arguments (type=) must be after positional arguments (tmp). > > >>> > > >>> It's easier if you don't use Python syntax for alter, otherwise you'll need three levels of nested quotes, which gets ugly: > > >>> > > >>> pymol -cQkd " > > >>> fetch $pdb, tmp, type=pdb, async=0 > > >>> alter (chain A), chain='' > > >>> " > > >>> > > >>> With Python syntax (note the ugly escaping of quotes): > > >>> > > >>> pymol -cQkd " > > >>> cmd.fetch('$pdb', 'tmp', type='pdb') > > >>> cmd.alter('(chain A)', 'chain=\"\"') > > >>> " > > >>> > > >>> Cheers, > > >>> Thomas > > >>> > > >>> -- > > >>> Thomas Holder > > >>> PyMOL Principal Developer > > >>> Schrödinger, Inc. > > >>> > > > > -- > > Thomas Holder > > PyMOL Principal Developer > > Schrödinger, Inc. > > |
From: James S. <jms...@gm...> - 2019-06-25 14:14:42
|
thanks so much Thomas, for this example! Actually, your python script does exactly what my bash script - produces number of pdbs for each of the renamed chain. I would like rather to produce at the end ONE pdb with all chains renamed to empty chain... I guess I need to save the result outside of the loop something like this ################ hop hey lalaley ##### from pymol import cmd pdb = "Ev_complex_model_final.pdb" chains_array = ["A", "B"] # add more chains in case of more complex pdb # loop over chains to rename it for chain in chains_array: cmd.load(pdb) cmd.alter('chain ' + chain, 'chain=""') cmd.delete('*') ###################################### # save output as pdb # I need to add something in the name of output indicating how much chains have been renamed # like output_withoutAB.pdb cmd.save('output_' + '.pdb') thanks in advance for help! вт, 25 июн. 2019 г. в 16:03, Thomas Holder <tho...@sc...>: > > > generally if I integrate a pymol silent script inside my > > bash script, I do not need to use cmd.* syntax, right? > > Correct. The -d argument takes PyMOL commands, like a .pml script. Python syntax is optional. > > Python syntax (cmd.*) is necessary and most useful if you write a Python script (.py extension) and run that with PyMOL. You could write your multi-chains loop as a Python script: > > ################ example.py ########## > from pymol import cmd > pdb = "my.pdb" > chains_arrays = ["A", "B", "C", "D", "E", "F", "G"] > > for chain in chains_array: > cmd.load(pdb) > cmd.alter('chain ' + chain, 'chain=""') > cmd.save('output_' + chain + '.pdb') > cmd.delete('*') > ###################################### > > Then run it with PyMOL: > pymol -ckqr example.py > > See also: > https://pymolwiki.org/index.php/Launching_From_a_Script > https://pymolwiki.org/index.php/Python_Integration > > Cheers, > Thomas > > > On Jun 25, 2019, at 3:08 PM, James Starlight <jms...@gm...> wrote: > > > > one extra programming question: > > > > imagine now in my pdb I have severals chain which I would like to > > rename to blank chain. > > > > I can do it simply like this > > # a case for 3 chains to be renamed > > > > #!/bin/bash > > pdb="my.pdb" > > output=$(pwd) > > pymol -c -d " > > cmd.load('${pdb}') > > cmd.alter('(chain A)', 'chain=\"\"') > > cmd.alter('(chain B)', 'chain=\"\"') > > cmd.alter('(chain C)', 'chain=\"\"') > > cmd.save('${output}/output.pdb','all') > > " > > > > or for multi-chain protein I can alternatively create external loop, > > thus running pymol 3 times iteratively (which is not good realization) > > providin array info from external shell session > > > > # this example save 7 different pdbs renaming one chain in each of them > > #!/bin/bash > > pdb="my.pdb" > > output=$(pwd) > > chains_arrays=( A B C D E F G ) > > > > for i in "$chains_array[@]}"; do > > pymol -c -d " > > cmd.load('${pdb}') > > cmd.alter('(chain $i)', 'chain=\"\"') > > cmd.save('${output}/output_$i.pdb','all') > > " > > done > > > > would it be possible rather to make an array and loop inside the pymol > > to rename all chains into the blank chain during one execution of > > pymol? > > > > Thanks in advance! > > > > вт, 25 июн. 2019 г. в 14:50, James Starlight <jms...@gm...>: > >> > >> I have got the idea! > >> thank you so much Thomas! > >> One question: generally if I integrate a pymol silent script inside my > >> bash script, I do not need to use cmd.* syntax, right? In what cases > >> cmd.* sytax might be usefull? > >> > >> Thank you again! > >> > >> вт, 25 июн. 2019 г. в 12:05, Thomas Holder <tho...@sc...>: > >>> > >>> > >>>> On Jun 25, 2019, at 11:48 AM, James Starlight <jms...@gm...> wrote: > >>>> > >>>> so what I need is just to update my pymol, keep using the same command? > >>> > >>> Yes > >>> > >>>> P.S.would the following integration of the code into bash script be > >>>> usefull to remove chains in no gui mode? > >>>> > >>>> pymol -cQkd " > >>>> from pymol import cmd > >>>> fetch $pdb, type=pdb, tmp > >>>> cmd.alter('(chain A)',chain='') > >>>> " > >>>> I am not sure whether I used here cmd.alter in correct way .. > >>> > >>> > >>> With fetch, use "async=0" or use Python syntax. And keyword arguments (type=) must be after positional arguments (tmp). > >>> > >>> It's easier if you don't use Python syntax for alter, otherwise you'll need three levels of nested quotes, which gets ugly: > >>> > >>> pymol -cQkd " > >>> fetch $pdb, tmp, type=pdb, async=0 > >>> alter (chain A), chain='' > >>> " > >>> > >>> With Python syntax (note the ugly escaping of quotes): > >>> > >>> pymol -cQkd " > >>> cmd.fetch('$pdb', 'tmp', type='pdb') > >>> cmd.alter('(chain A)', 'chain=\"\"') > >>> " > >>> > >>> Cheers, > >>> Thomas > >>> > >>> -- > >>> Thomas Holder > >>> PyMOL Principal Developer > >>> Schrödinger, Inc. > >>> > > -- > Thomas Holder > PyMOL Principal Developer > Schrödinger, Inc. > |
From: Lorenzo G. <br...@gm...> - 2019-06-25 14:10:25
|
Hi James, not sure if it's relevant in this case, but you might also want to use retain_order, to avoid messing up your pdbs. https://pymolwiki.org/index.php/Retain_order Cheers, Lorenzo Il giorno mar 25 giu 2019 alle ore 16:04 Thomas Holder < tho...@sc...> ha scritto: > > generally if I integrate a pymol silent script inside my > > bash script, I do not need to use cmd.* syntax, right? > > Correct. The -d argument takes PyMOL commands, like a .pml script. Python > syntax is optional. > > Python syntax (cmd.*) is necessary and most useful if you write a Python > script (.py extension) and run that with PyMOL. You could write your > multi-chains loop as a Python script: > > ################ example.py ########## > from pymol import cmd > pdb = "my.pdb" > chains_arrays = ["A", "B", "C", "D", "E", "F", "G"] > > for chain in chains_array: > cmd.load(pdb) > cmd.alter('chain ' + chain, 'chain=""') > cmd.save('output_' + chain + '.pdb') > cmd.delete('*') > ###################################### > > Then run it with PyMOL: > pymol -ckqr example.py > > See also: > https://pymolwiki.org/index.php/Launching_From_a_Script > https://pymolwiki.org/index.php/Python_Integration > > Cheers, > Thomas > > > On Jun 25, 2019, at 3:08 PM, James Starlight <jms...@gm...> > wrote: > > > > one extra programming question: > > > > imagine now in my pdb I have severals chain which I would like to > > rename to blank chain. > > > > I can do it simply like this > > # a case for 3 chains to be renamed > > > > #!/bin/bash > > pdb="my.pdb" > > output=$(pwd) > > pymol -c -d " > > cmd.load('${pdb}') > > cmd.alter('(chain A)', 'chain=\"\"') > > cmd.alter('(chain B)', 'chain=\"\"') > > cmd.alter('(chain C)', 'chain=\"\"') > > cmd.save('${output}/output.pdb','all') > > " > > > > or for multi-chain protein I can alternatively create external loop, > > thus running pymol 3 times iteratively (which is not good realization) > > providin array info from external shell session > > > > # this example save 7 different pdbs renaming one chain in each of them > > #!/bin/bash > > pdb="my.pdb" > > output=$(pwd) > > chains_arrays=( A B C D E F G ) > > > > for i in "$chains_array[@]}"; do > > pymol -c -d " > > cmd.load('${pdb}') > > cmd.alter('(chain $i)', 'chain=\"\"') > > cmd.save('${output}/output_$i.pdb','all') > > " > > done > > > > would it be possible rather to make an array and loop inside the pymol > > to rename all chains into the blank chain during one execution of > > pymol? > > > > Thanks in advance! > > > > вт, 25 июн. 2019 г. в 14:50, James Starlight <jms...@gm...>: > >> > >> I have got the idea! > >> thank you so much Thomas! > >> One question: generally if I integrate a pymol silent script inside my > >> bash script, I do not need to use cmd.* syntax, right? In what cases > >> cmd.* sytax might be usefull? > >> > >> Thank you again! > >> > >> вт, 25 июн. 2019 г. в 12:05, Thomas Holder < > tho...@sc...>: > >>> > >>> > >>>> On Jun 25, 2019, at 11:48 AM, James Starlight <jms...@gm...> > wrote: > >>>> > >>>> so what I need is just to update my pymol, keep using the same > command? > >>> > >>> Yes > >>> > >>>> P.S.would the following integration of the code into bash script be > >>>> usefull to remove chains in no gui mode? > >>>> > >>>> pymol -cQkd " > >>>> from pymol import cmd > >>>> fetch $pdb, type=pdb, tmp > >>>> cmd.alter('(chain A)',chain='') > >>>> " > >>>> I am not sure whether I used here cmd.alter in correct way .. > >>> > >>> > >>> With fetch, use "async=0" or use Python syntax. And keyword arguments > (type=) must be after positional arguments (tmp). > >>> > >>> It's easier if you don't use Python syntax for alter, otherwise you'll > need three levels of nested quotes, which gets ugly: > >>> > >>> pymol -cQkd " > >>> fetch $pdb, tmp, type=pdb, async=0 > >>> alter (chain A), chain='' > >>> " > >>> > >>> With Python syntax (note the ugly escaping of quotes): > >>> > >>> pymol -cQkd " > >>> cmd.fetch('$pdb', 'tmp', type='pdb') > >>> cmd.alter('(chain A)', 'chain=\"\"') > >>> " > >>> > >>> Cheers, > >>> Thomas > >>> > >>> -- > >>> Thomas Holder > >>> PyMOL Principal Developer > >>> Schrödinger, Inc. > >>> > > -- > Thomas Holder > PyMOL Principal Developer > Schrödinger, Inc. > > > > _______________________________________________ > PyMOL-users mailing list > Archives: http://www.mail-archive.com/pym...@li... > Unsubscribe: > https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe |
From: Lorenzo G. <br...@gm...> - 2019-06-25 14:05:40
|
Dear pymol users, What is the purpose of the `selection` argument in the `load_traj` command? My intuition would say that it allows to somehow select which atoms to load into pymol before the actual loading happens. However, it seems to do nothing whatsoever. What am I missing? Thanks, Lorenzo |
From: Thomas H. <tho...@sc...> - 2019-06-25 14:03:12
|
> generally if I integrate a pymol silent script inside my > bash script, I do not need to use cmd.* syntax, right? Correct. The -d argument takes PyMOL commands, like a .pml script. Python syntax is optional. Python syntax (cmd.*) is necessary and most useful if you write a Python script (.py extension) and run that with PyMOL. You could write your multi-chains loop as a Python script: ################ example.py ########## from pymol import cmd pdb = "my.pdb" chains_arrays = ["A", "B", "C", "D", "E", "F", "G"] for chain in chains_array: cmd.load(pdb) cmd.alter('chain ' + chain, 'chain=""') cmd.save('output_' + chain + '.pdb') cmd.delete('*') ###################################### Then run it with PyMOL: pymol -ckqr example.py See also: https://pymolwiki.org/index.php/Launching_From_a_Script https://pymolwiki.org/index.php/Python_Integration Cheers, Thomas > On Jun 25, 2019, at 3:08 PM, James Starlight <jms...@gm...> wrote: > > one extra programming question: > > imagine now in my pdb I have severals chain which I would like to > rename to blank chain. > > I can do it simply like this > # a case for 3 chains to be renamed > > #!/bin/bash > pdb="my.pdb" > output=$(pwd) > pymol -c -d " > cmd.load('${pdb}') > cmd.alter('(chain A)', 'chain=\"\"') > cmd.alter('(chain B)', 'chain=\"\"') > cmd.alter('(chain C)', 'chain=\"\"') > cmd.save('${output}/output.pdb','all') > " > > or for multi-chain protein I can alternatively create external loop, > thus running pymol 3 times iteratively (which is not good realization) > providin array info from external shell session > > # this example save 7 different pdbs renaming one chain in each of them > #!/bin/bash > pdb="my.pdb" > output=$(pwd) > chains_arrays=( A B C D E F G ) > > for i in "$chains_array[@]}"; do > pymol -c -d " > cmd.load('${pdb}') > cmd.alter('(chain $i)', 'chain=\"\"') > cmd.save('${output}/output_$i.pdb','all') > " > done > > would it be possible rather to make an array and loop inside the pymol > to rename all chains into the blank chain during one execution of > pymol? > > Thanks in advance! > > вт, 25 июн. 2019 г. в 14:50, James Starlight <jms...@gm...>: >> >> I have got the idea! >> thank you so much Thomas! >> One question: generally if I integrate a pymol silent script inside my >> bash script, I do not need to use cmd.* syntax, right? In what cases >> cmd.* sytax might be usefull? >> >> Thank you again! >> >> вт, 25 июн. 2019 г. в 12:05, Thomas Holder <tho...@sc...>: >>> >>> >>>> On Jun 25, 2019, at 11:48 AM, James Starlight <jms...@gm...> wrote: >>>> >>>> so what I need is just to update my pymol, keep using the same command? >>> >>> Yes >>> >>>> P.S.would the following integration of the code into bash script be >>>> usefull to remove chains in no gui mode? >>>> >>>> pymol -cQkd " >>>> from pymol import cmd >>>> fetch $pdb, type=pdb, tmp >>>> cmd.alter('(chain A)',chain='') >>>> " >>>> I am not sure whether I used here cmd.alter in correct way .. >>> >>> >>> With fetch, use "async=0" or use Python syntax. And keyword arguments (type=) must be after positional arguments (tmp). >>> >>> It's easier if you don't use Python syntax for alter, otherwise you'll need three levels of nested quotes, which gets ugly: >>> >>> pymol -cQkd " >>> fetch $pdb, tmp, type=pdb, async=0 >>> alter (chain A), chain='' >>> " >>> >>> With Python syntax (note the ugly escaping of quotes): >>> >>> pymol -cQkd " >>> cmd.fetch('$pdb', 'tmp', type='pdb') >>> cmd.alter('(chain A)', 'chain=\"\"') >>> " >>> >>> Cheers, >>> Thomas >>> >>> -- >>> Thomas Holder >>> PyMOL Principal Developer >>> Schrödinger, Inc. >>> -- Thomas Holder PyMOL Principal Developer Schrödinger, Inc. |