Re: [PyMOL] count_atoms and states

2019-08-15 Thread Pedro Lacerda
Hi,

Thank you for your effort.

This would be the very best option? Thinking the use case that users need
all the states would be a lot harder.

I would rather let state 0 refer to all the states like now, but upper
nonexistent states give an error. This would remove some errors by 1, and
would work as is for single state objects.

Em qui, 15 de ago de 2019 05:56, Thomas Holder <
thomas.hol...@schrodinger.com> escreveu:

>
> > On Aug 12, 2019, at 2:56 PM, Christian Cole French <
> christian.fre...@schrodinger.com> wrote:
> >
> > Maybe the nonexistent state warning is something that should be
> implemented elsewhere as well.
>
> Selecting state 0 is now an error:
>
>
> https://github.com/schrodinger/pymol-open-source/commit/c09ce287d447e6c703e57d31ae3e5d53f8359ee1
>
> Cheers,
>   Thomas
>
> --
> 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

Re: [PyMOL] count_atoms and states

2019-08-15 Thread Thomas Holder

> On Aug 12, 2019, at 2:56 PM, Christian Cole French 
>  wrote:
> 
> Maybe the nonexistent state warning is something that should be implemented 
> elsewhere as well.

Selecting state 0 is now an error:

https://github.com/schrodinger/pymol-open-source/commit/c09ce287d447e6c703e57d31ae3e5d53f8359ee1

Cheers,
  Thomas

--
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

Re: [PyMOL] count_atoms and states

2019-08-12 Thread Christian "Cole" French
Thanks for the info. I also didn't realize that states started at 1. Maybe
the nonexistent state warning is something that should be implemented
elsewhere as well.

As for the implicit *or*, you can find it in
https://pymolwiki.org/index.php/Selection_Algebra#Selection_Operator/Modifier_Table
under the *Logical* section. I agree that it can be easy to miss—good thing
you caught this behavior in your code.

Have a great day,
Cole

On Fri, Aug 9, 2019 at 6:34 PM Pedro Lacerda  wrote:

> So missing boolean operators are filled with OR, for me this is should be
> a big and loud WARNING. I almost messed everything up because it almost
> passed in my tests.
>
> Also I mistake states a couple of days on multi-model files because I was
> counting from ZERO but states starts on ONE. That was until I needed
> get_area, it properly stated that my states were nonexistant.
>
> So these were my personal thoughts and issues about.
>
> Have a nice weekend!
>
> Em sex, 9 de ago de 2019 12:41, Pedro Lacerda 
> escreveu:
>
>> Question answered.
>>
>> Best regards!
>>
>> Em sex, 9 de ago de 2019 às 12:33, Christian "Cole" French <
>> christian.fre...@schrodinger.com> escreveu:
>>
>>> Hi Pedro,
>>>
>>> *count_states* is correct here; there's only 1 state, which is state 1.
>>> The reason for the observed *count_atoms* behavior is that "polymer"
>>> and "state" are different operators in the selection algebra, so putting
>>> them together without a logical operator such as "and" or "or" between them
>>> indicates an implicit "or". So you're actually counting atoms which match
>>> "polymer" *or* "state X", which is why the number only goes up to 8627
>>> when you count state 1.
>>>
>>> This might clear up your scope question as well, but please indicate if
>>> otherwise.
>>>
>>> Best,
>>> Cole
>>>
>>> On Fri, Aug 9, 2019 at 10:55 AM Pedro Lacerda 
>>> wrote:
>>>
 I'm also puzzled by the scope of state:

 *PyMOL>count_atoms polymer state 1 within 5 of resn NAP*
