• VMD how-to

home  contact

  Cursus  
  Research  
  Tools  
  Tutorials  

*
Copyright © 2003 Nicolas Sapay
last modified : apr 2006
wabmaster: n.sapay
  • Color a structure by chemical groups

    • aim color chemical groups (amonium, hydroxyl, ...) in residue side chains of a selection
    • principle assign a new segment name to each atom of particular chemical group and color "by segname"
      1. define macro atom selections for each chemical group you want to depict : ammonium, hydroxyl, ...
      2. asssign a new segment name to each atom of each chemical groups defined previously. For example, ammonium atoms will belong to the "AMMONIUM" segment
      3. define a color for each segment you have defines. For example, the AMMONIUM segment will be depicted in blue
      4. color your structure "by segname" in the VMD representation menu
    • example The text in grey can be copy and paste in your VMD configuration file (.vmdrc or vmd.rc)
      • 1. define a macro atom selection for each chemical group
        #CHEMICAL GROUPS IN PROTEINS ...................................................
        atomselect macro hydroxyl        {(resname SER THR and name OG OG1 HG HG1) or (resname TYR and name OH HH)}
        atomselect macro amine           {resname TRP and name NE1 HE1}
        atomselect macro sulphydryl      {resname CYS and name SG HG}
        atomselect macro amide           {(resname ASN and name CG OD1 ND2 HD21 HD22) or (resname GLN and name CD OE1 NE2 HE21 HE22)}
        atomselect macro ammonium        {resname LYS and name NZ HZ1 HZ2 HZ3}
        atomselect macro guanidium       {resname ARG and name NE HE CZ NH1 HH11 HH12 NH2 HH21 HH22}
        atomselect macro carboxyl        {(resname ASP and name CG OD1 OD2 HD2) or (resname GLU and name CD OE1 OE2 HE2)}
        atomselect macro imidazol        {resname HIS HSD HSE and name CG ND1 HD1 CD2 HD2 CE1 HE1 NE2 HE2}
        atomselect macro phenyl          {(resname TYR and name CG CD1 HD1 CD2 HD2 CE1 HE1 CE2 HE2 CZ OH HH) or (resname PHE and name CG CD1 HD1 CD2 HD2 CE1 HE1 CE2 HE2 CZ HZ)}
        atomselect macro indol           {resname TRP and name CG CD1 HD1 CD2 NE1 HE1 CE2 CE3 HE3 CZ2 HZ2 CZ3 HZ3 CH2 HH2}
        atomselect macro imide           {resname PRO}
        #CHEMICAL GROUPS IN LIPIDS .....................................................
        atomselect macro methyl3ammonium {lipid and name N C12 H21 H22 H23 C13 H31 H32 H33 C14 H41 H42 H43}
        atomselect macro phosphate       {lipid and name P1 O1 O2 O3 O4}
        atomselect macro glycerol        {lipid and name C2 C21 O21 O22 HS C3 C31 O31 O32 HX HY}
        atomselect macro oleate          {lipid and name C22 H2R H2S C23 C24 C25 C26 C27 C28 C29 C210 C211 C212 C213 C214 C215 C216 C217 C218}
        atomselect macro palmitate       {lipid and name C32 H2X H2Y C33 C34 C35 C36 C37 C38 C39 C310 C311 C312 C313 C314 C315 C316}
        
      • 2. define a procedure that will assign the proper "segname" to your chemical groups. The procedure will also assign a color to each defined "segname".
        proc set_chemical_groups {{molid top}} {
        	#ASSIGN MACRO ATOM SELECTION TO A SEGNAME ##############################
        	#chemical groups in proteins ...........................................
        	[atomselect $molid "phenyl or indol"]                          set segname AROMATIC
        	[atomselect $molid "carboxyl"]                                 set segname ACIDIC
        	[atomselect $molid "imidazol"]                                 set segname HRING
        	[atomselect $molid "ammonium or guanidium"]                    set segname BASIC
        	[atomselect $molid "hydroxyl or amine or amide or sulphydryl"] set segname NEUTRAL
        	#chemical groups in lipids .....................................................
        	[atomselect $molid "methyl3ammonium"]                          set segname CHOLINE
        	[atomselect $molid "phosphate"]                                set segname PHOSPHATE
        	[atomselect $molid "glycerol"]                                 set segname GLYCEROL
        	[atomselect $molid "oleate or palmitate"]                      set segname ACYL
        
        	#ASSIGN A COLOR TO EACH SEGNAME ########################################
        	#chemical groups in proteins ...........................................
        	color Segname APOLAR    gray
        	color Segname POLAR     yellow
        	color Segname AROMATIC  mauve
        	color Segname NEUTRAL   lime
        	color Segname BASIC     blue
        	color Segname ACIDIC    red
        	color Segname HRING     cyan
        	#chemical groups in lipids .............................................
        	color Segname POPC      silver
        	color Segname CHOLINE   blue
        	color Segname PHOSPHATE red
        	color Segname GLYCEROL  lime
        	color Segname ACYL      orange
        }
        
      • 3. copy all (macro selection and procedure) in your configuration file. Now, run VMD, load a structure, and run the procedure
        set_chemical_groups top
        
        Now, you just have to color your structure "by segname" in the >Graphics>Representation menu.
        In this example, carboxyl are red, ammonium are blue, etc.