Re: [PyMOL] pymol in pthyon get_wizard() problems

2016-10-11 Thread Thomas Holder
cmd.get_wizard() takes no arguments and returns the current active wizard. If 
there is no active wizard, it returns None.

PyMOL> print cmd.get_wizard()
None
PyMOL> cmd.wizard("mutagenesis")
PyMOL> print cmd.get_wizard()


There is no wizard architecture documentation other than code, I'm sorry.

Here is an example script that adds a new wizard:
https://github.com/speleo3/pymol-psico/blob/master/psico/wizards.py

Cheers,
  Thomas

On 11 Oct 2016, at 15:09, Timothy Craig  wrote:

> Yes I totally agree, the question I have is "What needs to go there?".  I 
> tried using things like:
> 
> pymol.cmd.get_wizard("mutagenesis").set_dep("dep") 
> 
> since in the previous line I called:
> 
> 
> pymol.cmd.wizard("mutagenesis")
> 
> but then I get this error:
> 
> ---
> 
> Traceback (most recent call last):
> 
>   File "pngCSVmutate.py", line 141, in 
> 
> pymol.cmd.get_wizard("Mutagenesis").set_dep("dep")
> 
>   File 
> "/Users/craigt2/anaconda/pymol/lib/python2.7/site-packages/pymol/wizarding.py",
>  line 166, in get_wizard
> 
> _self.unlock(r,_self)
> 
> 
> AttributeError: 'str' object has no attribute 'unlock'
> 
> -
> 
> Which makes it look like it's not looking for a string to tell it which 
> wizard I'm wanting to use.  Very confusing.
> 
> Thanks,
> 
> -Tim
> 
> 
> On Tue, Oct 11, 2016 at 12:03 PM, Sampson, Jared M. 
>  wrote:
> Hi Tim - It seems to me that cmd.get_wizard() needs some argument to be 
> passed to it, because right now that function is returning `None`.  This 
> explains the error, which states you're trying to call .set_dep() of a `None` 
> object.
> 
> Hope that helps.
> 
> Cheers,
> Jared
> 
>> On Oct 11, 2016, at 2:48 PM, Timothy Craig  wrote:
>> 
>> Hello,
>>   I'm trying to adapt this script in python to do a variety of different 
>> mutations from a csv file using this previous message as a template.
>> 
>> https://sourceforge.net/p/pymol/mailman/message/11671708/
>> 
>> I'm a python novice so please excuse me if this is something simple. Here is 
>> a line that I have in my script that is giving me an error, which is now 
>> quite long so I don't want to post it all here now:
>> ---
>> pymol.cmd.get_wizard().set_dep("dep")
>> 
>> error:
>> 
>> Error: unable to get setting type.
>> 
>> Traceback (most recent call last):
>> 
>>   File "pngCSVmutate.py", line 141, in 
>> 
>> pymol.cmd.get_wizard().set_dep("dep")
>> 
>> AttributeError: 'NoneType' object has no attribute 'set_dep'

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


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
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


Re: [PyMOL] pymol in pthyon get_wizard() problems

2016-10-11 Thread Timothy Craig
Yes I totally agree, the question I have is "What needs to go there?".  I
tried using things like:

pymol.cmd.get_wizard("mutagenesis").set_dep("dep")

since in the previous line I called:

pymol.cmd.wizard("mutagenesis")

but then I get this error:

---

Traceback (most recent call last):

  File "pngCSVmutate.py", line 141, in 

pymol.cmd.get_wizard("Mutagenesis").set_dep("dep")

  File
"/Users/craigt2/anaconda/pymol/lib/python2.7/site-packages/pymol/wizarding.py",
line 166, in get_wizard

_self.unlock(r,_self)

AttributeError: 'str' object has no attribute 'unlock'

-

Which makes it look like it's not looking for a string to tell it which
wizard I'm wanting to use.  Very confusing.

Thanks,

-Tim

On Tue, Oct 11, 2016 at 12:03 PM, Sampson, Jared M. <
jms2...@cumc.columbia.edu> wrote:

