ribbon

package
Version: v0.0.0-...-568057e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2019 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Blues = NewColormap(parseColors("f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b"))
View Source
var DefaultCamera = Camera{
	fauxgl.Vector{5, 0, 0},
	fauxgl.Vector{0, 0, 0},
	fauxgl.Vector{0, 1, 0},
	30, 1,
}
View Source
var Elements = []Element{
	{},
	{1, 0.53, 0.25, 0.37, 1.20, 0.10, "#ffffff", "H", "hydrogen"},
	{2, 0.31, 0.31, 0.32, 1.40, 0.00, "#d9ffff", "He", "helium"},
	{3, 1.67, 1.45, 1.34, 1.82, 0.90, "#cc80ff", "Li", "lithium"},
	{4, 1.12, 1.05, 0.90, 1.53, 0.41, "#c2ff00", "Be", "beryllium"},
	{5, 0.87, 0.85, 0.82, 1.92, 0.25, "#ffb5b5", "B", "boron"},
	{6, 0.67, 0.70, 0.77, 1.70, 0.29, "#909090", "C", "carbon"},
	{7, 0.56, 0.65, 0.75, 1.55, 0.30, "#3050f8", "N", "nitrogen"},
	{8, 0.48, 0.60, 0.73, 1.52, 1.21, "#ff0d0d", "O", "oxygen"},
	{9, 0.42, 0.50, 0.71, 1.47, 1.19, "#90e050", "F", "fluorine"},
	{10, 0.38, 0.38, 0.69, 1.54, 0.00, "#b3e3f5", "Ne", "neon"},
	{11, 1.90, 1.80, 1.54, 2.27, 1.16, "#ab5cf2", "Na", "sodium"},
	{12, 1.45, 1.50, 1.30, 1.73, 0.86, "#8aff00", "Mg", "magnesium"},
	{13, 1.18, 1.25, 1.18, 1.84, 0.53, "#bfa6a6", "Al", "aluminium"},
	{14, 1.11, 1.10, 1.11, 2.10, 0.40, "#f0c8a0", "Si", "silicon"},
	{15, 0.98, 1.00, 1.06, 1.80, 0.31, "#ff8000", "P", "phosphorus"},
	{16, 0.88, 1.00, 1.02, 1.80, 0.43, "#ffff30", "S", "sulfur"},
	{17, 0.79, 1.00, 0.99, 1.75, 1.67, "#1ff01f", "Cl", "chlorine"},
	{18, 0.71, 0.71, 0.97, 1.88, 0.00, "#80d1e3", "Ar", "argon"},
	{19, 2.43, 2.20, 1.96, 2.75, 1.52, "#8f40d4", "K", "potassium"},
	{20, 1.94, 1.80, 1.74, 2.31, 1.14, "#3dff00", "Ca", "calcium"},
	{21, 1.84, 1.60, 1.44, 2.11, 0.89, "#e6e6e6", "Sc", "scandium"},
	{22, 1.76, 1.40, 1.36, 0.00, 0.75, "#bfc2c7", "Ti", "titanium"},
	{23, 1.71, 1.35, 1.25, 0.00, 0.68, "#a6a6ab", "V", "vanadium"},
	{24, 1.66, 1.40, 1.27, 0.00, 0.76, "#8a99c7", "Cr", "chromium"},
	{25, 1.61, 1.40, 1.39, 0.00, 0.81, "#9c7ac7", "Mn", "manganese"},
	{26, 1.56, 1.40, 1.25, 0.00, 0.69, "#e06633", "Fe", "iron"},
	{27, 1.52, 1.35, 1.26, 0.00, 0.54, "#f090a0", "Co", "cobalt"},
	{28, 1.49, 1.35, 1.21, 1.63, 0.70, "#50d050", "Ni", "nickel"},
	{29, 1.45, 1.35, 1.38, 1.40, 0.71, "#c88033", "Cu", "copper"},
	{30, 1.42, 1.35, 1.31, 1.39, 0.74, "#7d80b0", "Zn", "zinc"},
	{31, 1.36, 1.30, 1.26, 1.87, 0.76, "#c28f8f", "Ga", "gallium"},
	{32, 1.25, 1.25, 1.22, 2.11, 0.53, "#668f8f", "Ge", "germanium"},
	{33, 1.14, 1.15, 1.19, 1.85, 0.72, "#bd80e3", "As", "arsenic"},
	{34, 1.03, 1.15, 1.16, 1.90, 0.56, "#ffa100", "Se", "selenium"},
	{35, 0.94, 1.15, 1.14, 1.85, 1.82, "#a62929", "Br", "bromine"},
	{36, 0.88, 0.88, 1.10, 2.02, 0.00, "#5cb8d1", "Kr", "krypton"},
	{37, 2.65, 2.35, 2.11, 3.03, 1.66, "#702eb0", "Rb", "rubidium"},
	{38, 2.19, 2.00, 1.92, 2.49, 1.32, "#00ff00", "Sr", "strontium"},
	{39, 2.12, 1.85, 1.62, 0.00, 1.04, "#94ffff", "Y", "yttrium"},
	{40, 2.06, 1.55, 1.48, 0.00, 0.86, "#94e0e0", "Zr", "zirconium"},
	{41, 1.98, 1.45, 1.37, 0.00, 0.78, "#73c2c9", "Nb", "niobium"},
	{42, 1.90, 1.45, 1.45, 0.00, 0.79, "#54b5b5", "Mo", "molybdenum"},
	{43, 1.83, 1.35, 1.56, 0.00, 0.79, "#3b9e9e", "Tc", "technetium"},
	{44, 1.78, 1.30, 1.26, 0.00, 0.82, "#248f8f", "Ru", "ruthenium"},
	{45, 1.73, 1.35, 1.35, 0.00, 0.81, "#0a7d8c", "Rh", "rhodium"},
	{46, 1.69, 1.40, 1.31, 1.63, 0.78, "#006985", "Pd", "palladium"},
	{47, 1.65, 1.60, 1.53, 1.72, 1.29, "#c0c0c0", "Ag", "silver"},
	{48, 1.61, 1.55, 1.48, 1.58, 0.92, "#ffd98f", "Cd", "cadmium"},
	{49, 1.56, 1.55, 1.44, 1.93, 0.94, "#a67573", "In", "indium"},
	{50, 1.45, 1.45, 1.41, 2.17, 0.69, "#668080", "Sn", "tin"},
	{51, 1.33, 1.45, 1.38, 2.06, 0.90, "#9e63b5", "Sb", "antimony"},
	{52, 1.23, 1.40, 1.35, 2.06, 1.11, "#d47a00", "Te", "tellurium"},
	{53, 1.15, 1.40, 1.33, 1.98, 2.06, "#940094", "I", "iodine"},
	{54, 1.08, 1.08, 1.30, 2.16, 0.62, "#429eb0", "Xe", "xenon"},
	{55, 2.98, 2.60, 2.25, 3.43, 1.81, "#57178f", "Cs", "caesium"},
	{56, 2.53, 2.15, 1.98, 2.68, 1.49, "#00c900", "Ba", "barium"},
	{57, 1.95, 1.95, 1.69, 0.00, 1.36, "#70d4ff", "La", "lanthanum"},
	{58, 1.85, 1.85, 0.00, 0.00, 1.15, "#ffffc7", "Ce", "cerium"},
	{59, 2.47, 1.85, 0.00, 0.00, 1.32, "#d9ffc7", "Pr", "praseodymium"},
	{60, 2.06, 1.85, 0.00, 0.00, 1.30, "#c7ffc7", "Nd", "neodymium"},
	{61, 2.05, 1.85, 0.00, 0.00, 1.28, "#a3ffc7", "Pm", "promethium"},
	{62, 2.38, 1.85, 0.00, 0.00, 1.10, "#8fffc7", "Sm", "samarium"},
	{63, 2.31, 1.85, 0.00, 0.00, 1.31, "#61ffc7", "Eu", "europium"},
	{64, 2.33, 1.80, 0.00, 0.00, 1.08, "#45ffc7", "Gd", "gadolinium"},
	{65, 2.25, 1.75, 0.00, 0.00, 1.18, "#30ffc7", "Tb", "terbium"},
	{66, 2.28, 1.75, 0.00, 0.00, 1.05, "#1fffc7", "Dy", "dysprosium"},
	{67, 2.26, 1.75, 0.00, 0.00, 1.04, "#00ff9c", "Ho", "holmium"},
	{68, 2.26, 1.75, 0.00, 0.00, 1.03, "#00e675", "Er", "erbium"},
	{69, 2.22, 1.75, 0.00, 0.00, 1.02, "#00d452", "Tm", "thulium"},
	{70, 2.22, 1.75, 0.00, 0.00, 1.13, "#00bf38", "Yb", "ytterbium"},
	{71, 2.17, 1.75, 1.60, 0.00, 1.00, "#00ab24", "Lu", "lutetium"},
	{72, 2.08, 1.55, 1.50, 0.00, 0.85, "#4dc2ff", "Hf", "hafnium"},
	{73, 2.00, 1.45, 1.38, 0.00, 0.78, "#4da6ff", "Ta", "tantalum"},
	{74, 1.93, 1.35, 1.46, 0.00, 0.74, "#2194d6", "W", "tungsten"},
	{75, 1.88, 1.35, 1.59, 0.00, 0.77, "#267dab", "Re", "rhenium"},
	{76, 1.85, 1.30, 1.28, 0.00, 0.77, "#266696", "Os", "osmium"},
	{77, 1.80, 1.35, 1.37, 0.00, 0.77, "#175487", "Ir", "iridium"},
	{78, 1.77, 1.35, 1.28, 1.75, 0.74, "#d0d0e0", "Pt", "platinum"},
	{79, 1.74, 1.35, 1.44, 1.66, 1.51, "#ffd123", "Au", "gold"},
	{80, 1.71, 1.50, 1.49, 1.55, 0.83, "#b8b8d0", "Hg", "mercury"},
	{81, 1.56, 1.90, 1.48, 1.96, 1.03, "#a6544d", "Tl", "thallium"},
	{82, 1.54, 1.80, 1.47, 2.02, 1.49, "#575961", "Pb", "lead"},
	{83, 1.43, 1.60, 1.46, 2.07, 1.17, "#9e4fb5", "Bi", "bismuth"},
	{84, 1.35, 1.90, 0.00, 1.97, 1.08, "#ab5c00", "Po", "polonium"},
	{85, 1.27, 1.27, 0.00, 2.02, 0.76, "#754f45", "At", "astatine"},
	{86, 1.20, 1.20, 1.45, 0.00, 0.00, "#428296", "Rn", "radon"},
	{87, 0.00, 0.00, 0.00, 3.48, 1.94, "#420066", "Fr", "francium"},
	{88, 0.00, 2.15, 0.00, 2.83, 1.62, "#007d00", "Ra", "radium"},
	{89, 1.95, 1.95, 0.00, 0.00, 1.26, "#70abfa", "Ac", "actinium"},
	{90, 1.80, 1.80, 0.00, 0.00, 1.19, "#00baff", "Th", "thorium"},
	{91, 1.80, 1.80, 0.00, 0.00, 1.09, "#00a1ff", "Pa", "protactinium"},
	{92, 1.75, 1.75, 0.00, 1.86, 0.87, "#008fff", "U", "uranium"},
	{93, 1.75, 1.75, 0.00, 0.00, 0.00, "#0080ff", "Np", "neptunium"},
	{94, 1.75, 1.75, 0.00, 0.00, 1.00, "#006bff", "Pu", "plutonium"},
	{95, 1.75, 1.75, 0.00, 0.00, 1.12, "#545cf2", "Am", "americium"},
	{96, 0.00, 0.00, 0.00, 0.00, 1.11, "#785ce3", "Cm", "curium"},
}
View Source
var ElementsBySymbol map[string]Element
View Source
var Inferno = NewColormap(parseColors("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"))
View Source
var Magma = NewColormap(parseColors("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"))
View Source
var Plasma = NewColormap(parseColors("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"))
View Source
var Spectral = NewColormap(parseColors("d24252f98e60fde091ffffc3e6f49e9bd4973988ba"))
View Source
var Viget = NewColormap(parseColors("113c54175b761d78972395b85fa693a2b771eac853eaaa47ec8c3bee6e30d6502bbd3226"))
View Source
var Viridis = NewColormap(parseColors("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"))

