|
From: Someone E. <tn...@gm...> - 2013-02-22 15:50:14
|
Hi everyone, I would like my PyMOL script take a command line parameters, e.g: pymol get_neighbors.py ALA How to extract "ALA" from inside my neighbors.py? Best regards, Tim |
|
From: Matthew B. <mp...@pi...> - 2013-02-22 16:06:00
|
Hi Tim,
You can use two dashes on the command line, like:
pymol -r get_neighbors.py -- ALA
And then access them using sys.argv in your script.
For example: save the following as tmp_pymol.py and run: 'pymol -r
tmp_pymol.py -- ALA' ( without quotes)
>>>>
from pymol import cmd
import sys
def foo(string):
print string
return
cmd.extend('foo',foo)
if __name__ == '__main__':
foo(sys.argv[1])
>>>
Hope this helps,
Matt
On 02/22/2013 10:50 AM, Someone Else wrote:
> Hi everyone,
>
> I would like my PyMOL script take a command line parameters, e.g:
>
> pymol get_neighbors.py ALA
>
> How to extract "ALA" from inside my neighbors.py?
>
> Best regards,
> Tim
>
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
>
>
> _______________________________________________
> PyMOL-users mailing list (PyM...@li...)
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/pym...@li...
|
|
From: Martin H. <ma...@bl...> - 2013-02-26 07:39:37
|
Hi PyMOL users If I display these coordinates HETATM 38 C LIG 2 1.535 2.288 -4.156 1.00 0.00 C HETATM 39 C LIG 2 2.284 1.535 -3.066 1.00 0.00 C HETATM 40 O LIG 2 3.406 2.362 -2.714 1.00 0.00 O HETATM 41 C LIG 2 1.426 1.234 -1.850 1.00 0.00 C HETATM 42 S LIG 2 -0.260 0.689 -2.100 1.00 0.00 S HETATM 43 C LIG 2 1.886 1.450 -0.593 1.00 0.00 C HETATM 44 S LIG 2 0.838 1.262 0.813 1.00 0.00 S HETATM 45 C LIG 2 3.318 1.872 -0.336 1.00 0.00 C HETATM 46 C LIG 2 4.139 1.803 -1.624 1.00 0.00 C HETATM 47 W LIG 2 -1.132 -0.004 0.041 1.00 0.00 W HETATM 48 O LIG 2 0.155 -1.665 0.118 1.00 0.00 O HETATM 49 C LIG 2 0.721 -3.870 -0.567 1.00 0.00 C HETATM 50 C LIG 2 0.384 -2.594 -0.826 1.00 0.00 C HETATM 51 C LIG 2 -5.606 -3.611 -1.000 1.00 0.00 C HETATM 52 O LIG 2 -6.664 -4.080 -0.564 1.00 0.00 O HETATM 53 N LIG 2 -4.607 -4.417 -1.426 1.00 0.00 N using "Preset/Ball-and-stick", the tungsten atom is drawn with a very small radius. Can this radius be increased? Thanks Martin |
|
From: Thomas H. <tho...@sc...> - 2013-02-26 08:23:59
|
Hi Martin, PyMOL> alter elem W, vdw=2.0 PyMOL> rebuild Cheers, Thomas Martin Hediger wrote, On 02/26/13 08:38: > Hi PyMOL users > > If I display these coordinates > > HETATM 38 C LIG 2 1.535 2.288 -4.156 1.00 0.00 C > HETATM 39 C LIG 2 2.284 1.535 -3.066 1.00 0.00 C > HETATM 40 O LIG 2 3.406 2.362 -2.714 1.00 0.00 O > HETATM 41 C LIG 2 1.426 1.234 -1.850 1.00 0.00 C > HETATM 42 S LIG 2 -0.260 0.689 -2.100 1.00 0.00 S > HETATM 43 C LIG 2 1.886 1.450 -0.593 1.00 0.00 C > HETATM 44 S LIG 2 0.838 1.262 0.813 1.00 0.00 S > HETATM 45 C LIG 2 3.318 1.872 -0.336 1.00 0.00 C > HETATM 46 C LIG 2 4.139 1.803 -1.624 1.00 0.00 C > HETATM 47 W LIG 2 -1.132 -0.004 0.041 1.00 0.00 W > HETATM 48 O LIG 2 0.155 -1.665 0.118 1.00 0.00 O > HETATM 49 C LIG 2 0.721 -3.870 -0.567 1.00 0.00 C > HETATM 50 C LIG 2 0.384 -2.594 -0.826 1.00 0.00 C > HETATM 51 C LIG 2 -5.606 -3.611 -1.000 1.00 0.00 C > HETATM 52 O LIG 2 -6.664 -4.080 -0.564 1.00 0.00 O > HETATM 53 N LIG 2 -4.607 -4.417 -1.426 1.00 0.00 N > > using "Preset/Ball-and-stick", the tungsten atom is drawn with a very > small radius. Can this radius be increased? > > Thanks > Martin -- Thomas Holder PyMOL Developer Schrödinger Contractor |
|
From: Martin H. <ma...@bl...> - 2013-02-26 08:58:11
|
Dear PyMOL Users If you load these coordinates in PyMOL HETATM 1 W LIG 1 -1.357 -0.079 0.052 1.00 0.00 W HETATM 2 C LIG 1 -0.713 -1.686 1.008 1.00 0.00 C HETATM 3 C LIG 1 -0.323 -1.855 -0.270 1.00 0.00 C HETATM 4 H LIG 1 -0.664 -2.180 1.970 1.00 0.00 H HETATM 5 H LIG 1 -0.441 -2.597 -1.043 1.00 0.00 H you'll see that a bond between W and C is drawn. However, this is supposed to be a transition state, so a dashed bond would be more appropriate. Can this somehow be drawn? Thanks, Martin |
|
From: Thomas H. <tho...@sc...> - 2013-02-26 09:12:01
|
Hi Martin, only distance measures can draw dashed lines in PyMOL, so try this: unbond elem W, elem C show sticks show sphere, elem W distance transbonds, elem W, elem C hide label set dash_round_ends, off set dash_radius, 0.2 set dash_length, 0.4 set dash_gap, 0.15 ray The dashes will display as nice cylinders when ray traced and also with the new shader rendering in PyMOL 1.5 (set use_shaders). Cheers, Thomas Martin Hediger wrote, On 02/26/13 09:57: > Dear PyMOL Users > > If you load these coordinates in PyMOL > > HETATM 1 W LIG 1 -1.357 -0.079 0.052 1.00 0.00 W > HETATM 2 C LIG 1 -0.713 -1.686 1.008 1.00 0.00 C > HETATM 3 C LIG 1 -0.323 -1.855 -0.270 1.00 0.00 C > HETATM 4 H LIG 1 -0.664 -2.180 1.970 1.00 0.00 H > HETATM 5 H LIG 1 -0.441 -2.597 -1.043 1.00 0.00 H > > you'll see that a bond between W and C is drawn. However, this is > supposed to be a transition state, so a dashed bond would be more > appropriate. Can this somehow be drawn? > > Thanks, > Martin -- Thomas Holder PyMOL Developer Schrödinger Contractor |