print "SURFACEDISTANCE Requires Jmol 14.31.24 or later." print "This Jmol is " + _versiondate print " Syntax to load a PDB code (no space after =)" print " load =2ace" print " load =1k28 filter \"biomolecule 1\"" if (!{*}.count) { print "Please load a macromolecule." exit } print "Surfacedistance values are averages for entire sidechains" print " (VLI FYW H AMCP Mse)," print " sidechain oxygens (DE ST), sidechain nitrogens (KR)," print " sidechain oxygens or nitrogens (NQ), or entire residues (G)." print "Secondary structure: averages for all atoms." background white select all trace only trace 0.01 color trace black select hetero and not (solvent, mse) spacefill color cpk set echo top center echo "" refresh print "Calculating surfacedistance. Please wait." print "After calculation, you can re-run this script without waiting." print "" print "All atom max " + {*}.surfacedistance.max%2 print "All atom average " + {*}.surfacedistance%2 + " (N=" + {*}.count + ")" print "All atom min " + {*}.surfacedistance.min%2 print "AVERAGES:" if ({protein}.count) { print "" print "Aliphatics:" print "Sidechains of VLI " + {sidechain and (val,leu,ile)}.surfacedistance%2 + " (N=" + {*.ca and (val,leu,ile)}.count + ")" print "Sidechains of V " + {sidechain and (val)}.surfacedistance%2 + " (N=" + {*.ca and (val)}.count + ")" print "Sidechains of L " + {sidechain and (leu)}.surfacedistance%2 + " (N=" + {*.ca and (leu)}.count + ")" print "Sidechains of I " + {sidechain and (ile)}.surfacedistance%2 + " (N=" + {*.ca and (ile)}.count + ")" print "" print "Aromatics:" print "Sidechains of FYW " + {sidechain and (phe,tyr,trp)}.surfacedistance%2 + " (N=" + {*.ca and (phe,tyr,trp)}.count + ")" print "Sidechains of F " + {sidechain and (phe)}.surfacedistance%2 + " (N=" + {*.ca and (phe)}.count + ")" print "Sidechains of Y " + {sidechain and (tyr)}.surfacedistance%2 + " (N=" + {*.ca and (tyr)}.count + ")" print "Sidechains of W " + {sidechain and (trp)}.surfacedistance%2 + " (N=" + {*.ca and (trp)}.count + ")" print "" print "Charged:" print "Sidechain O,N of DEKR " + {sidechain and (_o,_n) and (asp,glu,lys,arg)}.surfacedistance%2 + " (N=" + {*.ca and (asp,glu,lys,arg)}.count + ")" print "Sidechain O of D " + {sidechain and (_o) and (asp)}.surfacedistance%2 + " (N=" + {*.ca and (asp)}.count + ")" print "Sidechain O of E " + {sidechain and (_o) and (glu)}.surfacedistance%2 + " (N=" + {*.ca and (glu)}.count + ")" print "Sidechain N of K " + {sidechain and (_n) and (lys)}.surfacedistance%2 + " (N=" + {*.ca and (lys)}.count + ")" print "Sidechain N of R " + {sidechain and (_n) and (arg)}.surfacedistance%2 + " (N=" + {*.ca and (arg)}.count + ")" print "" print "Histidine:" print "Sidechain H " + {sidechain and (his)}.surfacedistance%2 + " (N=" + {*.ca and (his)}.count + ")" print "" print "Polar, uncharged:" print "Sidechain O,N of NQ " + {sidechain and (_o,_n) and (asn,gln)}.surfacedistance%2 + " (N=" + {*.ca and (asn,gln)}.count + ")" print "Sidechain O,N of N " + {sidechain and (_o,_n) and (asn)}.surfacedistance%2 + " (N=" + {*.ca and (asn)}.count + ")" print "Sidechain O,N of Q " + {sidechain and (_o,_n) and (gln)}.surfacedistance%2 + " (N=" + {*.ca and (gln)}.count + ")" print "Sidechain O of ST " + {sidechain and (_o) and (ser,thr)}.surfacedistance%2 + " (N=" + {*.ca and (ser,thr)}.count + ")" print "Sidechain O of S " + {sidechain and (_o) and (ser)}.surfacedistance%2 + " (N=" + {*.ca and (ser)}.count + ")" print "Sidechain O of T " + {sidechain and (_o) and (thr)}.surfacedistance%2 + " (N=" + {*.ca and (thr)}.count + ")" print "" print "Other:" print "Sidechain of A " + {sidechain and (ala)}.surfacedistance%2 + " (N=" + {*.ca and (ala)}.count + ")" print "Sidechain of M or MSE " + {sidechain and (met,mse)}.surfacedistance%2 + " (N=" + {*.ca and (met,mse)}.count + ")" print "Sidechain of C " + {sidechain and (cys)}.surfacedistance%2 + " (N=" + {*.ca and (cys)}.count + ")" print "Sidechain of P " + {sidechain and (pro)}.surfacedistance%2 + " (N=" + {*.ca and (pro)}.count + ")" print "G " + {gly}.surfacedistance%2 + " (N=" + {*.ca and (gly)}.count + ")" print "" print "Secondary structure (all atoms):" print "Coil " + {not (helix, sheet)}.surfacedistance%2 + " (N=" + {not (helix, sheet)}.count + ")" print "Helices " + {helix}.surfacedistance%2 + " (N=" + {helix}.count + ")" print "Beta strands " + {sheet}.surfacedistance%2 + " (N=" + {sheet}.count + ")" } # End of "if protein" # - - - - - - - - - - - - # BEGIN CHEMICAL ELEMENTS function elements() { print "" print "CHEMICAL ELEMENTS:" print "Carbon " + {_c}.surfacedistance%2 print "Hydrogen " + {_h}.surfacedistance%2 print "Oxygen " + {_o}.surfacedistance%2 print "Nitrogen " + {_n}.surfacedistance%2 print "Sulfur " + {_s}.surfacedistance%2 print "Phosphorus " + {_p}.surfacedistance%2 } # End of chemical elements if ({protein}.count) { if (prompt("Chemical Elements?", "Yes|No", true) == "Yes") {elements()} } else {elements()} # - - - - - - - - - - - - print "" if (prompt("Display Layers?\nEsc to cancel.", "Yes|No", true) != "Yes") {exit} # - - - - - - - - - - - - select all color surfacedistance spacefill off set echo top center color echo black font echo 20 sansserif sddmax = 12.0 for (sdd = 12.0; sdd >= 0.0; sdd -= 0.5) { sddplus = sdd + 0.5 select surfacedistance > @sdd and surfacedistance < @sddplus if ({selected}.count) { if (sddmax == 12.0) {sddmax = sdd} e2 = "Surfacedistance " + @sdd + "-" + @sddplus echo @e2 spacefill delay 2.0 if (sdd > 0.0) {spacefill off} } } set translucent off select visible color translucent 6 sddmax -= 1.0 sddmaxplus = sddmax + 1.0 select surfacedistance > @sddmax and surfacedistance < @sddmaxplus e2 = "Surfacedistance 0.0" + "-" + @sddplus + " and " + @sddmax + "-" + @sddmaxplus echo @e2 spacefill color opaque delay 2.0 spin off