This is a read-only mirror of pymolwiki.org

Difference between revisions of "Ignore case"

From PyMOL Wiki
Jump to navigation Jump to search
(created)
 
m (1 revision)
(No difference)

Revision as of 20:23, 9 July 2015

The ignore_case setting (default: on) controls whether PyMOL does case sensitive matching of atomic identifiers and selection operators in the selection language. Most notably, it affects whether chain identifiers are matched case sensitive, which becomes relevant when using upper and lower case chain identifiers in a structure with more than 26 chains.

The default value was changed to off in Open-Source PyMOL svn revision 4123 (unstable version 1.7.7.1) and will also be changed in the next official release. With more and more "big" structures in the PDB, the old default was not practical anymore and led to confusion and unexpected results.

Example

Load 1a00 which has chains A, B, C, D

PyMOL>fetch 1a00, async=0

1) case insensitive selection language (default for PyMOL <= 1.7.6)

PyMOL>set ignore_case
 Setting: ignore_case set to on.
PyMOL>count_atoms chain A
 count_atoms: 1164 atoms
PyMOL>count_atoms chain a
 count_atoms: 1164 atoms

2) case sensitive selection language (default for PyMOL > 1.7.6)

PyMOL>set ignore_case, off
 Setting: ignore_case set to off.
PyMOL>count_atoms chain A
 count_atoms: 1164 atoms
PyMOL>count_atoms chain a
 count_atoms: 0 atoms

Best Practice for Scripting

When writing scripts or plugins, all selection expressions should be strict about case (e.g. "name CA" and not "name ca") to not depend on the users setting of ignore_case.