The new color map file format to create RawV files
Two types of entries (1 per line and can be mixed):
1. Comment:
# This entire line is a comment since it starts with a '#' symbol.
# Such lines are VERY VERY important.
# The color map depends on indices, which could change if our parser changes
# ( Not our fault, blame the PDB ). If the parser changes, the old colormaps
# may not do what is desired. So, if there are good comments as to what is
# being trying to be achieved, one could modify color maps more easily.
# Moral of the story - add comments.
2. Actual color map entries:
Molecule Chain
SecondaryStructure Residue Atom
Red Green Blue
Alpha
Description of color map entry:
Field | What it contains | Type |
Molecule | Index | Integer |
Chain | Index in Molecule+Identifier | Integer+"Alphabet" |
Use Index, if Identifier doesn't match, print error, but continue | ||
SecondaryStructure | Not being used. Use 0 if required. | Integer |
Residue | Index in PDB file | Integer+"XXX" |
Use Index, if Name doesnt match, print error, but continue | ||
Atom | Name+Index in Residue | "XXXX"+Integer |
Name could be "XXXX". If it is, we look up using Index | ||
Red | 0-1 | Double |
Green | 0-1 | Double |
Blue | 0-1 | Double |
Alpha | 0-1 | Double |
Example:
# Hemoglobin molecule
# Make the entire molecule Red
"0" "" "" "" "" "" "" "" "1.0" "0.0" "0.0" "1.0"
# Make this atom blue
"0" "1" "B" "0" "6" "GLU" " N " "0" "0.0" "0.0" "1.0" "1.0"
# The above hierarchical description makes everything red
# except the N in the residue with index 6, (which should be GLU) in chain 1 (which should be B) in molecule 0.
Conventions:
1. By default a molecule is initially transparent.
2. If a field has multiple Ids, pick the first. If the second doesn't match, print error, but continue parsing.
If the element could not be found, just skip that line in
color map and continue after printing an error.
3. In the case of Atoms, if the Name is XXXX, use index instead.
4. If a field is blank ( ie "" ), apply to all children.
5. Newer entries can override the specifications of a previous one, but not of its children.
For example, if we set a molecule to red, then a chain to blue then the molecule to green, we will
get a green molecule with a blue chain. The chain's color is not overwritten. This is to make implementation
simpler.
6. We don't allow "0" "" "1" etc. for now, although this is useful. This could be changed later.
Other comments:
We use the notation "<whatever>" because fields like Atoms can have spaces in them.