Hi Magnus,

The command is 'alter', not 'alter resi' or 'alter_resi'. The function
is therefore 'cmd.alter()', which takes as first argument a selection
string and as second an operation string (expression). The key aspects
to understand are that (most) commands have associated functions
cmd.command() and that selections and everything that contains
anything not  just a number should be passed as strings. Then, it
becomes almos trivial to translate the information from 'help command'
to a function call. So, what you need is:

cmd.alter("resi 225-232","ss='h' ")

A more direct approach for the function syntax can be obtained by using

help(cmd.alter)

You then get an additional line showing the function with all
arguments and a pointer to the module it comes from.

Hope it helps,

Tsjerk


On Wed, Mar 18, 2009 at 10:47 AM, Magnus Andersson <m...@farma.ku.dk> wrote:
> Hi,
>
> I want to alter the secondary structure on a part of my protein. Normally
> I do:
>
> alter resi 225-232, ss='h'
> show cartoon, protein
>
> But if I want to add this in a movie script? I tried:
>
> cmd.alter_resi(225-232, ss='h')
>
> But that did not work. I looked in the user manual & couldn't find API
> syntax for alter resi. Is it not possible to add this to a script?
>
> Best regards /
>
> Magnus
>
> --
> Magnus Andersson, PhD
>
> Biostructural Research
>
> Dept. Medicinal Chemistry
>
> Faculty of Pharmaceutical Sciences
>
> University of Copenhagen
>
> Phone: +45 353 36499
>
> Fax: +45 353 36040
>
> Mobile: +46 707 346545
>
> E-mail: m...@farma.ku.dk
>
>
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>



-- 
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623

Reply via email to