> Hi Tim - It seems to me that cmd.get_wizard() needs some argument to be
> passed to it, because right now that function is returning `None`.  This
> explains the error, which states you're trying to call .set_dep() of a
> `None` object.
>
> Hope that helps.
>
> Cheers,
> Jared
>
> On Oct 11, 2016, at 2:48 PM, Timothy Craig  wrote:
>
> Hello,
>   I'm trying to adapt this script in python to do a variety of different
> mutations from a csv file using this previous message as a template.
>
> https://sourceforge.net/p/pymol/mailman/message/11671708/
>
> I'm a python novice so please excuse me if this is something simple. Here
> is a line that I have in my script that is giving me an error, which is now
> quite long so I don't want to post it all here now:
> ---
>
> pymol.cmd.get_wizard().set_dep("dep")
>
> *error:*
>
> Error: unable to get setting type.
>
> Traceback (most recent call last):
>
>   File "pngCSVmutate.py", line 141, in 
>
> pymol.cmd.get_wizard().set_dep("dep")
>
> AttributeError: 'NoneType' object has no attribute 'set_dep'
>
> 
> It seems like something needs to go in the parentheses for get_wizard()
> since that's where the NoneType is coming from.  Sadly there is no pymol
> wiki page on get_wizard
> 
> so I'm not sure where to look for the answer.  Does anyone have an idea or
> an example of the proper use of get_wizard() in python?
> Thanks in advance for your help,
> -Tim
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org !
> http://sdm.link/slashdot___
> 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
>
>
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
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

Re: [PyMOL] pymol in pthyon get_wizard() problems

2016-10-11 Thread Sampson, Jared M.
Hi Tim - It seems to me that cmd.get_wizard() needs some argument to be passed 
to it, because right now that function is returning `None`.  This explains the 
error, which states you're trying to call .set_dep() of a `None` object.

Hope that helps.

Cheers,
Jared

On Oct 11, 2016, at 2:48 PM, Timothy Craig 
> wrote:

Hello,
  I'm trying to adapt this script in python to do a variety of different 
mutations from a csv file using this previous message as a template.

https://sourceforge.net/p/pymol/mailman/message/11671708/

I'm a python novice so please excuse me if this is something simple. Here is a 
line that I have in my script that is giving me an error, which is now quite 
long so I don't want to post it all here now:
---

pymol.cmd.get_wizard().set_dep("dep")

error:

Error: unable to get setting type.

Traceback (most recent call last):

  File "pngCSVmutate.py", line 141, in 

pymol.cmd.get_wizard().set_dep("dep")

AttributeError: 'NoneType' object has no attribute 'set_dep'



It seems like something needs to go in the parentheses for get_wizard() since 
that's where the NoneType is coming from.  Sadly there is no pymol wiki page on 
get_wizard
 so I'm not sure where to look for the answer.  Does anyone have an idea or an 
example of the proper use of get_wizard() in python?
Thanks in advance for your help,
-Tim

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! 
http://sdm.link/slashdot___
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

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
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

[PyMOL] pymol in pthyon get_wizard() problems

2016-10-11 Thread Timothy Craig
Hello,
  I'm trying to adapt this script in python to do a variety of different
mutations from a csv file using this previous message as a template.

https://sourceforge.net/p/pymol/mailman/message/11671708/

I'm a python novice so please excuse me if this is something simple. Here
is a line that I have in my script that is giving me an error, which is now
quite long so I don't want to post it all here now:
---

pymol.cmd.get_wizard().set_dep("dep")

*error:*

Error: unable to get setting type.

Traceback (most recent call last):

  File "pngCSVmutate.py", line 141, in 

pymol.cmd.get_wizard().set_dep("dep")

AttributeError: 'NoneType' object has no attribute 'set_dep'


It seems like something needs to go in the parentheses for get_wizard()
since that's where the NoneType is coming from.  Sadly there is no pymol
wiki page on get_wizard

so I'm not sure where to look for the answer.  Does anyone have an idea or
an example of the proper use of get_wizard() in python?
Thanks in advance for your help,
-Tim
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
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