>  count_atoms: 8205 atoms
>
> *PyMOL>count_atoms polymer state 1 within 0 of resn NAP*
>  count_atoms: 8109 atoms
>
> *PyMOL>count_atoms polymer (state 1) within 0 of resn NAP*
>  count_atoms: 8109 atoms
>
> *PyMOL>count_atoms (polymer (state 1)) within 0 of resn NAP*
>  count_atoms: 192 atoms
>
> *PyMOL>count_atoms (polymer (state 0)) within 0 of resn NAP*
>  count_atoms: 0 atoms
>

 Em sex, 9 de ago de 2019 às 11:31, Pedro Lacerda 
 escreveu:

> Hi,
>
> There is only one state but the atom counting changes between states
> 0, 1 and 2.
>
>
> What this means?
>
> *PyMOL>fetch 1e92*
>>
>> TITLE Pteridine reductase 1 from Leishmania major complexed with 
>> NADP+ and dihydrobiopterin
>>  ExecutiveLoad-Detail: Detected mmCIF
>>  CmdLoad: loaded as "1e92".
>>
>> *PyMOL>count_atoms polymer state 0*
>>  count_atoms: 7917 atoms
>>
>> *PyMOL>count_atoms polymer state 1*
>>  count_atoms: 8627 atoms
>>
> *PyMOL>count_atoms polymer state 2*
>>  count_atoms: 7917 atoms
>>
> *PyMOL>count_states *
>>  cmd.count_states: 1 states.
>>
>
> --
> Pedro Sousa Lacerda
>
>
> *Laboratório de Bioinformática e Modelagem Molecular*
> *Faculdade de Farmácia / UFBA*
>
> *@pslacerda*
>
> *+55 71 9 9981-1856*
>


 --
 Pedro Sousa Lacerda


 *Laboratório de Bioinformática e Modelagem Molecular*
 *Faculdade de Farmácia / UFBA*

 *@pslacerda*

 *+55 71 9 9981-1856*
 ___
 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
>>>
>>>
>>
>> --
>> Pedro Sousa Lacerda
>>
>>
>> *Laboratório de Bioinformática e Modelagem Molecular*
>> *Faculdade de Farmácia / UFBA*
>>
>> *@pslacerda*
>>
>> *+55 71 9 9981-1856*
>>
> ___
> 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
___
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

Re: [PyMOL] count_atoms and states

2019-08-09 Thread Pedro Lacerda
So missing boolean operators are filled with OR, for me this is should be a
big and loud WARNING. I almost messed everything up because it almost
passed in my tests.

Also I mistake states a couple of days on multi-model files because I was
counting from ZERO but states starts on ONE. That was until I needed
get_area, it properly stated that my states were nonexistant.

So these were my personal thoughts and issues about.

Have a nice weekend!

Em sex, 9 de ago de 2019 12:41, Pedro Lacerda 
escreveu:

> Question answered.
>
> Best regards!
>
> Em sex, 9 de ago de 2019 às 12:33, Christian "Cole" French <
> christian.fre...@schrodinger.com> escreveu:
>
>> Hi Pedro,
>>
>> *count_states* is correct here; there's only 1 state, which is state 1.
>> The reason for the observed *count_atoms* behavior is that "polymer" and
>> "state" are different operators in the selection algebra, so putting them
>> together without a logical operator such as "and" or "or" between them
>> indicates an implicit "or". So you're actually counting atoms which match
>> "polymer" *or* "state X", which is why the number only goes up to 8627
>> when you count state 1.
>>
>> This might clear up your scope question as well, but please indicate if
>> otherwise.
>>
>> Best,
>> Cole
>>
>> On Fri, Aug 9, 2019 at 10:55 AM Pedro Lacerda 
>> wrote:
>>
>>> I'm also puzzled by the scope of state:
>>>
>>> *PyMOL>count_atoms polymer state 1 within 5 of resn NAP*
  count_atoms: 8205 atoms

 *PyMOL>count_atoms polymer state 1 within 0 of resn NAP*
  count_atoms: 8109 atoms

 *PyMOL>count_atoms polymer (state 1) within 0 of resn NAP*
  count_atoms: 8109 atoms

 *PyMOL>count_atoms (polymer (state 1)) within 0 of resn NAP*
  count_atoms: 192 atoms

 *PyMOL>count_atoms (polymer (state 0)) within 0 of resn NAP*
  count_atoms: 0 atoms