Functions

func BackboneMesh

func BackboneMesh(model *pdb.Model) *fauxgl.Mesh

func HetMesh

func HetMesh(model *pdb.Model) *fauxgl.Mesh

func LineMesh

func LineMesh(model *pdb.Model) *fauxgl.Mesh

func ModelMesh

func ModelMesh(model *pdb.Model) *fauxgl.Mesh

func RibbonMesh

func RibbonMesh(model *pdb.Model) *fauxgl.Mesh

func SpaceFillingMesh

func SpaceFillingMesh(model *pdb.Model) *fauxgl.Mesh

func Spheres

func Spheres(model *pdb.Model) []fauxgl.VectorW

Types

type Camera

type Camera struct {
	Eye    fauxgl.Vector
	Center fauxgl.Vector
	Up     fauxgl.Vector
	Fovy   float64
	Aspect float64
}

func PositionCamera

func PositionCamera(model *pdb.Model, matrix fauxgl.Matrix) Camera

type Colormap

type Colormap struct {
	Colors []fauxgl.Color
}

func NewColormap

func NewColormap(colors []fauxgl.Color) *Colormap

func (Colormap) Color

func (c Colormap) Color(t float64) fauxgl.Color

type Element

type Element struct {
	AtomicNumber      int
	Radius            float64
	IonicRadius       float64
	CovalentRadius    float64
	VanDerWaalsRadius float64
	CrystalRadius     float64
	HexColor          string
	Symbol            string
	Name              string
}

type PeptidePlane

type PeptidePlane struct {
	Residue1 *pdb.Residue
	Residue2 *pdb.Residue
	Residue3 *pdb.Residue
	Position fauxgl.Vector
	Normal   fauxgl.Vector
	Forward  fauxgl.Vector
	Side     fauxgl.Vector
	Flipped  bool
}

func NewPeptidePlane

func NewPeptidePlane(r1, r2, r3 *pdb.Residue) *PeptidePlane

func (*PeptidePlane) Flip

func (pp *PeptidePlane) Flip()

func (*PeptidePlane) Transition

func (pp *PeptidePlane) Transition() (type1, type2 pdb.ResidueType)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL