![]() |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The Color
command gets or sets the color of the selected atoms, using a single color, a color gradient or colors read from a file.
It is also possible to color proteins by a large number of properties
, from sequence conservation to packing quality via the PDBFinderII plugin accessible at Analyze
> PDBFinderII properties. Colors are specified using either their name or their number in the rainbow circle,
where 0 is blue, 60 is magenta, 120 is red, 180 is yellow, 240 is green, 300 is cyan and
360 is again blue. Secondary structure elements
get their default colors as long as the Calpha atom also has its default color,
otherwise they inherit the color of the Calpha atom. As the default color of the Calpha carbon
is normally cyan, this approach would not allow to create a cyan ribbon. YASARA therefore checks if all backbone atoms in the residue have the same color. If this is the case,
the ribbon always inherits the Calpha color, even if it's cyan. So to create a cyan ribbon,
make sure that all backbone atoms are colored cyan. There is currently no direct way to avoid that the
secondary structure elements adopt the color of the Calpha, but you can of course
duplicate the object, showing atoms of the first object,
and secondary structure of the second object. When two colors are specified to
create a gradient, the color numbers are linearly interpolated. E.g. ColorRes all,magenta,green will create a gradient from magenta
(60) over red (120) and yellow (180) to green (240). If you want to go in the other direction,
make use of the fact that adding 360 color degrees gives the same color: ColorRes all,
420,green will create a gradient from magenta (60+360) over blue (0+360) and cyan
(300) to green (240). If you absolutely need colors that are not in the rainbow circle,
there are three options:
When coloring by B-factor or occupancy, you can customize the gradient colors using the
ColorPar command. By default, a B-factor of
0 corresponds to blue (cool, frozen) and 70 to yellow (hot, flexible). An occupancy of
100% maps to blue (normal, not interesting) and 0% to yellow (missing atoms).
Coloring by property value
is especially useful in the Twinset, where the results of checks
are stored as atomic properties and can thus easily be mapped onto the structure.
When creating a ray-traced figure, you may want to draw attention away from the protein and focus on something else,
e.g. a bound ligand. YASARA does not support darkened colors, as atoms get darker in the background anyway and it would be very confusing to have dark atoms in the front as well. Instead,
show the protein's secondary structure
and make it transparent in the ray-traced image by choosing a SecAlpha value
around 20. If you use 'fromFile', you must specify a color file. There is no special file format required,
you can give one color per line or separate them with spaces. Just make sure that the file contains enough colors for all units you select. More details about color gradients can be found
in the Essentials section. Example 1:ColorObj 1crn,red Color object 1crn red. Example 2:ColorRes Cys,yellow Color all cysteines yellow. Example 3:ColorRes Obj 1crn,red,blue Color the residues in object 1crn with a gradient, starting with red and going to blue. Each residue gets a unique color.
Example 4:ColorMol Obj GroEL,blue,cyan Color the molecules in object GroEL with a gradient, starting with blue and going to cyan. Each molecule gets a unique color.
Example 5:ColorObj 1crn,Element Color all atoms in object 1crn by their chemical element.
Example 6:ColorObj 5,ResType Color all atoms in object 5 by residue type. Example 7:ColorObj 6,Charge Color all atoms in object 6 by their charge. Example 8:ColorObj 7,Occupancy Color all atoms in object 6 by their occupancy. Example 9:ColorRes SecStr Helix,red,blue,Segments=Yes Color all residues inside a helix with a gradient, starting with red and going to blue. Colors change only at segment boundaries
(=non-selected residues, in this case between helices), so that the first helix will be completely red and the last one completely blue.
Example 10:ColorRes all,fromFile,MyColors Color all residues, reading one color per residue from file MyColors.col or dat/MyColors.col.
Example 11:ColorAtom Mol A,fromFile,MyColors Color all atoms in molecule A, reading one color per atom from file MyColors.col or dat/MyColors.col.
Example 12:col = ColorAtom 1746 Assign color of atom 1746 to variable 'col'. Example 13:col = ColorObj 1crn Assign average color of object 1crn to variable 'col'.
Example macro 1:# EXAMPLE Color Residue Clear LoadPDB 1c9b Style Ribbon,Stick ColorRes All,ResType
Example macro 2:# EXAMPLE Color Atom Clear LoadPDB 1crn ColorAtom All,Blue,Cyan Style Ribbon PosObj 1crn,Z=20
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||