[Chimera-users] coloring mmCIF files
Elaine Meng
meng at cgl.ucsf.edu
Wed Jun 26 10:20:29 PDT 2019
Hi Josef,
(A) If the plan is to continue using bfactor, then look in standard mmCIF files and just replace the bfactor values with the conservation values. Then the Chimera commands would be exactly the same as they are now.
This is really a question about mmCIF format rather than Chimera. I’m no expert on mmCIF format specifically, but when I look at mmCIF files downloaded from RCSB PDB I see they have ATOM lines that are similar to the ones in PDB files. E.g. the first two for 1ZIK in mmCIF are
ATOM 1 N N . ARG A 1 1 ? 39.645 15.539 14.173 1.00 56.87 ? 1 ARG A N 1
ATOM 2 C CA . ARG A 1 1 ? 38.422 14.946 14.705 1.00 62.98 ? 1 ARG A CA 1
whereas in PDB for same structure
ATOM 1 N ARG A 1 39.645 15.539 14.173 1.00 56.87 N
ATOM 2 CA ARG A 1 38.422 14.946 14.705 1.00 62.98 C
The bfactor values are 56.87 and 62.98, so I guess you would just replace them with the conservation values analogous to how you’ve been doing it for PDB files.
However, mmCIF is more complicated since the columns might not always be the same and there are a bunch of “_atom_site” lines that stipulate what they are. More about mmCIF format here:
<http://mmcif.wwpdb.org/docs/faqs/pdbx-mmcif-faq-general.html>
(B) The alternative approach available in Chimera is to not mess with the PDB or mmCIF file at all. Instead you can create your own custom attribute (i.e. doesn’t have to be bfactor, can be named whatever you like) using an “attribute assignment file” (simple text file format) read in with the command “defattr"
<http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/midas/defattr.html>
File format described here
<http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/defineattrib/defineattrib.html#attrfile>
Example file for assigning residue attribute named “percentExposed”
<http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/defineattrib/percentExposed.txt>
The first column in the assignment lines is just a residue specifier, e.g. :1 for residue 1, :1.A for residue 1 in chain A. The defattr command is used to read in this file.
Then your Chimera commands would be basically the same except for the name of the attribute (let’s say you named it “blah”) and now you’re coloring by residue attribute instead of atom attribute, so someting like:
color CONS1 :/blah=1
color CONS2 :/blah=2
One consideration may be whether you or the webservice users would like to start using ChimeraX. Currently it can read bfactor and use it for coloring, as well as take custom color definitions (like approach “A”) although the command syntax would then slightly different for both of those things. If you took approach A, however, people can always just do the coloring themselves in ChimeraX after reading in the PDB or mmCIF file with the modified bfactors. ChimeraX commands:
— for residue attribute —
color name cons1 80,20,80
color ::blah=1 cons1
— or for atom attribute —
color name cons2 100,20,20
color @@bfactor=2 cons2
ChimeraX does not yet read an attribute definition file (like approach “B”) but we plan to have something like that in the future.
ChimeraX: <http://www.rbvi.ucsf.edu/chimerax/index.html>
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On Jun 26, 2019, at 6:13 AM, Josef Sprinzak <josefspr at hotmail.com> wrote:
>
> Dear Chimera Support
> I am a developer of consurf (http://consurf.tau.ac.il/) for displaying evolutionary conservation of amino/nucleic acid positions in a protein/DNA.
> Till now we have been working with PDB files and inserting the coloring values in the b-factor (temperature) field in the ATOM part.
> In the chimera script we use the color commands:
> color CONS1 @/bfactor=1
> color CONS2 @/bfactor=2
> color CONS3 @/bfactor=3
> ...
> Now we wish to start using mmCIF files. Where should we insert the coloring values in the mmCIF file, and how do we reference then with the chimera commands ?
> Best
> Josef
More information about the Chimera-users
mailing list