Thank you, Thomas.
Putting code below to python script and adding run script.py to pymolrc
have helped!
*from pymol import cmd, preset
load_orig = cmd.load
def load_new(*args, **kwargs):
load_orig(*args, **kwargs)
preset.ligand_cartoon('all')
cmd.load = load_new*
On Wed, Jul 11, 2012 at 4:59 PM, Thomas Holder <
spel...@users.sourceforge.net> wrote:
> Or overload the cmd.load function:
>
> python
> from pymol import cmd, preset
> load_orig = cmd.load
> def load_new(*args, **kwargs):
> load_orig(*args, **kwargs)
> preset.ligand_cartoon('all')
> cmd.load = load_new
> python end
>
> Cheers,
> Thomas
>
> Jason Vertrees wrote, On 07/11/12 22:06:
>
> John,
>>
>> Put this in your ~/.pymolrc:
>>
>> import pymol
>>
>> def my_load(file,obj):
>> cmd.load(file,obj)
>> preset.ligand_cartoon(obj)
>>
>> cmd.extend("my_load", my_load)
>>
>> Then you can load files as,
>>
>> my_load /path/to/file, object_name
>>
>>
>> Cheers,
>>
>> -- Jason
>>
>> On Wed, Jul 11, 2012 at 12:48 PM, John Amraph <john.amr...@gmail.com>
>> wrote:
>>
>>> Dear collegues,
>>>
>>> I need your help in following question. I want to visualize pdb in the
>>> preset.ligand_cartoon("all",_**self=cmd) mode when Pymol is opening the
>>> pdb
>>> file.
>>> I tried several options:
>>>
>>> include preset.ligand_cartoon("all",_**self=cmd) in pymolrc
>>> making a pymol script(from pymol import cmd\
>>> preset.ligand_cartoon("all",_**self=cmd)) and adding run script.py in
>>> pymolrc
>>>
>>> But that doesn't work.
>>>
>>> Thank you!
>>> John Amraph
>>>
>>> PS: OS - Win7, pymol v0.9
>>>
>>
> --
> Thomas Holder
> MPI for Developmental Biology
> Spemannstr. 35
> D-72076 Tübingen
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net