Hi Thomas,

With regard to selections, sometimes a residue has missing atoms or is
non-standard amino acid. In the first case it is matched with another
residue in a second structure during the alignment and then when I try to
fit the two selections of atoms from the two structures I get the following
error:

 Calculating RMSD between pocket of model 2hduA and 2r9wA.
> ExecutiveRMS-Error: Atom counts between selections don't match (799 vs 797)
>  Executive: Error -- no atoms left after refinement!
> RMSD = -1.000000


Can you think of a clever way to exclude amino acids with missing atoms or
non-standard ones from pair_fit() or rms_cur()?

Best,
Thomas





On Fri, 22 Feb 2019 at 12:32, Thomas Holder <thomas.hol...@schrodinger.com>
wrote:

> Hi Thomas,
>
> In general, the PyMOL API should raise pymol.CmdException if things go
> wrong. But in case of cmd.pair_fit() this wasn't happening (see my fix that
> I pushed few minutes ago:
> https://github.com/schrodinger/pymol-open-source/commit/b26d91c40d20344fef511ea9d6bb664a93f1bb4a
> )
>
> cmd.select() correctly raises an exception, so if you want to make a
> script more robust against selection failures, you could always create a
> named selection first to check if it's valid.
>
> tmpsele1 = cmd.get_unused_name('_sele1')
> try:
>     cmd.select(tmpsele1, someexpression, 0)
> except pymol.CmdException:
>     print('invalid selection')
> finally:
>     cmd.delete(tmpsele1)
>
>
> Cheers,
>   Thomas
>
> > On Feb 22, 2019, at 12:11 PM, Thomas Evangelidis <teva...@gmail.com>
> wrote:
> >
> > Hi Thomas,
> >
> > This is great! I can even include more atom types in the selection.
> > Just for the record, is it possible to catch PyMOL exceptions like
> "Selector-Error" from within a Python script? Is there any general strategy
> to select which exception type to look for? In the past, I was catching
> exceptions from 'tmalign' with "except AssertionError:" which doesn't work
> for "Selector-Error".
> >
> > Best,
> > Thomas
> >
> >
> > --
> > ======================================================================
> > Dr Thomas Evangelidis
> > Research Scientist
> > IOCB - Institute of Organic Chemistry and Biochemistry of the Czech
> Academy of Sciences
> > Prague, Czech Republic
> >   &
> > CEITEC - Central European Institute of Technology
> > Brno, Czech Republic
> >
> > email: teva...@gmail.com
> > website: https://sites.google.com/site/thomasevangelidishomepage/
>
> --
> Thomas Holder
> PyMOL Principal Developer
> Schrödinger, Inc.
>
>

-- 

======================================================================

Dr Thomas Evangelidis

Research Scientist

IOCB - Institute of Organic Chemistry and Biochemistry of the Czech Academy
of Sciences <https://www.uochb.cz/web/structure/31.html?lang=en>
Prague, Czech Republic
  &
CEITEC - Central European Institute of Technology <https://www.ceitec.eu/>
Brno, Czech Republic

email: teva...@gmail.com

website: https://sites.google.com/site/thomasevangelidishomepage/
_______________________________________________
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