Hi Julian,

I think the problem is that you format the radius as an integer:

# wrong (%d)
cmd.alter("helix%d" % i, expression="vdw=%d" % vdw_a)
# correct (%f)
cmd.alter("helix%d" % i, expression="vdw=%f" % vdw_a)
# also correct:
cmd.alter("helix%d" % i, "vdw=vdw_a", space={'vdw_a': vdw_a})

Hope that helps.

You didn't break any support-requesting rules, your problem was well described, 
just a bit tricky to understand. The only thing you should add next time is 
PyMOL version and operating system (wasn't relevant for this problem, but you 
never know).

Cheers,
  Thomas

On Tue, May 7, 2019 at 3:40 PM Julian Krumm <s2juk...@uni-bayreuth.de> wrote:
> 
> Dear Pymol-Team,
> 
> very new in this forum i come along with a specific problem.
> I wrote a little pymol-script:
> 
> 
> load /work/jkrumm/edgelook/0.00M/cter/40-helix-edge/helix-40.pqr
> 
> hide lines
> show cartoon
> 
> radius = 2.7
> vdw_a = 2.7
> 
> for i in range(401,413,1):\
> print(i)\
> vdw_a = vdw_a + 2.7\
> print(vdw_a)\
> cmd.create("helix%d" % i, "/helix-40///PRT`%d/PRT" % i)\
> cmd.alter("helix%d" % i, expression="vdw=%d" % vdw_a)
> rebuild
> 
> disable all
> 
> 
> for i in range(401,413,1):\
> cmd.set(name="sphere_transparency", value=0.0, selection="helix%d" % i)\
> cmd.show(representation="sphere", selection="helix%d" % i)\
> cmd.enable(name="helix%d" % i)
> 
> enable helix-40
> 
> set_view (\
>     0.246392056,   -0.601405144,    0.760001123,\
>    -0.951444209,   -0.299392790,    0.071540825,\
>     0.184513614,   -0.740724683,   -0.645971537,\
>     0.000000000,    0.000000000, -270.700958252,\
>     0.528925896,    8.660091400,   -2.648437977,\
>   100.995597839,  440.406250000,  -20.000000000 )
> 
> bg_color white
> set reflect, 0
> png ./test.png, width=2400, height=1200, dpi=300, ray=0
> 
> 
> It is reading the PRT-entrys out of the input file to new objects and then
> adjusts the proper radius.
> The radius of the protein spheres is incremented by 2.7 Ã…. Moreover the
> sphere center is shifted away from the C-terminus towards the N-terminus
> by a distance equal to its radius (not done by pymol).
> This should lead to the situation, that the surfaces of all
> protein-spheres cut succinctly in one point at the C-Terminus, which they
> do not.
> It comes to slightly deviations when the spheres are getting visualized.
> 
> I already checked the sphere-centers. They are placed right. Also the
> radii are set right. After i showed this to my advisor he is the same
> opinion that the problem has to be pymol-based. I can't explain and i hope
> You are able to help me with this problem.
> 
> Attached to this mail You will find the pymol-session and the input PQR.
> 
> Sincerely,
> JuK
> 
> 
> P.S. If i broke any rule of support-requesting or if any information is
> missing please let me know._______________________________________________
> PyMOL-users mailing list
> Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> Unsubscribe: 
> https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe


--
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.



_______________________________________________
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Reply via email to