>>>
>>> Em sex, 9 de ago de 2019 às 11:31, Pedro Lacerda 
>>> escreveu:
>>>
 Hi,

 There is only one state but the atom counting changes between states 0,
 1 and 2.


 What this means?

 *PyMOL>fetch 1e92*
>
> TITLE Pteridine reductase 1 from Leishmania major complexed with 
> NADP+ and dihydrobiopterin
>  ExecutiveLoad-Detail: Detected mmCIF
>  CmdLoad: loaded as "1e92".
>
> *PyMOL>count_atoms polymer state 0*
>  count_atoms: 7917 atoms
>
> *PyMOL>count_atoms polymer state 1*
>  count_atoms: 8627 atoms
>
 *PyMOL>count_atoms polymer state 2*
>  count_atoms: 7917 atoms
>
 *PyMOL>count_states *
>  cmd.count_states: 1 states.
>

 --
 Pedro Sousa Lacerda


 *Laboratório de Bioinformática e Modelagem Molecular*
 *Faculdade de Farmácia / UFBA*

 *@pslacerda*

 *+55 71 9 9981-1856*

>>>
>>>
>>> --
>>> Pedro Sousa Lacerda
>>>
>>>
>>> *Laboratório de Bioinformática e Modelagem Molecular*
>>> *Faculdade de Farmácia / UFBA*
>>>
>>> *@pslacerda*
>>>
>>> *+55 71 9 9981-1856*
>>> ___
>>> 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
>>
>>
>
> --
> Pedro Sousa Lacerda
>
>
> *Laboratório de Bioinformática e Modelagem Molecular*
> *Faculdade de Farmácia / UFBA*
>
> *@pslacerda*
>
> *+55 71 9 9981-1856*
>
___
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

Re: [PyMOL] count_atoms and states

2019-08-09 Thread Christian "Cole" French
Hi Pedro,

*count_states* is correct here; there's only 1 state, which is state 1. The
reason for the observed *count_atoms* behavior is that "polymer" and
"state" are different operators in the selection algebra, so putting them
together without a logical operator such as "and" or "or" between them
indicates an implicit "or". So you're actually counting atoms which match
"polymer" *or* "state X", which is why the number only goes up to 8627 when
you count state 1.

This might clear up your scope question as well, but please indicate if
otherwise.

Best,
Cole

On Fri, Aug 9, 2019 at 10:55 AM Pedro Lacerda  wrote:

> I'm also puzzled by the scope of state:
>
> *PyMOL>count_atoms polymer state 1 within 5 of resn NAP*
>>  count_atoms: 8205 atoms
>>
>> *PyMOL>count_atoms polymer state 1 within 0 of resn NAP*
>>  count_atoms: 8109 atoms
>>
>> *PyMOL>count_atoms polymer (state 1) within 0 of resn NAP*
>>  count_atoms: 8109 atoms
>>
>> *PyMOL>count_atoms (polymer (state 1)) within 0 of resn NAP*
>>  count_atoms: 192 atoms
>>
>> *PyMOL>count_atoms (polymer (state 0)) within 0 of resn NAP*
>>  count_atoms: 0 atoms
>>
>
> Em sex, 9 de ago de 2019 às 11:31, Pedro Lacerda 
> escreveu:
>
>> Hi,
>>
>> There is only one state but the atom counting changes between states 0, 1
>> and 2.
>>
>>
>> What this means?
>>
>> *PyMOL>fetch 1e92*
>>>
>>> TITLE Pteridine reductase 1 from Leishmania major complexed with NADP+ 
>>> and dihydrobiopterin
>>>  ExecutiveLoad-Detail: Detected mmCIF
>>>  CmdLoad: loaded as "1e92".
>>>
>>> *PyMOL>count_atoms polymer state 0*
>>>  count_atoms: 7917 atoms
>>>
>>> *PyMOL>count_atoms polymer state 1*
>>>  count_atoms: 8627 atoms
>>>
>> *PyMOL>count_atoms polymer state 2*
>>>  count_atoms: 7917 atoms
>>>
>> *PyMOL>count_states *
>>>  cmd.count_states: 1 states.
>>>
>>
>> --
>> Pedro Sousa Lacerda
>>
>>
>> *Laboratório de Bioinformática e Modelagem Molecular*
>> *Faculdade de Farmácia / UFBA*
>>
>> *@pslacerda*
>>
>> *+55 71 9 9981-1856*
>>
>
>
> --
> Pedro Sousa Lacerda
>
>
> *Laboratório de Bioinformática e Modelagem Molecular*
> *Faculdade de Farmácia / UFBA*
>
> *@pslacerda*
>
> *+55 71 9 9981-1856*
> ___
> 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
___
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

