Create a gist now

Instantly share code, notes, and snippets.

Embed
Matriarch
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Fri Aug 18 2017 09:55:30 GMT-0400 (EDT)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Matriarch
Description:
Url: http://www.primordion.com/Xholon/gwt/
InternalName: a774faaa9779d7b3b8c62f40d0cd1f3e
Keywords:
My Notes
--------
August 14, 2017
Explore and implement Matriarch using Xholon.
To show building instruction descriptions (Chrome Dev Tools):
var chain = xh.root().xpath("descendant::chain");
chain.xhc().anno();
August 15, 2017
Python to JavaScript
--------------------
Possibly try to convert the original Matriarch Python code to JavaScript so I can integrate it with Xholon.
These are some Python to JavaScript converters:
- Pyjs http://pyjs.org/
- Brython http://brython.info/index.html
- I tested this in https://gist.github.com/kenwebb/cbe685d29bd9e1416598
- I used Brython3.2.0-... and XholonPython.html
- Skulpt http://www.skulpt.org/
- see my Python notes in notebook July 30 2015 to August 17 2015
- I will try out Matriarch with Brython in a new workbook: Matriarch - Brython
PV - JavaScript Protein Viewer
------------------------------
- https://biasmv.github.io/pv/
- https://github.com/biasmv/pv
- https://pv.readthedocs.io/en/v1.8.1/
- "PV is a JavaScript viewer to visualize protein structures directly in the browsers. It's super-fast and and easy to integrate into your website and does not require any plug-ins to be installed."
- "PV uses WebGL for rendering."
References
----------
(1) http://math.mit.edu/~dspivak/informatics/Matriarch_ACS_BMSE.PDF
Matriarch: A Python Library for Materials Architecture
Tristan Giesa, Ravi Jagadeesan, David I. Spivak, and Markus J. Buehler, 2015
"a mathematical language, using category theory, to describe the architecture of a material, i.e., its set of building blocks and instructions for combining them"
"parametrically change such building instructions"
" a concept within category theory called operads, which can model the assembly of hierarchical structures."
"building instructions, such as attach, twist, array, etc."
"Our operad M has protein building block types as objects, and protein building instructions as morphisms.
Forming a sequence of instructions, or program, in Matriarch corresponds to composing a tree of morphisms in the operad."
"A set-valued functor M → Set assigns to each object (building block type)
the set of all building blocks of this type, and it assigns to each
morphism (building instruction) a function that creates a new
building block by combining or manipulating existing building blocks."
(2) http://web.mit.edu/matriarch/
Matriarch is a high-level language of materials architecture, implemented in an open-source Python library. Matriarch creates material architectures for protein structures and can output them as atomic configurations, in the form of PDB (protein data bank) files. Using Matriarch, an engineer can substitute building blocks and vary building instructions to create and study new materials.
The Matriarch language is based on the mathematical field of category theory, as discussed in the journal article, A python library for materials architecture; however, no knowledge of category theory is necessary to operate the program.
(3) http://web.mit.edu/matriarch/downloads/MatriarchUsersGuide.pdf
Matriarch User's Guide
(4) my notebook, July 17 2017
(5) https://dspace.mit.edu/openaccess-disseminate/1721.1/77560
Category theory based solution for the building block replacement problem in materials design
T Giesa, DI Spivak, MJ Buehler - Advanced Engineering, 2012
"the key problem is to determine the conditions necessary for replacing one or more of a system’s basic building blocks by other building blocks,
while maintaining its overall functionality.
This is referred to as the “building block replacement problem”. "
KSW - ROOM/OT addressed this building block replacement problem:
- initially, a replacement block (instance of an ActorClass) needed to be a subclass of the ActorRef
- then the conditions were amended to be any instance that supported the port signature of the ActorRef
(6)
]]></Notes>
<_-.XholonClass>
<PhysicalSystem/>
<Matriarch/>
<BuildingInstruction>
<chain/>
<moveOrbs/>
<shiftOrbs/>
<rotateOrbs/>
<twist/>
<helix/>
<pad/>
<reverseOrbs/>
<attach/>
<attachSeries/>
<overlay/>
<makeArray/>
<space/>
<spaceSeries/>
</BuildingInstruction>
<!-- the amino acid names, letter codes, and standard abbreviations are taken from Table 1 in the Matriarch User's Guide[3] -->
<AminoAcid>
<Alanine/>
<Arginine/>
<Asparagine/>
<AsparticAcid/>
<Cysteine/>
<Glutamine/>
<GlutamicAcid/>
<Glycine/>
<Histidine/>
<Hydroxyproline/> <!-- an addition to the standard 20 amino acids -->
<Isoleucine/>
<Leucine/>
<Lysine/>
<Methionine/>
<Phenylalanine/>
<Proline/>
<Serine/>
<Threonine/>
<Tryptophan/>
<Tyrosine/>
<Valine/>
</AminoAcid>
<AminoAcidPdb/>
<AminoAcidPdbStr superClass="Attribute_String"/>
<AminoAcidPdbBeh superClass="Script"/>
</_-.XholonClass>
<xholonClassDetails>
<BuildingInstruction><Color>red</Color></BuildingInstruction>
<!-- annotations, from ref[1] -->
<chain><Anno>The most basic Matriarch command, chain, creates a building block from a sequence of PDB files. KSW - is this a building instruction, or a command, or both</Anno></chain>
<moveOrbs><Anno>moveOrbs(Γ, g) moves the atoms in Γ by rigid motion g</Anno></moveOrbs>
<shiftOrbs><Anno>shiftOrbs(Γ, s) shifts the atoms of Γ by s units in the z-direction</Anno></shiftOrbs>
<rotateOrbs><Anno>rotateOrbs(Γ, θ) rotates the atoms of Γ by θ (in degrees) around the z-axis</Anno></rotateOrbs>
<twist><Anno>twist(Γ, W) twists Γ by the axis twister W, which describes the twisted and new building block axes</Anno></twist>
<helix><Anno>helix(Γ, rad, pitch, handed) twists Γ into a helix with radius rad, pitch length pitch; the argument handed must be L or R, to choose the handedness of the helix.</Anno></helix>
<pad><Anno>pad(Γ, s) pads Γ with blank space of length s at its left terminal</Anno></pad>
<reverseOrbs><Anno>reverseOrbs(Γ) reverses the direction of Γ</Anno></reverseOrbs>
<attach><Anno>attach(Γ1, Γ2) attaches Γ1 and Γ2 in series</Anno></attach>
<attachSeries><Anno>attachSeries(Γ, n) attaches n copies of Γ in series</Anno></attachSeries>
<overlay><Anno>overlay(Γ1, Γ2) overlays Γ1 and Γ2 in the same space</Anno></overlay>
<makeArray><Anno>makeArray(Γ, m, n, d, alt) places mn copies of Γ into an m × n array, equally spaced at a distance d and either antiparallel (alt = true) or parallel (alt = false)</Anno></makeArray>
<space><Anno>space(Γ1, Γ2, s) spaces Γ1 and Γ2, with a distance s in between</Anno></space>
<spaceSeries><Anno>spaceSeries(Γ, n, s) places n copies of Γ in series, spaced at a distance s</Anno></spaceSeries>
</xholonClassDetails>
<PhysicalSystem>
<!--
Example on page 6 of "Matriarch User's Guide"[3]
Hierarchy is just one possible way to implement this in Xholon.
I could also do it linearly, and perhaps as in the "Manage Repository" DFD workbook.
-->
<Matriarch roleName="Your first Matriarch program">
<attachSeries roleName="myLongChain" n="5">
<chain roleName="myChain">
<Attribute_String roleName="mySeq">AAAPPY</Attribute_String> <!-- a sequence of six amino acids in letter codes: alanine alanine alanine proline proline tyrosine-->
</chain>
</attachSeries>
</Matriarch>
<!-- the end result is (in YAML format):
attachSeries:
roleName: myLongChain
n: 5
Alanine:
roleName: A ala
Alanine:
roleName: A ala
Alanine:
roleName: A ala
Proline:
roleName: P pro
Proline:
roleName: P pro
Tyrosine:
roleName: Y tyr
Alanine:
roleName: A ala
Alanine:
roleName: A ala
Alanine:
roleName: A ala
Proline:
roleName: P pro
Proline:
roleName: P pro
Tyrosine:
roleName: Y tyr
Alanine:
roleName: A ala
Alanine:
roleName: A ala
Alanine:
roleName: A ala
Proline:
roleName: P pro
Proline:
roleName: P pro
Tyrosine:
roleName: Y tyr
Alanine:
roleName: A ala
Alanine:
roleName: A ala
Alanine:
roleName: A ala
Proline:
roleName: P pro
Proline:
roleName: P pro
Tyrosine:
roleName: Y tyr
Alanine:
roleName: A ala
Alanine:
roleName: A ala
Alanine:
roleName: A ala
Proline:
roleName: P pro
Proline:
roleName: P pro
Tyrosine:
roleName: Y tyr
-->
<Matriarch roleName="Test of all amino acids">
<chain roleName="aa">
<Attribute_String roleName="aaSeq">ARNDCQEGHZILKMFPSTWYV</Attribute_String>
</chain>
</Matriarch>
<AminoAcidPdb>
<!-- source: Matriarch aminoAcidData.py I changed single quotes into double quotes to make it a valid JSON string -->
<AminoAcidPdbStr><![CDATA[
{"lys" : ["ATOM 1 N LYS P 1 1.144 2.580 -0.844 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 LYS P 1 0.219 2.444 -1.198 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 LYS P 1 1.816 2.291 -1.526 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 LYS P 1 1.284 3.543 -0.615 0.00 0.00 P1 H\r\n", "ATOM 5 C LYS P 1 2.728 1.972 0.916 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 LYS P 1 3.216 2.612 0.322 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 LYS P 1 2.842 1.419 1.742 0.00 0.00 P1 O\r\n", "ATOM 8 CA LYS P 1 1.316 1.768 0.372 1.00 0.00 P1 C\r\n", "ATOM 9 HA LYS P 1 0.625 2.135 1.121 0.00 0.00 P1 H\r\n", "ATOM 10 CB LYS P 1 0.968 0.308 0.092 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 LYS P 1 1.669 -0.051 -0.696 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 LYS P 1 1.184 -0.297 1.001 0.00 0.00 P1 H\r\n", "ATOM 13 CG LYS P 1 -0.480 0.168 -0.372 1.00 0.00 P1 C\r\n", "ATOM 14 HG1 LYS P 1 -1.156 0.568 0.418 0.00 0.00 P1 H\r\n", "ATOM 15 HG2 LYS P 1 -0.630 0.790 -1.284 0.00 0.00 P1 H\r\n", "ATOM 16 CD LYS P 1 -0.828 -1.296 -0.648 1.00 0.00 P1 C\r\n", "ATOM 17 HD1 LYS P 1 -0.121 -1.687 -1.414 0.00 0.00 P1 H\r\n", "ATOM 18 HD2 LYS P 1 -0.659 -1.875 0.289 0.00 0.00 P1 H\r\n", "ATOM 19 CE LYS P 1 -2.280 -1.436 -1.116 1.00 0.00 P1 C\r\n", "ATOM 20 HE1 LYS P 1 -2.979 -1.056 -0.338 0.00 0.00 P1 H\r\n", "ATOM 21 HE2 LYS P 1 -2.447 -0.857 -2.051 0.00 0.00 P1 H\r\n", "ATOM 22 NZ LYS P 1 -2.604 -2.848 -1.380 1.00 0.00 P1 N\r\n", "ATOM 23 HZ1 LYS P 1 -3.592 -2.934 -1.696 0.00 0.00 P1 H\r\n", "ATOM 24 HZ2 LYS P 1 -1.972 -3.217 -2.119 0.00 0.00 P1 H\r\n", "ATOM 25 HZ3 LYS P 1 -2.471 -3.401 -0.509 0.00 0.00 P1 H\r\n", "END\r\n"],
"gly" : ["ATOM 1 N GLY P 1 -1.476 0.232 0.252 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 GLY P 1 -1.874 0.864 0.917 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 GLY P 1 -1.775 -0.702 0.449 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 GLY P 1 -1.753 0.491 -0.673 0.00 0.00 P1 H\r\n", "ATOM 5 C GLY P 1 0.596 -0.652 -0.648 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 GLY P 1 -0.137 -1.111 -1.150 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 GLY P 1 1.592 -0.603 -0.577 0.00 0.00 P1 O\r\n", "ATOM 8 CA GLY P 1 -0.012 0.296 0.348 1.00 0.00 P1 C\r\n", "ATOM 9 HA1 GLY P 1 0.320 1.320 0.132 1.00 0.00 P1 H\r\n", "ATOM 10 HA2 GLY P 1 0.292 0.020 1.364 1.00 0.00 P1 H\r\n", "END"],
"his" : ["ATOM 1 N HIS P 1 1.068 1.176 1.048 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 HIS P 1 0.095 1.159 1.278 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 HIS P 1 1.293 2.032 0.583 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 HIS P 1 1.616 1.085 1.879 0.00 0.00 P1 H\r\n", "ATOM 5 C HIS P 1 2.856 0.072 -0.204 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 HIS P 1 3.290 0.847 0.255 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 HIS P 1 3.055 -0.695 -0.814 0.00 0.00 P1 O\r\n", "ATOM 8 CA HIS P 1 1.368 0.052 0.152 1.00 0.00 P1 C\r\n", "ATOM 9 HA HIS P 1 1.175 -0.872 0.683 0.00 0.00 P1 H\r\n", "ATOM 10 CB HIS P 1 0.464 0.084 -1.080 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 HIS P 1 0.646 1.028 -1.638 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 HIS P 1 0.737 -0.750 -1.763 0.00 0.00 P1 H\r\n", "ATOM 13 ND1 HIS P 1 -1.568 -1.076 -0.100 1.00 0.00 P1 N\r\n", "ATOM 14 HD1 HIS P 1 -1.073 -1.848 0.301 0.00 0.00 P1 H\r\n", "ATOM 15 CG HIS P 1 -1.008 -0.004 -0.764 1.00 0.00 P1 C\r\n", "ATOM 16 CE1 HIS P 1 -2.872 -0.860 0.024 1.00 0.00 P1 C\r\n", "ATOM 17 HE1 HIS P 1 -3.560 -1.552 0.517 0.00 0.00 P1 H\r\n", "ATOM 18 NE2 HIS P 1 -3.152 0.340 -0.552 1.00 0.00 P1 N\r\n", "ATOM 19 CD2 HIS P 1 -2.032 0.860 -1.028 1.00 0.00 P1 C\r\n", "ATOM 20 HD2 HIS P 1 -2.020 1.804 -1.559 0.00 0.00 P1 H\r\n", "END\r\n"],
"cys" : ["ATOM 1 N CYS P 1 0.312 0.504 1.268 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 CYS P 1 -0.644 0.435 1.554 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 CYS P 1 0.529 1.451 1.029 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 CYS P 1 0.912 0.192 2.005 0.00 0.00 P1 H\r\n", "ATOM 5 C CYS P 1 1.980 -0.244 -0.352 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 CYS P 1 2.465 0.379 0.262 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 CYS P 1 2.117 -0.824 -1.155 0.00 0.00 P1 O\r\n", "ATOM 8 CA CYS P 1 0.520 -0.344 0.092 1.00 0.00 P1 C\r\n", "ATOM 9 HA CYS P 1 0.337 -1.368 0.396 0.00 0.00 P1 H\r\n", "ATOM 10 CB CYS P 1 -0.444 0.032 -1.036 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 CYS P 1 -0.250 1.097 -1.295 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 CYS P 1 -0.202 -0.555 -1.950 0.00 0.00 P1 H\r\n", "ATOM 13 SG CYS P 1 -2.204 -0.132 -0.616 1.00 0.00 P1 S\r\n", "ATOM 14 HG1 CYS P 1 -2.693 0.332 -1.767 0.00 0.00 P1 H\r\n", "END\r\n"],
"leu" : ["ATOM 1 N LEU P 1 0.868 0.984 1.616 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 LEU P 1 -0.089 0.922 1.899 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 LEU P 1 1.082 1.921 1.340 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 LEU P 1 1.465 0.706 2.369 0.00 0.00 P1 H\r\n", "ATOM 5 C LEU P 1 2.552 0.180 0.040 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 LEU P 1 3.028 0.831 0.632 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 LEU P 1 2.699 -0.432 -0.737 0.00 0.00 P1 O\r\n", "ATOM 8 CA LEU P 1 1.088 0.088 0.476 1.00 0.00 P1 C\r\n", "ATOM 9 HA LEU P 1 0.911 -0.924 0.816 0.00 0.00 P1 H\r\n", "ATOM 10 CB LEU P 1 0.096 0.396 -0.644 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 LEU P 1 0.273 1.450 -0.959 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 LEU P 1 0.341 -0.234 -1.528 0.00 0.00 P1 H\r\n", "ATOM 13 CG LEU P 1 -1.384 0.244 -0.288 1.00 0.00 P1 C\r\n", "ATOM 14 HG LEU P 1 -1.572 0.989 0.522 0.00 0.00 P1 H\r\n", "ATOM 15 CD1 LEU P 1 -2.276 0.576 -1.488 1.00 0.00 P1 C\r\n", "ATOM 16 HD11 LEU P 1 -3.346 0.417 -1.234 0.00 0.00 P1 H\r\n", "ATOM 17 HD12 LEU P 1 -2.144 1.636 -1.792 0.00 0.00 P1 H\r\n", "ATOM 18 HD13 LEU P 1 -2.025 -0.072 -2.355 0.00 0.00 P1 H\r\n", "ATOM 19 CD2 LEU P 1 -1.676 -1.148 0.272 1.00 0.00 P1 C\r\n", "ATOM 20 HD21 LEU P 1 -2.750 -1.237 0.543 0.00 0.00 P1 H\r\n", "ATOM 21 HD22 LEU P 1 -1.448 -1.943 -0.467 0.00 0.00 P1 H\r\n", "ATOM 22 HD23 LEU P 1 -1.070 -1.335 1.185 0.00 0.00 P1 H\r\n", "END\r\n"],
"tyr" : ["ATOM 1 N TYR P 1 2.024 1.736 1.380 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 TYR P 1 1.315 1.168 1.799 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 TYR P 1 1.700 2.678 1.294 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 TYR P 1 2.855 1.711 1.936 0.00 0.00 P1 H\r\n", "ATOM 5 C TYR P 1 3.412 2.076 -0.604 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 TYR P 1 3.670 2.805 0.030 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 TYR P 1 3.615 1.715 -1.514 0.00 0.00 P1 O\r\n", "ATOM 8 CA TYR P 1 2.328 1.212 0.044 1.00 0.00 P1 C\r\n", "ATOM 9 HA TYR P 1 2.745 0.220 0.173 0.00 0.00 P1 H\r\n", "ATOM 10 CB TYR P 1 1.044 1.168 -0.808 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 TYR P 1 0.606 2.189 -0.860 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 TYR P 1 1.274 0.856 -1.850 0.00 0.00 P1 H\r\n", "ATOM 13 CG TYR P 1 -0.048 0.264 -0.256 1.00 0.00 P1 C\r\n", "ATOM 14 CD1 TYR P 1 -1.112 0.808 0.496 1.00 0.00 P1 C\r\n", "ATOM 15 HD1 TYR P 1 -1.142 1.871 0.693 0.00 0.00 P1 H\r\n", "ATOM 16 CE1 TYR P 1 -2.120 -0.028 1.008 1.00 0.00 P1 C\r\n", "ATOM 17 HE1 TYR P 1 -2.931 0.383 1.590 0.00 0.00 P1 H\r\n", "ATOM 18 CZ TYR P 1 -2.072 -1.420 0.768 1.00 0.00 P1 C\r\n", "ATOM 19 OH TYR P 1 -3.048 -2.240 1.260 1.00 0.00 P1 O\r\n", "ATOM 20 HH TYR P 1 -2.874 -3.124 0.931 0.00 0.00 P1 H\r\n", "ATOM 21 CD2 TYR P 1 0.000 -1.128 -0.492 1.00 0.00 P1 C\r\n", "ATOM 22 HD2 TYR P 1 0.833 -1.556 -1.033 0.00 0.00 P1 H\r\n", "ATOM 23 CE2 TYR P 1 -1.008 -1.968 0.020 1.00 0.00 P1 C\r\n", "ATOM 24 HE2 TYR P 1 -0.952 -3.034 -0.144 0.00 0.00 P1 H\r\n", "END\r\n"],
"phe" : ["ATOM 1 N PHE P 1 1.504 1.692 1.344 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 PHE P 1 0.759 1.141 1.721 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 PHE P 1 1.199 2.635 1.214 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 PHE P 1 2.290 1.670 1.962 0.00 0.00 P1 H\r\n", "ATOM 5 C PHE P 1 3.040 1.976 -0.532 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 PHE P 1 3.257 2.715 0.106 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 PHE P 1 3.308 1.594 -1.416 0.00 0.00 P1 O\r\n", "ATOM 8 CA PHE P 1 1.900 1.136 0.048 1.00 0.00 P1 C\r\n", "ATOM 9 HA PHE P 1 2.298 0.146 0.234 0.00 0.00 P1 H\r\n", "ATOM 10 CB PHE P 1 0.684 1.140 -0.900 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 PHE P 1 0.299 2.179 -0.994 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 PHE P 1 0.970 0.804 -1.920 0.00 0.00 P1 H\r\n", "ATOM 13 CG PHE P 1 -0.492 0.304 -0.416 1.00 0.00 P1 C\r\n", "ATOM 14 CD1 PHE P 1 -1.580 0.920 0.240 1.00 0.00 P1 C\r\n", "ATOM 15 HD1 PHE P 1 -1.571 1.989 0.402 0.00 0.00 P1 H\r\n", "ATOM 16 CE1 PHE P 1 -2.672 0.140 0.688 1.00 0.00 P1 C\r\n", "ATOM 17 HE1 PHE P 1 -3.507 0.614 1.185 0.00 0.00 P1 H\r\n", "ATOM 18 CZ PHE P 1 -2.672 -1.252 0.480 1.00 0.00 P1 C\r\n", "ATOM 19 HZ PHE P 1 -3.510 -1.847 0.815 0.00 0.00 P1 H\r\n", "ATOM 20 CD2 PHE P 1 -0.500 -1.092 -0.620 1.00 0.00 P1 C\r\n", "ATOM 21 HD2 PHE P 1 0.340 -1.572 -1.102 0.00 0.00 P1 H\r\n", "ATOM 22 CE2 PHE P 1 -1.588 -1.868 -0.172 1.00 0.00 P1 C\r\n", "ATOM 23 HE2 PHE P 1 -1.587 -2.938 -0.329 0.00 0.00 P1 H\r\n", "END\r\n"],
"hyp" : ["ATOM 1 N HYP P 1 0.168 1.360 -0.282 1.00 0.00 P1 N \r\n", "ATOM 2 CA HYP P 1 -0.384 -0.003 -0.493 1.00 0.00 P1 C \r\n", "ATOM 3 C HYP P 1 -1.811 -0.072 -0.013 1.00 0.00 P1 C \r\n", "ATOM 4 O HYP P 1 -2.233 0.764 0.750 1.00 0.00 P1 O \r\n", "ATOM 5 CB HYP P 1 0.515 -0.924 0.359 1.00 0.00 P1 C \r\n", "ATOM 6 CG HYP P 1 1.847 -0.159 0.505 1.00 0.00 P1 C \r\n", "ATOM 7 CD2 HYP P 1 1.640 1.159 -0.271 1.00 0.00 P1 C \r\n", "ATOM 8 OD1 HYP P 1 2.917 -0.911 -0.071 1.00 0.00 P1 O \r\n", "ATOM 9 OXT HYP P 1 -2.614 -1.063 -0.433 1.00 0.00 P1 O \r\n", "ATOM 10 HN1 HYP P 1 -0.107 1.981 -1.028 1.00 0.00 P1 H \r\n", "ATOM 11 HA HYP P 1 -0.325 -0.278 -1.546 1.00 0.00 P1 H \r\n", "ATOM 12 HB1 HYP P 1 0.066 -1.092 1.337 1.00 0.00 P1 H \r\n", "ATOM 13 HB2 HYP P 1 0.678 -1.873 -0.153 1.00 0.00 P1 H \r\n", "ATOM 14 HG HYP P 1 2.052 0.048 1.555 1.00 0.00 P1 H \r\n", "ATOM 15 HD21HYP P 1 2.018 1.065 -1.289 1.00 0.00 P1 H \r\n", "ATOM 16 HD22HYP P 1 2.132 1.985 0.243 1.00 0.00 P1 H \r\n", "ATOM 17 HD1 HYP P 1 3.780 -0.479 -0.009 1.00 0.00 P1 H \r\n", "ATOM 18 HN2 HYP P 1 -3.520 -1.066 -0.098 1.00 0.00 P1 H \r\n", "END\r\n", "\r\n", "NOTE: HN2 IS REALLY A HXT - NEED TO FIX THIS.\r\n", "\r\n", "COMPND HYP \r\n", "AUTHOR GENERATED BY OPEN BABEL 2.3.2\r\n", "\r\n", "[sdf from RCSB]\r\n", "\r\n", "CONECT 1 2 7 10 \r\n", "CONECT 2 1 3 5 11 \r\n", "CONECT 2 \r\n", "CONECT 3 2 4 9 \r\n", "CONECT 4 3 \r\n", "CONECT 5 2 6 12 13 \r\n", "CONECT 5 \r\n", "CONECT 6 5 7 8 14 \r\n", "CONECT 6 \r\n", "CONECT 7 1 6 15 16 \r\n", "CONECT 7 \r\n", "CONECT 8 6 17 \r\n", "CONECT 9 3 18 \r\n", "CONECT 10 1 \r\n", "CONECT 11 2 \r\n", "CONECT 12 5 \r\n", "CONECT 13 5 \r\n", "CONECT 14 6 \r\n", "CONECT 15 7 \r\n", "CONECT 16 7 \r\n", "CONECT 17 8 \r\n", "CONECT 18 9 \r\n", "MASTER 0 0 0 0 0 0 0 0 18 0 18 0\r\n"],
"val" : ["ATOM 1 N VAL P 1 0.488 0.624 1.872 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 VAL P 1 -0.300 0.163 2.279 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 VAL P 1 0.287 1.595 1.745 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 VAL P 1 1.288 0.515 2.461 0.00 0.00 P1 H\r\n", "ATOM 5 C VAL P 1 1.976 0.720 -0.064 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 VAL P 1 2.299 1.433 0.558 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 VAL P 1 2.166 0.306 -0.954 0.00 0.00 P1 O\r\n", "ATOM 8 CA VAL P 1 0.772 0.020 0.564 1.00 0.00 P1 C\r\n", "ATOM 9 HA VAL P 1 1.044 -1.016 0.721 0.00 0.00 P1 H\r\n", "ATOM 10 CB VAL P 1 -0.476 0.076 -0.316 1.00 0.00 P1 C\r\n", "ATOM 11 HB VAL P 1 -0.746 1.152 -0.451 0.00 0.00 P1 H\r\n", "ATOM 12 CG1 VAL P 1 -0.204 -0.548 -1.688 1.00 0.00 P1 C\r\n", "ATOM 13 HG11 VAL P 1 -1.128 -0.538 -2.306 0.00 0.00 P1 H\r\n", "ATOM 14 HG12 VAL P 1 0.574 0.013 -2.246 0.00 0.00 P1 H\r\n", "ATOM 15 HG13 VAL P 1 0.126 -1.603 -1.581 0.00 0.00 P1 H\r\n", "ATOM 16 CG2 VAL P 1 -1.664 -0.604 0.368 1.00 0.00 P1 C\r\n", "ATOM 17 HG21 VAL P 1 -2.556 -0.595 -0.294 0.00 0.00 P1 H\r\n", "ATOM 18 HG22 VAL P 1 -1.421 -1.661 0.613 0.00 0.00 P1 H\r\n", "ATOM 19 HG23 VAL P 1 -1.939 -0.083 1.308 0.00 0.00 P1 H\r\n", "END\r\n"],
"gln" : ["ATOM 1 N GLN P 1 0.548 1.156 2.032 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 GLN P 1 -0.447 1.172 2.132 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 GLN P 1 0.832 1.822 1.342 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 GLN P 1 0.983 1.366 2.908 0.00 0.00 P1 H\r\n", "ATOM 5 C GLN P 1 2.488 -0.220 1.444 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 GLN P 1 2.858 0.681 1.671 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 GLN P 1 2.766 -1.135 1.150 0.00 0.00 P1 O\r\n", "ATOM 8 CA GLN P 1 0.964 -0.188 1.600 1.00 0.00 P1 C\r\n", "ATOM 9 HA GLN P 1 0.702 -0.886 2.386 0.00 0.00 P1 H\r\n", "ATOM 10 CB GLN P 1 0.272 -0.600 0.308 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 GLN P 1 0.573 0.141 -0.469 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 GLN P 1 0.674 -1.583 -0.028 0.00 0.00 P1 H\r\n", "ATOM 13 CG GLN P 1 -1.248 -0.620 0.480 1.00 0.00 P1 C\r\n", "ATOM 14 HG1 GLN P 1 -1.540 -1.359 1.256 0.00 0.00 P1 H\r\n", "ATOM 15 HG2 GLN P 1 -1.620 0.375 0.800 0.00 0.00 P1 H\r\n", "ATOM 16 CD GLN P 1 -1.940 -1.032 -0.820 1.00 0.00 P1 C\r\n", "ATOM 17 OE1 GLN P 1 -3.156 -1.116 -0.908 1.00 0.00 P1 O\r\n", "ATOM 18 NE2 GLN P 1 -1.104 -1.288 -1.824 1.00 0.00 P1 N\r\n", "ATOM 19 HE21 GLN P 1 -1.512 -1.556 -2.692 0.00 0.00 P1 H\r\n", "ATOM 20 HE22 GLN P 1 -0.122 -1.223 -1.679 0.00 0.00 P1 H\r\n", "END\r\n"],
"ala" : ["ATOM 1 N ALA P 1 -0.829 -0.715 -1.276 0.00 0.00 P1 N\r\n", "ATOM 2 HT1 ALA P 1 -0.561 -1.605 -1.645 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 ALA P 1 -0.520 0.015 -1.886 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 ALA P 1 -1.823 -0.675 -1.173 0.00 0.00 P1 H\r\n", "ATOM 5 C ALA P 1 -0.532 0.768 0.700 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 ALA P 1 -1.137 1.297 0.105 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 ALA P 1 -0.067 0.805 1.585 0.00 0.00 P1 O\r\n", "ATOM 8 CA ALA P 1 -0.208 -0.536 0.032 1.00 0.00 P1 C\r\n", "ATOM 9 HA ALA P 1 -0.557 -1.316 0.699 0.00 0.00 P1 H\r\n", "ATOM 10 CB ALA P 1 1.316 -0.680 -0.104 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 ALA P 1 1.558 -1.667 -0.553 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 ALA P 1 1.734 0.109 -0.766 0.00 0.00 P1 H\r\n", "ATOM 13 HB3 ALA P 1 1.823 -0.618 0.883 0.00 0.00 P1 H\r\n", "END\r\n"],
"arg" : ["ATOM 1 N ARG P 1 2.308 1.700 1.968 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 ARG P 1 1.420 1.444 2.349 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 ARG P 1 2.215 2.527 1.413 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 ARG P 1 2.964 1.857 2.706 0.00 0.00 P1 H\r\n", "ATOM 5 C ARG P 1 4.156 0.992 0.532 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 ARG P 1 4.407 1.903 0.859 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 ARG P 1 4.484 0.244 -0.045 0.00 0.00 P1 O\r\n", "ATOM 8 CA ARG P 1 2.796 0.608 1.120 1.00 0.00 P1 C\r\n", "ATOM 9 HA ARG P 1 2.960 -0.272 1.731 0.00 0.00 P1 H\r\n", "ATOM 10 CB ARG P 1 1.824 0.300 -0.020 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 ARG P 1 1.736 1.236 -0.621 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 ARG P 1 2.274 -0.458 -0.698 0.00 0.00 P1 H\r\n", "ATOM 13 CG ARG P 1 0.456 -0.112 0.524 1.00 0.00 P1 C\r\n", "ATOM 14 HG1 ARG P 1 0.596 -0.963 1.226 0.00 0.00 P1 H\r\n", "ATOM 15 HG2 ARG P 1 0.046 0.720 1.141 0.00 0.00 P1 H\r\n", "ATOM 16 CD ARG P 1 -0.516 -0.420 -0.616 1.00 0.00 P1 C\r\n", "ATOM 17 HD1 ARG P 1 -0.632 0.483 -1.258 0.00 0.00 P1 H\r\n", "ATOM 18 HD2 ARG P 1 -0.151 -1.263 -1.248 0.00 0.00 P1 H\r\n", "ATOM 19 NE ARG P 1 -1.832 -0.816 -0.064 1.00 0.00 P1 N\r\n", "ATOM 20 HE ARG P 1 -1.856 -0.814 0.942 0.00 0.00 P1 H\r\n", "ATOM 21 CZ ARG P 1 -2.900 -1.148 -0.824 1.00 0.00 P1 C\r\n", "ATOM 22 NH1 ARG P 1 -2.784 -1.124 -2.156 1.00 0.00 P1 N\r\n", "ATOM 23 HH11 ARG P 1 -3.559 -1.338 -2.734 0.00 0.00 P1 H\r\n", "ATOM 24 HH12 ARG P 1 -1.928 -0.750 -2.520 0.00 0.00 P1 H\r\n", "ATOM 25 NH2 ARG P 1 -4.056 -1.496 -0.248 1.00 0.00 P1 N\r\n", "ATOM 26 HH21 ARG P 1 -4.807 -1.821 -0.805 0.00 0.00 P1 H\r\n", "ATOM 27 HH22 ARG P 1 -4.049 -1.614 0.736 0.00 0.00 P1 H\r\n", "END\r\n"],
"trp" : ["ATOM 1 HT1 TRP P 1 1.123 1.236 2.517 0.00 0.00 P1 H\r\n", "ATOM 2 HT2 TRP P 1 2.252 2.302 1.998 0.00 0.00 P1 H\r\n", "ATOM 3 HT3 TRP P 1 2.700 1.004 2.891 0.00 0.00 P1 H\r\n", "ATOM 4 C TRP P 1 3.680 0.712 0.472 1.00 0.00 P1 C\r\n", "ATOM 5 OT1 TRP P 1 4.176 1.314 1.098 0.00 0.00 P1 O\r\n", "ATOM 6 OT2 TRP P 1 3.796 0.177 -0.365 0.00 0.00 P1 O\r\n", "ATOM 7 N TRP P 1 2.064 1.340 2.196 1.00 0.00 P1 N\r\n", "ATOM 8 CA TRP P 1 2.240 0.556 0.968 1.00 0.00 P1 C\r\n", "ATOM 9 HA TRP P 1 2.101 -0.491 1.209 0.00 0.00 P1 H\r\n", "ATOM 10 CB TRP P 1 1.200 0.968 -0.076 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 TRP P 1 1.333 2.054 -0.279 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 TRP P 1 1.393 0.435 -1.033 0.00 0.00 P1 H\r\n", "ATOM 13 CG TRP P 1 -0.244 0.760 0.372 1.00 0.00 P1 C\r\n", "ATOM 14 CD1 TRP P 1 -0.868 1.304 1.424 1.00 0.00 P1 C\r\n", "ATOM 15 HD1 TRP P 1 -0.394 2.011 2.092 0.00 0.00 P1 H\r\n", "ATOM 16 NE1 TRP P 1 -2.176 0.880 1.508 1.00 0.00 P1 N\r\n", "ATOM 17 HE1 TRP P 1 -2.851 1.151 2.160 0.00 0.00 P1 H\r\n", "ATOM 18 CE2 TRP P 1 -2.404 0.012 0.448 1.00 0.00 P1 C\r\n", "ATOM 19 CD2 TRP P 1 -1.228 -0.080 -0.268 1.00 0.00 P1 C\r\n", "ATOM 20 CE3 TRP P 1 -1.128 -0.892 -1.412 1.00 0.00 P1 C\r\n", "ATOM 21 HE3 TRP P 1 -0.207 -0.978 -1.972 0.00 0.00 P1 H\r\n", "ATOM 22 CZ3 TRP P 1 -2.304 -1.572 -1.748 1.00 0.00 P1 C\r\n", "ATOM 23 HZ3 TRP P 1 -2.317 -2.215 -2.617 0.00 0.00 P1 H\r\n", "ATOM 24 CZ2 TRP P 1 -3.568 -0.684 0.100 1.00 0.00 P1 C\r\n", "ATOM 25 HZ2 TRP P 1 -4.490 -0.619 0.657 0.00 0.00 P1 H\r\n", "ATOM 26 CH2 TRP P 1 -3.492 -1.492 -1.036 1.00 0.00 P1 C\r\n", "ATOM 27 HH2 TRP P 1 -4.351 -2.059 -1.367 0.00 0.00 P1 H\r\n", "END\r\n"],
"asp" : ["ATOM 1 N ASP P 1 0.140 0.572 1.228 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 ASP P 1 -0.827 0.535 1.479 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 ASP P 1 0.367 1.482 0.881 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 ASP P 1 0.707 0.359 2.024 0.00 0.00 P1 H\r\n", "ATOM 5 C ASP P 1 1.876 -0.368 -0.212 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 ASP P 1 2.333 0.331 0.339 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 ASP P 1 2.048 -1.044 -0.928 0.00 0.00 P1 O\r\n", "ATOM 8 CA ASP P 1 0.400 -0.420 0.176 1.00 0.00 P1 C\r\n", "ATOM 9 HA ASP P 1 0.221 -1.404 0.595 0.00 0.00 P1 H\r\n", "ATOM 10 CB ASP P 1 -0.428 -0.124 -1.076 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 ASP P 1 -0.174 0.888 -1.451 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 ASP P 1 -0.204 -0.858 -1.875 0.00 0.00 P1 H\r\n", "ATOM 13 CG ASP P 1 -1.940 -0.132 -0.868 1.00 0.00 P1 C\r\n", "ATOM 14 OD1 ASP P 1 -2.432 -0.368 0.248 1.00 0.00 P1 O\r\n", "ATOM 15 OD2 ASP P 1 -2.640 0.120 -1.924 1.00 0.00 P1 O\r\n", "END\r\n"],
"met" : ["ATOM 1 N MET P 1 0.208 1.900 -1.116 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 MET P 1 -0.746 1.853 -1.413 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 MET P 1 0.816 1.756 -1.897 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 MET P 1 0.392 2.791 -0.700 0.00 0.00 P1 H\r\n", "ATOM 5 C MET P 1 1.908 0.912 0.340 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 MET P 1 2.369 1.657 -0.141 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 MET P 1 2.067 0.194 1.017 0.00 0.00 P1 O\r\n", "ATOM 8 CA MET P 1 0.452 0.848 -0.120 1.00 0.00 P1 C\r\n", "ATOM 9 HA MET P 1 -0.172 1.053 0.741 0.00 0.00 P1 H\r\n", "ATOM 10 CB MET P 1 0.164 -0.528 -0.716 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 MET P 1 0.859 -0.660 -1.578 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 MET P 1 0.433 -1.315 0.024 0.00 0.00 P1 H\r\n", "ATOM 13 CG MET P 1 -1.288 -0.632 -1.180 1.00 0.00 P1 C\r\n", "ATOM 14 HG1 MET P 1 -1.500 0.131 -1.959 0.00 0.00 P1 H\r\n", "ATOM 15 HG2 MET P 1 -1.465 -1.632 -1.632 0.00 0.00 P1 H\r\n", "ATOM 16 SD MET P 1 -2.408 -0.376 0.228 1.00 0.00 P1 S\r\n", "ATOM 17 CE MET P 1 -1.880 -1.740 1.304 1.00 0.00 P1 C\r\n", "ATOM 18 HE1 MET P 1 -2.475 -1.758 2.242 0.00 0.00 P1 H\r\n", "ATOM 19 HE2 MET P 1 -2.011 -2.721 0.798 0.00 0.00 P1 H\r\n", "ATOM 20 HE3 MET P 1 -0.809 -1.639 1.581 0.00 0.00 P1 H\r\n", "END\r\n"],
"ile" : ["ATOM 1 N ILE P 1 0.692 1.136 1.736 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 ILE P 1 -0.291 1.117 1.920 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 ILE P 1 0.940 1.998 1.294 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 ILE P 1 1.201 1.033 2.591 0.00 0.00 P1 H\r\n", "ATOM 5 C ILE P 1 2.532 0.048 0.556 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 ILE P 1 2.944 0.817 1.045 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 ILE P 1 2.760 -0.711 -0.054 0.00 0.00 P1 O\r\n", "ATOM 8 CA ILE P 1 1.032 0.024 0.840 1.00 0.00 P1 C\r\n", "ATOM 9 HA ILE P 1 0.830 -0.894 1.378 0.00 0.00 P1 H\r\n", "ATOM 10 CB ILE P 1 0.168 0.064 -0.420 1.00 0.00 P1 C\r\n", "ATOM 11 HB ILE P 1 0.323 1.093 -0.833 0.00 0.00 P1 H\r\n", "ATOM 12 CG2 ILE P 1 0.600 -1.008 -1.420 1.00 0.00 P1 C\r\n", "ATOM 13 HG21 ILE P 1 0.076 -0.873 -2.389 0.00 0.00 P1 H\r\n", "ATOM 14 HG22 ILE P 1 1.691 -0.949 -1.617 0.00 0.00 P1 H\r\n", "ATOM 15 HG23 ILE P 1 0.367 -2.024 -1.039 0.00 0.00 P1 H\r\n", "ATOM 16 CG1 ILE P 1 -1.316 -0.048 -0.068 1.00 0.00 P1 C\r\n", "ATOM 17 HG11 ILE P 1 -1.499 -0.989 0.497 0.00 0.00 P1 H\r\n", "ATOM 18 HG12 ILE P 1 -1.592 0.797 0.603 0.00 0.00 P1 H\r\n", "ATOM 19 CD ILE P 1 -2.184 -0.004 -1.328 1.00 0.00 P1 C\r\n", "ATOM 20 HD1 ILE P 1 -3.261 -0.028 -1.055 0.00 0.00 P1 H\r\n", "ATOM 21 HD2 ILE P 1 -1.991 0.926 -1.904 0.00 0.00 P1 H\r\n", "ATOM 22 HD3 ILE P 1 -1.977 -0.875 -1.985 0.00 0.00 P1 H\r\n", "END\r\n"],
"thr" : ["ATOM 1 HT1 THR P 1 -0.612 0.213 1.710 0.00 0.00 P1 H\r\n", "ATOM 2 HT2 THR P 1 0.073 1.602 1.175 0.00 0.00 P1 H\r\n", "ATOM 3 HT3 THR P 1 0.937 0.567 2.106 0.00 0.00 P1 H\r\n", "ATOM 4 C THR P 1 2.000 0.588 -0.300 1.00 0.00 P1 C\r\n", "ATOM 5 OT1 THR P 1 2.240 1.341 0.313 0.00 0.00 P1 O\r\n", "ATOM 6 OT2 THR P 1 2.312 0.110 -1.121 0.00 0.00 P1 O\r\n", "ATOM 7 N THR P 1 0.236 0.640 1.396 1.00 0.00 P1 N\r\n", "ATOM 8 CA THR P 1 0.704 -0.056 0.188 1.00 0.00 P1 C\r\n", "ATOM 9 HA THR P 1 0.920 -1.104 0.444 1.00 0.00 P1 H\r\n", "ATOM 10 CB THR P 1 -0.416 -0.040 -0.848 1.00 0.00 P1 C\r\n", "ATOM 11 HB THR P 1 -0.128 -0.584 -1.760 1.00 0.00 P1 H\r\n", "ATOM 12 OG1 THR P 1 -0.652 1.344 -1.080 1.00 0.00 P1 O\r\n", "ATOM 13 HG1 THR P 1 -0.516 1.540 -2.000 1.00 0.00 P1 H\r\n", "ATOM 14 CG2 THR P 1 -1.744 -0.552 -0.288 1.00 0.00 P1 C\r\n", "ATOM 15 HG21 THR P 1 -2.506 -0.635 -1.091 0.00 0.00 P1 H\r\n", "ATOM 16 HG22 THR P 1 -1.612 -1.559 0.163 0.00 0.00 P1 H\r\n", "ATOM 17 HG23 THR P 1 -2.138 0.131 0.495 0.00 0.00 P1 H\r\n", "END\r\n"],
"pro" : ["ATOM 1 N PRO P 1 -0.656 0.628 1.192 1.00 0.00 P1 N\r\n", "ATOM 2 HN1 PRO P 1 -0.039 1.367 1.463 0.00 0.00 P1 H\r\n", "ATOM 3 HN2 PRO P 1 -1.317 0.450 1.921 0.00 0.00 P1 H\r\n", "ATOM 4 C PRO P 1 1.564 -0.244 0.732 1.00 0.00 P1 C\r\n", "ATOM 5 OT1 PRO P 1 1.686 0.747 0.794 0.00 0.00 P1 O\r\n", "ATOM 6 OT2 PRO P 1 2.070 -1.092 0.573 0.00 0.00 P1 O\r\n", "ATOM 7 CD PRO P 1 -1.396 1.072 0.016 1.00 0.00 P1 C\r\n", "ATOM 8 HD1 PRO P 1 -2.370 0.968 0.546 0.00 0.00 P1 H\r\n", "ATOM 9 HD2 PRO P 1 -1.336 2.057 -0.501 0.00 0.00 P1 H\r\n", "ATOM 10 CA PRO P 1 0.120 -0.572 0.956 1.00 0.00 P1 C\r\n", "ATOM 11 HA PRO P 1 0.037 -1.254 1.794 0.00 0.00 P1 H\r\n", "ATOM 12 CB PRO P 1 -0.460 -1.176 -0.308 1.00 0.00 P1 C\r\n", "ATOM 13 HB1 PRO P 1 -1.339 -1.804 -0.040 0.00 0.00 P1 H\r\n", "ATOM 14 HB2 PRO P 1 0.272 -1.799 -0.860 0.00 0.00 P1 H\r\n", "ATOM 15 CG PRO P 1 -1.228 -0.056 -0.992 1.00 0.00 P1 C\r\n", "ATOM 16 HG1 PRO P 1 -2.016 -0.428 -1.676 0.00 0.00 P1 H\r\n", "ATOM 17 HG2 PRO P 1 -0.515 0.583 -1.561 0.00 0.00 P1 H\r\n", "END\r\n"],
"glu" : ["ATOM 1 N GLU P 1 0.796 0.780 1.740 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 GLU P 1 -0.182 0.786 1.948 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 GLU P 1 1.035 1.589 1.203 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 GLU P 1 1.325 0.765 2.588 0.00 0.00 P1 H\r\n", "ATOM 5 C GLU P 1 2.608 -0.440 0.636 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 GLU P 1 3.032 0.375 1.031 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 GLU P 1 2.821 -1.260 0.104 0.00 0.00 P1 O\r\n", "ATOM 8 CA GLU P 1 1.112 -0.428 0.956 1.00 0.00 P1 C\r\n", "ATOM 9 HA GLU P 1 0.905 -1.305 1.557 0.00 0.00 P1 H\r\n", "ATOM 10 CB GLU P 1 0.276 -0.504 -0.316 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 GLU P 1 0.513 0.388 -0.941 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 GLU P 1 0.584 -1.388 -0.918 0.00 0.00 P1 H\r\n", "ATOM 13 CG GLU P 1 -1.220 -0.544 0.012 1.00 0.00 P1 C\r\n", "ATOM 14 HG1 GLU P 1 -1.446 -1.455 0.595 0.00 0.00 P1 H\r\n", "ATOM 15 HG2 GLU P 1 -1.522 0.347 0.597 0.00 0.00 P1 H\r\n", "ATOM 16 CD GLU P 1 -2.056 -0.624 -1.268 1.00 0.00 P1 C\r\n", "ATOM 17 OE1 GLU P 1 -1.500 -0.644 -2.376 1.00 0.00 P1 O\r\n", "ATOM 18 OE2 GLU P 1 -3.332 -0.660 -1.080 1.00 0.00 P1 O\r\n", "END\r\n"],
"ser" : ["ATOM 1 HT1 SER P 1 -1.351 -0.036 1.845 0.00 0.00 P1 H\r\n", "ATOM 2 HT2 SER P 1 -0.683 1.357 1.302 0.00 0.00 P1 H\r\n", "ATOM 3 HT3 SER P 1 0.176 0.363 2.280 0.00 0.00 P1 H\r\n", "ATOM 4 C SER P 1 1.312 0.364 -0.088 1.00 0.00 P1 C\r\n", "ATOM 5 OT1 SER P 1 1.514 1.134 0.517 0.00 0.00 P1 O\r\n", "ATOM 6 OT2 SER P 1 1.662 -0.122 -0.889 0.00 0.00 P1 O\r\n", "ATOM 7 N SER P 1 -0.504 0.404 1.548 1.00 0.00 P1 N\r\n", "ATOM 8 CA SER P 1 0.016 -0.304 0.372 1.00 0.00 P1 C\r\n", "ATOM 9 HA SER P 1 0.267 -1.306 0.694 0.00 0.00 P1 H\r\n", "ATOM 10 CB SER P 1 -1.000 -0.320 -0.768 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 SER P 1 -0.543 -0.856 -1.631 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 SER P 1 -1.907 -0.893 -0.471 0.00 0.00 P1 H\r\n", "ATOM 13 OG SER P 1 -1.352 0.992 -1.192 1.00 0.00 P1 O\r\n", "ATOM 14 HG1 SER P 1 -1.808 0.904 -2.038 0.00 0.00 P1 H\r\n", "END\r\n"],
"asn" : ["ATOM 1 N ASN P 1 0.536 0.140 1.356 1.00 0.00 P1 N\r\n", "ATOM 2 HT1 ASN P 1 -0.388 -0.016 1.706 0.00 0.00 P1 H\r\n", "ATOM 3 HT2 ASN P 1 0.693 1.120 1.233 0.00 0.00 P1 H\r\n", "ATOM 4 HT3 ASN P 1 1.210 -0.236 1.992 0.00 0.00 P1 H\r\n", "ATOM 5 C ASN P 1 2.088 -0.296 -0.480 1.00 0.00 P1 C\r\n", "ATOM 6 OT1 ASN P 1 2.597 0.264 0.174 0.00 0.00 P1 O\r\n", "ATOM 7 OT2 ASN P 1 2.180 -0.755 -1.363 0.00 0.00 P1 O\r\n", "ATOM 8 CA ASN P 1 0.676 -0.532 0.060 1.00 0.00 P1 C\r\n", "ATOM 9 HA ASN P 1 0.569 -1.595 0.246 0.00 0.00 P1 H\r\n", "ATOM 10 CB ASN P 1 -0.316 0.028 -0.960 1.00 0.00 P1 C\r\n", "ATOM 11 HB1 ASN P 1 -0.116 1.117 -1.067 0.00 0.00 P1 H\r\n", "ATOM 12 HB2 ASN P 1 -0.153 -0.439 -1.953 0.00 0.00 P1 H\r\n", "ATOM 13 CG ASN P 1 -1.760 -0.168 -0.484 1.00 0.00 P1 C\r\n", "ATOM 14 OD1 ASN P 1 -2.220 -1.272 -0.264 1.00 0.00 P1 O\r\n", "ATOM 15 ND2 ASN P 1 -2.440 0.964 -0.340 1.00 0.00 P1 N\r\n", "ATOM 16 HD21 ASN P 1 -3.381 0.895 -0.021 0.00 0.00 P1 H\r\n", "ATOM 17 HD22 ASN P 1 -1.998 1.837 -0.519 0.00 0.00 P1 H\r\n", "END\r\n"]}
]]></AminoAcidPdbStr>
<AminoAcidPdbBeh><![CDATA[
var me, beh = {
postConfigure: function() {
me = this.cnode;
var pdbNode = me.parent();
var jsonStr = pdbNode.first().text();
var jso = $wnd.JSON.parse(jsonStr);
pdbNode["pdb"] = jso;
pdbNode.first().remove();
me.remove();
$wnd.console.log(pdbNode["pdb"]);
}
}
]]></AminoAcidPdbBeh>
</AminoAcidPdb>
</PhysicalSystem>
<chainbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
$wnd.xh.chainbehavior = function chainbehavior() {}
$wnd.xh.chainbehavior.prototype.postConfigure = function() {
// "The command 'chain' converts this list into a building block, called myChain."
this.chain = this.cnode.parent();
var seqNode = this.chain.first();
if (seqNode) {
var seq = seqNode.text();
seqNode.remove();
this.chain.println(seq);
if (seq) {
var xmlStr = "<_-.aminoacids>\n";
for (var i = 0; i < seq.length; i++) {
var item = seq.charAt(i);
switch (item) {
// the amino acid names, letter codes, and standard abbreviations are taken from Table 1 in the Matriarch User's Guide[3]
case "A": xmlStr += ' <Alanine roleName="A ala"></Alanine>\n'; break;
case "R": xmlStr += ' <Arginine roleName="R arg"/>\n'; break;
case "N": xmlStr += ' <Asparagine roleName="N asn"/>\n'; break;
case "D": xmlStr += ' <AsparticAcid roleName="D asp"/>\n'; break;
case "C": xmlStr += ' <Cysteine roleName="C cys"/>\n'; break;
case "Q": xmlStr += ' <Glutamine roleName="Q gln"/>\n'; break;
case "E": xmlStr += ' <GlutamicAcid roleName="E glu"/>\n'; break;
case "G": xmlStr += ' <Glycine roleName="G gly"/>\n'; break;
case "H": xmlStr += ' <Histidine roleName="H his"/>\n'; break;
case "Z": xmlStr += ' <Hydroxyproline roleName="Z hyp"/>\n'; break;
case "I": xmlStr += ' <Isoleucine roleName="I ile"/>\n'; break;
case "L": xmlStr += ' <Leucine roleName="L leu"/>\n'; break;
case "K": xmlStr += ' <Lysine roleName="K lys"/>\n'; break;
case "M": xmlStr += ' <Methionine roleName="M met"/>\n'; break;
case "F": xmlStr += ' <Phenylalanine roleName="F phe"/>\n'; break;
case "P": xmlStr += ' <Proline roleName="P pro"></Proline>\n'; break;
case "S": xmlStr += ' <Serine roleName="S ser"/>\n'; break;
case "T": xmlStr += ' <Threonine roleName="T thr"/>\n'; break;
case "W": xmlStr += ' <Tryptophan roleName="W trp"/>\n'; break;
case "Y": xmlStr += ' <Tyrosine roleName="Y tyr"></Tyrosine>\n'; break;
case "V": xmlStr += ' <Valine roleName="V val"/>\n'; break;
default: break;
}
}
xmlStr += "</_-.aminoacids>\n";
this.chain.append(xmlStr);
}
}
this.cnode.remove();
// add PDB to each amino acid instance
var pdb = this.chain.xpath("ancestor::PhysicalSystem/descendant::AminoAcidPdb").pdb;
$wnd.console.log(this.chain.name());
$wnd.console.log(pdb);
var aa = this.chain.first();
while (aa) {
var abbrev = aa.role().split(" ")[1];
var aapdb = pdb[abbrev];
$wnd.console.log(aapdb);
aa.pdb = aapdb;
aa = aa.next();
}
};
]]></chainbehavior>
<attachSeriesbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
$wnd.xh.attachSeriesbehavior = function attachSeriesbehavior() {}
$wnd.xh.attachSeriesbehavior.prototype.postConfigure = function() {
// "Using the building instruction 'attachSeries', this building block is attached to itself, end-to-end, five times to create a new building block, myLongChain"
this.attachSeries = this.cnode.parent();
var myChain = this.attachSeries.first();
if (myChain) {
$wnd.console.log(this.attachSeries);
this.attachSeries.println(this.attachSeries.n);
for (var i = 0; i < this.attachSeries.n; i++) {
this.attachBuildingBlock(myChain);
}
}
myChain.remove();
this.cnode.remove();
};
$wnd.xh.attachSeriesbehavior.prototype.attachBuildingBlock = function(bb) {
var node = bb.first();
while (node) {
this.attachSeries.append(node.cloneLastChild().last().remove());
var aa = this.attachSeries.last();
aa.pdb = node.pdb;
aa.obj = function() {return this.pdb;}
node = node.next();
}
}
]]></attachSeriesbehavior>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Matriarch</title>
<rect id="PhysicalSystem/Matriarch" fill="#98FB98" height="50" width="50" x="25" y="0"/>
<g>
<title>Matriarch</title>
<rect id="PhysicalSystem/Matriarch" fill="#6AB06A" height="50" width="10" x="80" y="0"/>
</g>
</g>
</svg>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
</XholonWorkbook>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment