Color

Set Color

The is the primary way to change the color of structures in Molecular Nodes. Colors for cartoon and ribbon are taken from the alpha-carbons of the structures. Change the color of the input atoms, based on a selection and a color field. The color field can be as complex of a calculation as you wish. In the example below the color for the whole structure can be set, or the color can be based on a color for each chain, or the result of mapping a color to an attribute such as b_factor.

Inputs

Name Type Description Default
Atoms Geometry Atomic geometry that contains vertices and edges. required
Selection Bool Selection to update the assigned color for True
Color Color Color to apply to the selected atoms rgb(41, 159, 49)

Outputs

Name Type Description Default
Atoms Geometry Atomic geometry with an updated Color attribute required

Chain

Choose the colors for individual chains in the structure. This node is generated for each particular molecule, so the inputs will look different based on the imported structure. For larger structures with many chains this node may become too large to be practical, in which case you might better use MN_color_entity_id.

Inputs

Name Type Description Default
Chain A Bool Select the atoms in Chain A True
Chain B Bool Select the atoms in Chain B True
Chain ... Bool Select the atoms in Chain … True

Outputs

Name Type Description Default
Selection Bool The calculated selection False
Inverted Bool The inverse of the calculated selection False

Entity

Choose the colors for individual entities in the structure. Multiple chains may be classified as the same entity, if they are copies of the same chain but in different conformations or positions and rotations. The nodes is generated for each individual structure, if entity_id is available.

Inputs

Name Type Description Default
Entity A Color Color to set for Entity A rgb(117, 153, 61)
Entity B Color Color to set for Entity B rgb(61, 153, 146)
... Color Color to set for Entity … rgb(153, 61, 118)

Outputs

Name Type Description Default
Color Color The colors based on entity_id rgb(0, 0, 0)

Ligand

Choose the colors for individual ligands in the structure.

Inputs

Name Type Description Default
Ligand A Color Color to set for Ligand B rgb(117, 153, 61)
Ligand B Color Color to set for Ligand B rgb(61, 153, 146)
... Color Color to set for Ligand … rgb(153, 61, 118)

Outputs

Name Type Description Default
Color Color The colors based on entity_id rgb(0, 0, 0)

Goodsell Colors

Change the inputted color to be darker for non-carbon atoms. Creates a Goodsell Style color scheme for individual chains.

Inputs

Name Type Description Default
Invert Bool Whether to invert the darkening of the colors False
Factor Float Amount to apply the ‘Goodsell Style’ coloring to 0.5
Color Color Color to apply ‘Goodsell’ style colors to rgb(127, 127, 127)

Outputs

Name Type Description Default
Color Color rgb(0, 0, 0)

Attribute Map

Interpolate between two or three colors, based on the value of an attribute field such as b_factor. Choosing the minimum and maximum values with the inputs.

Inputs

Name Type Description Default
Attribute String The attribute use for generating interpolated colors b_factor
Mid Color Bool Wheter to interpolate through the ‘Mid’ color. True
Min Color Color for the minimum value of the attribute rgb(19, 122, 127)
Mid Color Color for the median value of the attribute rgb(127, 127, 127)
Max Color Color for the maximum value of the attribute rgb(127, 40, 14)
From Min Float Interpolate colors from this minimum value of the attribute 0.0
From Max Float Interpolate colors from this maximum value of the attribute 150.0

Outputs

Name Type Description Default
Result Color The mapped color value based on the attribute. rgb(0, 0, 0)

Attribute Random

Generate a random color, based on the given attribute. Control the lightness and saturation of the color with the inputs.

Inputs

Name Type Description Default
Attribute String Attribute to base the random color generation on chain_id
Saturation Float Saturlation level for the random color 0.6
Lightness Float Lightness value for the generated random color 0.6
Seed Int Seed value for the random generation of the colors 0

Outputs

Name Type Description Default
Color Color The randomly generated color based on the input attribute rgb(0, 0, 0)

Backbone

Inputs

Name Type Description Default
Backbone Color rgb(119, 61, 153)
Side Chain Color rgb(134, 153, 61)

Outputs

Name Type Description Default
Color Color rgb(0, 0, 0)

Pldtt

Assigns colors using the b_factor attribute, which contains the pLDTT attribute for models that come from AlphaFold.

Inputs

Name Type Description Default
<50 Color Color for pLDTT < 50 rgb(255, 52, 15)
<70 Color Color for 50 < pLDTT < 70 rgb(255, 180, 1)
<90 Color Color for 70 < pLDTT < 90 rgb(33, 152, 228)
>90 Color Color for 90 < pLDTT rgb(0, 22, 171)

Outputs

Name Type Description Default
Color Color Assigned color based on the pLDTT score rgb(0, 0, 0)

Secondary Structure

Choose a color for the different secondary structures, based on the sec_struct attribute.

Inputs

Name Type Description Default
Alpha Helix Color Color to set for alpha helices rgb(41, 159, 49)
Beta Sheet Color Color to set for beta-sheets rgb(255, 38, 38)
Loop Color Color to set for loops rgb(43, 93, 203)

Outputs

Name Type Description Default
Color Color The colors based on secondary structure rgb(0, 0, 0)

Element

Choose a color for each of the first 20 elements on the periodic table. For higher atomic number elements use MN_color_atomic_number.

Inputs

Name Type Description Default
Hydrogen Color Color to set for the element Hydrogen rgb(255, 255, 255)
Helium Color Color to set for the element Helium rgb(24, 24, 24)
Lithium Color Color to set for the element Lithium rgb(29, 56, 47)
Berylium Color Color to set for the element Berylium rgb(35, 86, 109)
Boron Color Color to set for the element Boron rgb(71, 38, 26)
Carbon Color Color to set for the element Carbon rgb(51, 51, 51)
Nitrogen Color Color to set for the element Nitrogen rgb(32, 52, 204)
Oxygen Color Color to set for the element Oxygen rgb(204, 17, 17)
Fluorine Color Color to set for the element Fluorine rgb(46, 194, 86)
Neon Color Color to set for the element Neon rgb(23, 159, 33)
Sodium Color Color to set for the element Sodium rgb(9, 43, 104)
Magnesium Color Color to set for the element Magnesium rgb(13, 13, 13)
Aluminium Color Color to set for the element Aluminium rgb(134, 115, 126)
Silicon Color Color to set for the element Silicon rgb(91, 77, 24)
Phosphorous Color Color to set for the element Phosphorous rgb(204, 43, 133)
Sulfur Color Color to set for the element Sulfur rgb(204, 184, 13)
Chlroine Color Color to set for the element Chlroine rgb(27, 255, 29)
Argon Color Color to set for the element Argon rgb(134, 34, 104)
Potassium Color Color to set for the element Potassium rgb(21, 93, 162)
Calcium Color Color to set for the element Calcium rgb(17, 38, 142)

Outputs

Name Type Description Default
Color Color rgb(0, 0, 0)

Atomic Number

Choose a color for an individual element. Select the element based on atomic_number. Useful for higher atomic number elements which are less commonly found in structures.

Inputs

Name Type Description Default
atomic_number Int 6
Color Color rgb(204, 204, 204)

Outputs

Name Type Description Default
Color Color rgb(0, 0, 0)

Res Name Peptide

Choose a color for each of the 20 naturally occurring amino acids. Non AA atoms will retain their currently set color.

Inputs

Name Type Description Default
ALA Color Color to set the atoms in AA ALA rgb(214, 91, 184)
ARG Color Color to set the atoms in AA ARG rgb(92, 91, 214)
ASN Color Color to set the atoms in AA ASN rgb(91, 208, 214)
ASP Color Color to set the atoms in AA ASP rgb(91, 163, 214)
CYS Color Color to set the atoms in AA CYS rgb(91, 214, 179)
GLU Color Color to set the atoms in AA GLU rgb(91, 214, 125)
GLN Color Color to set the atoms in AA GLN rgb(138, 91, 214)
GLY Color Color to set the atoms in AA GLY rgb(151, 91, 214)
HIS Color Color to set the atoms in AA HIS rgb(137, 214, 91)
ILE Color Color to set the atoms in AA ILE rgb(214, 204, 91)
LEU Color Color to set the atoms in AA LEU rgb(173, 214, 91)
LYS Color Color to set the atoms in AA LYS rgb(214, 91, 113)
MET Color Color to set the atoms in AA MET rgb(91, 214, 209)
PHE Color Color to set the atoms in AA PHE rgb(214, 91, 161)
PRO Color Color to set the atoms in AA PRO rgb(138, 214, 91)
SER Color Color to set the atoms in AA SER rgb(91, 214, 198)
THR Color Color to set the atoms in AA THR rgb(214, 205, 91)
TRP Color Color to set the atoms in AA TRP rgb(91, 183, 214)
TYR Color Color to set the atoms in AA TYR rgb(214, 114, 91)
VAL Color Color to set the atoms in AA VAL rgb(214, 179, 91)

Outputs

Name Type Description Default
Color Color Color based on the res_name attribute rgb(0, 0, 0)

Res Name Nucleic

Choose a color for each of the nucleic acids. Non nucleic acid atoms will retain their currently set color.

Inputs

Name Type Description Default
A Color rgb(70, 139, 203)
C Color rgb(75, 204, 47)
G Color rgb(204, 60, 42)
T / U Color rgb(204, 68, 134)

Outputs

Name Type Description Default
Color Color rgb(0, 0, 0)

Element Common

Choose a color for each of the common elements. This is a smaller convenience node for elements which commonly appear in macromolecular structures. Use MN_color_element for the first 20 elements and MN_color_atomic_number for individual elements with higher atomic numbers.

Inputs

Name Type Description Default
Hydrogen Color Color to set for the element Hydrogen rgb(255, 255, 255)
Carbon Color Color to set for the element Carbon rgb(51, 51, 51)
Nitrogen Color Color to set for the element Nitrogen rgb(40, 59, 204)
Oxygen Color Color to set for the element Oxygen rgb(204, 41, 40)
Phosphorous Color Color to set for the element Phosphorous rgb(204, 43, 133)
Sulfur Color Color to set for the element Sulfur rgb(204, 184, 13)

Outputs

Name Type Description Default
Color Color The output colors for the common elements rgb(0, 0, 0)