Re: [PyMOL] count_atoms and states

2019-08-09 Thread Pedro Lacerda
Question answered.

Best regards!

Em sex, 9 de ago de 2019 às 12:33, Christian "Cole" French <
christian.fre...@schrodinger.com> escreveu:

> Hi Pedro,
>
> *count_states* is correct here; there's only 1 state, which is state 1.
> The reason for the observed *count_atoms* behavior is that "polymer" and
> "state" are different operators in the selection algebra, so putting them
> together without a logical operator such as "and" or "or" between them
> indicates an implicit "or". So you're actually counting atoms which match
> "polymer" *or* "state X", which is why the number only goes up to 8627
> when you count state 1.
>
> This might clear up your scope question as well, but please indicate if
> otherwise.
>
> Best,
> Cole
>
> On Fri, Aug 9, 2019 at 10:55 AM Pedro Lacerda  wrote:
>
>> I'm also puzzled by the scope of state:
>>
>> *PyMOL>count_atoms polymer state 1 within 5 of resn NAP*
>>>  count_atoms: 8205 atoms
>>>
>>> *PyMOL>count_atoms polymer state 1 within 0 of resn NAP*
>>>  count_atoms: 8109 atoms
>>>
>>> *PyMOL>count_atoms polymer (state 1) within 0 of resn NAP*
>>>  count_atoms: 8109 atoms
>>>
>>> *PyMOL>count_atoms (polymer (state 1)) within 0 of resn NAP*
>>>  count_atoms: 192 atoms
>>>
>>> *PyMOL>count_atoms (polymer (state 0)) within 0 of resn NAP*
>>>  count_atoms: 0 atoms
>>>
>>
>> Em sex, 9 de ago de 2019 às 11:31, Pedro Lacerda 
>> escreveu:
>>
>>> Hi,
>>>
>>> There is only one state but the atom counting changes between states 0,
>>> 1 and 2.
>>>
>>>
>>> What this means?
>>>
>>> *PyMOL>fetch 1e92*

 TITLE Pteridine reductase 1 from Leishmania major complexed with NADP+ 
 and dihydrobiopterin
  ExecutiveLoad-Detail: Detected mmCIF
  CmdLoad: loaded as "1e92".

 *PyMOL>count_atoms polymer state 0*
  count_atoms: 7917 atoms

 *PyMOL>count_atoms polymer state 1*
  count_atoms: 8627 atoms

>>> *PyMOL>count_atoms polymer state 2*
  count_atoms: 7917 atoms

>>> *PyMOL>count_states *
  cmd.count_states: 1 states.

>>>
>>> --
>>> Pedro Sousa Lacerda
>>>
>>>
>>> *Laboratório de Bioinformática e Modelagem Molecular*
>>> *Faculdade de Farmácia / UFBA*
>>>
>>> *@pslacerda*
>>>
>>> *+55 71 9 9981-1856*
>>>
>>
>>
>> --
>> Pedro Sousa Lacerda
>>
>>
>> *Laboratório de Bioinformática e Modelagem Molecular*
>> *Faculdade de Farmácia / UFBA*
>>
>> *@pslacerda*
>>
>> *+55 71 9 9981-1856*
>> ___
>> 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
>
>

-- 
Pedro Sousa Lacerda


*Laboratório de Bioinformática e Modelagem Molecular*
*Faculdade de Farmácia / UFBA*

*@pslacerda*

*+55 71 9 9981-1856*
___
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

Re: [PyMOL] count_atoms and states

2019-08-09 Thread Pedro Lacerda
I'm also puzzled by the scope of state:

*PyMOL>count_atoms polymer state 1 within 5 of resn NAP*
>  count_atoms: 8205 atoms
>
> *PyMOL>count_atoms polymer state 1 within 0 of resn NAP*
>  count_atoms: 8109 atoms
>
> *PyMOL>count_atoms polymer (state 1) within 0 of resn NAP*
>  count_atoms: 8109 atoms
>
> *PyMOL>count_atoms (polymer (state 1)) within 0 of resn NAP*
>  count_atoms: 192 atoms
>
> *PyMOL>count_atoms (polymer (state 0)) within 0 of resn NAP*
>  count_atoms: 0 atoms
>

Em sex, 9 de ago de 2019 às 11:31, Pedro Lacerda 
escreveu:

> Hi,
>
> There is only one state but the atom counting changes between states 0, 1
> and 2.
>
>
> What this means?
>
> *PyMOL>fetch 1e92*
>>
>> TITLE Pteridine reductase 1 from Leishmania major complexed with NADP+ 
>> and dihydrobiopterin
>>  ExecutiveLoad-Detail: Detected mmCIF
>>  CmdLoad: loaded as "1e92".
>>
>> *PyMOL>count_atoms polymer state 0*
>>  count_atoms: 7917 atoms
>>
>> *PyMOL>count_atoms polymer state 1*
>>  count_atoms: 8627 atoms
>>
> *PyMOL>count_atoms polymer state 2*
>>  count_atoms: 7917 atoms
>>
> *PyMOL>count_states *
>>  cmd.count_states: 1 states.
>>
>
> --
> Pedro Sousa Lacerda
>
>
> *Laboratório de Bioinformática e Modelagem Molecular*
> *Faculdade de Farmácia / UFBA*
>
> *@pslacerda*
>
> *+55 71 9 9981-1856*
>


-- 
Pedro Sousa Lacerda


*Laboratório de Bioinformática e Modelagem Molecular*
*Faculdade de Farmácia / UFBA*

*@pslacerda*

*+55 71 9 9981-1856*
___
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

[PyMOL] count_atoms and states

2019-08-09 Thread Pedro Lacerda
Hi,

There is only one state but the atom counting changes between states 0, 1
and 2.


What this means?

*PyMOL>fetch 1e92*
>
> TITLE Pteridine reductase 1 from Leishmania major complexed with NADP+ 
> and dihydrobiopterin
>  ExecutiveLoad-Detail: Detected mmCIF
>  CmdLoad: loaded as "1e92".
>
> *PyMOL>count_atoms polymer state 0*
>  count_atoms: 7917 atoms
>
> *PyMOL>count_atoms polymer state 1*
>  count_atoms: 8627 atoms
>
*PyMOL>count_atoms polymer state 2*
>  count_atoms: 7917 atoms
>
*PyMOL>count_states *
>  cmd.count_states: 1 states.
>

-- 
Pedro Sousa Lacerda


*Laboratório de Bioinformática e Modelagem Molecular*
*Faculdade de Farmácia / UFBA*

*@pslacerda*

*+55 71 9 9981-1856*
___
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