From ccd1ce410c9f2a42a5df751d9b70c9c9e9749e08 Mon Sep 17 00:00:00 2001 From: dechin Date: Thu, 19 Oct 2023 14:49:13 +0800 Subject: [PATCH] Update the multi-chain process --- .../src/sponge/data/template/protein0.yaml | 130 +++++++++--------- .../src/sponge/data/template/water_3p.yaml | 2 +- .../src/sponge/potential/bias/oscillator.py | 1 + .../src/sponge/system/modelling/hadder.py | 54 +++++++- .../sponge/system/modelling/pdb_generator.py | 24 +++- .../src/sponge/system/modelling/pdb_parser.py | 29 ++-- .../src/sponge/system/molecule/protein.py | 45 ++++-- .../src/sponge/system/residue/residue.py | 24 ++-- 8 files changed, 202 insertions(+), 107 deletions(-) diff --git a/MindSPONGE/src/sponge/data/template/protein0.yaml b/MindSPONGE/src/sponge/data/template/protein0.yaml index 262a727d6..0cb149fce 100644 --- a/MindSPONGE/src/sponge/data/template/protein0.yaml +++ b/MindSPONGE/src/sponge/data/template/protein0.yaml @@ -3,7 +3,7 @@ template: atom_name: [N, H, CA, HA, CB, HB1, HB2, HB3, C, O] atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 8], [4, 5], [4, 6], [4, 7], [8, 9]] + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 8], [4, 5], [4, 6], [4, 7], [8, 9]] head_atom: 0 tail_atom: 8 ARG: @@ -14,7 +14,7 @@ template: 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 7, 1, 6, 7, 1, 1, 7, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 22], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 22], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 10], [10, 11], [10, 12], [10, 13], [13, 14], [13, 15], [15, 16], [15, 19], [16, 17], [16, 18], [19, 20], [19, 21], [22, 23]] head_atom: 0 @@ -24,7 +24,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0, 14.01, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 8, 7, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 12], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 12], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [9, 10], [9, 11], [12, 13]] head_atom: 0 tail_atom: 12 @@ -33,7 +33,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0, 16.0, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 8, 8, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 10], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 10], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [10, 11]] head_atom: 0 tail_atom: 10 @@ -42,7 +42,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 32.06, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 16, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 9], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 9], [4, 5], [4, 6], [4, 7], [7, 8], [9, 10]] head_atom: 0 tail_atom: 9 @@ -52,7 +52,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0, 14.01, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 8, 7, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 10], [10, 11], [10, 12], [12, 13], [12, 14], [15, 16]] head_atom: 0 tail_atom: 15 @@ -61,7 +61,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0, 16.0, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 8, 8, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 13], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 13], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 10], [10, 11], [10, 12], [13, 14]] head_atom: 0 tail_atom: 13 @@ -69,7 +69,7 @@ template: atom_name: [N, H, CA, HA2, HA3, C, O] atom_mass: [14.01, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 5], [5, 6]] + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 5], [5, 6]] head_atom: 0 tail_atom: 5 HID: @@ -78,7 +78,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 14.01, 1.008, 12.01, 1.008, 14.01, 12.01, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 7, 1, 6, 1, 7, 6, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], [7, 13], [8, 9], [8, 10], [10, 11], [10, 12], [12, 13], [13, 14], [15, 16]] head_atom: 0 tail_atom: 15 @@ -88,7 +88,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 14.01, 12.01, 1.008, 14.01, 1.008, 12.01, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 7, 6, 1, 7, 1, 6, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], [7, 13], [8, 9], [9, 10], [9, 11], [11, 12], [11, 13], [13, 14], [15, 16]] head_atom: 0 tail_atom: 15 @@ -98,7 +98,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 6, 1, 1, 1, 6, 1, 1, 6, 1, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 17], [4, 5], [4, 6], [4, 10], [6, + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 17], [4, 5], [4, 6], [4, 10], [6, 7], [6, 8], [6, 9], [10, 11], [10, 12], [10, 13], [13, 14], [13, 15], [13, 16], [17, 18]] head_atom: 0 @@ -109,7 +109,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 1, 6, 1, 1, 1, 6, 1, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 17], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 17], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 13], [9, 10], [9, 11], [9, 12], [13, 14], [13, 15], [13, 16], [17, 18]] head_atom: 0 @@ -122,7 +122,7 @@ template: 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 7, 1, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 20], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 20], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 10], [10, 11], [10, 12], [10, 13], [13, 14], [13, 15], [13, 16], [16, 17], [16, 18], [16, 19], [20, 21]] head_atom: 0 @@ -133,7 +133,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 32.06, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 16, 6, 1, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 10], [10, 11], [11, 12], [11, 13], [11, 14], [15, 16]] head_atom: 0 tail_atom: 15 @@ -143,7 +143,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 18], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 18], [4, 5], [4, 6], [4, 7], [7, 8], [7, 16], [8, 9], [8, 10], [10, 11], [10, 12], [12, 13], [12, 14], [14, 15], [14, 16], [16, 17], [18, 19]] head_atom: 0 @@ -153,7 +153,7 @@ template: atom_mass: [14.01, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 12.01, 16.0] atomic_number: [7, 6, 1, 1, 6, 1, 1, 6, 1, 1, 6, 1, 6, 8] - bond: [[0, 1], [0, 10], [1, 2], [1, 3], [1, 4], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 10], [1, 2], [1, 3], [1, 4], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 10], [10, 11], [10, 12], [12, 13]] head_atom: 0 tail_atom: 12 @@ -162,7 +162,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 16.0, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 8, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 9], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 9], [4, 5], [4, 6], [4, 7], [7, 8], [9, 10]] head_atom: 0 tail_atom: 9 @@ -171,7 +171,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 16.0, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 6, 1, 1, 1, 8, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 12], [4, 5], [4, 6], [4, 10], [6, + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 12], [4, 5], [4, 6], [4, 10], [6, 7], [6, 8], [6, 9], [10, 11], [12, 13]] head_atom: 0 tail_atom: 12 @@ -183,7 +183,7 @@ template: 12.01, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 6, 1, 7, 1, 6, 6, 1, 6, 1, 6, 1, 6, 1, 6, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 22], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 22], [4, 5], [4, 6], [4, 7], [7, 8], [7, 21], [8, 9], [8, 10], [10, 11], [10, 12], [12, 13], [12, 21], [13, 14], [13, 15], [15, 16], [15, 17], [17, 18], [17, 19], [19, 20], [19, 21], [22, 23]] head_atom: 0 @@ -194,7 +194,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 12.01, 1.008, 12.01, 1.008, 12.01, 16.0, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 6, 1, 6, 1, 6, 8, 1, 6, 1, 6, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 19], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 19], [4, 5], [4, 6], [4, 7], [7, 8], [7, 17], [8, 9], [8, 10], [10, 11], [10, 12], [12, 13], [12, 15], [13, 14], [15, 16], [15, 17], [17, 18], [19, 20]] head_atom: 0 @@ -205,7 +205,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 6, 1, 1, 1, 6, 1, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 14], [4, 5], [4, 6], [4, 10], [6, + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 14], [4, 5], [4, 6], [4, 10], [6, 7], [6, 8], [6, 9], [10, 11], [10, 12], [10, 13], [14, 15]] head_atom: 0 tail_atom: 14 @@ -214,7 +214,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 10], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 10], [6, 7], [6, 8], [6, 9], [10, 11]] head_atom: null tail_atom: 10 @@ -226,7 +226,7 @@ template: 14.01, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 7, 1, 6, 7, 1, 1, 7, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 24], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 24], [6, 7], [6, 8], [6, 9], [9, 10], [9, 11], [9, 12], [12, 13], [12, 14], [12, 15], [15, 16], [15, 17], [17, 18], [17, 21], [18, 19], [18, 20], [21, 22], [21, 23], [24, 25]] head_atom: null @@ -237,7 +237,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0, 14.01, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 6, 8, 7, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 14], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 14], [6, 7], [6, 8], [6, 9], [9, 10], [9, 11], [11, 12], [11, 13], [14, 15]] head_atom: null tail_atom: 14 @@ -246,7 +246,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0, 16.0, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 6, 8, 8, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 12], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 12], [6, 7], [6, 8], [6, 9], [9, 10], [9, 11], [12, 13]] head_atom: null tail_atom: 12 @@ -255,7 +255,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 32.06, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 16, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 11], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 11], [6, 7], [6, 8], [6, 9], [9, 10], [11, 12]] head_atom: null tail_atom: 11 @@ -265,7 +265,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0, 14.01, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 8, 7, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 17], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 17], [6, 7], [6, 8], [6, 9], [9, 10], [9, 11], [9, 12], [12, 13], [12, 14], [14, 15], [14, 16], [17, 18]] head_atom: null @@ -276,7 +276,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0, 16.0, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 8, 8, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 15], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 15], [6, 7], [6, 8], [6, 9], [9, 10], [9, 11], [9, 12], [12, 13], [12, 14], [15, 16]] head_atom: null tail_atom: 15 @@ -284,7 +284,7 @@ template: atom_name: [N, H1, H2, H3, CA, HA2, HA3, C, O] atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 7], [7, 8]] + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 7], [7, 8]] head_atom: null tail_atom: 7 NHID: @@ -293,7 +293,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 14.01, 1.008, 12.01, 1.008, 14.01, 12.01, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 6, 7, 1, 6, 1, 7, 6, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 17], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 17], [6, 7], [6, 8], [6, 9], [9, 10], [9, 15], [10, 11], [10, 12], [12, 13], [12, 14], [14, 15], [15, 16], [17, 18]] head_atom: null @@ -304,7 +304,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 14.01, 12.01, 1.008, 14.01, 1.008, 12.01, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 6, 7, 6, 1, 7, 1, 6, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 17], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 17], [6, 7], [6, 8], [6, 9], [9, 10], [9, 15], [10, 11], [11, 12], [11, 13], [13, 14], [13, 15], [15, 16], [17, 18]] head_atom: null @@ -315,7 +315,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 6, 1, 1, 1, 6, 1, 1, 6, 1, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 19], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 19], [6, 7], [6, 8], [6, 12], [8, 9], [8, 10], [8, 11], [12, 13], [12, 14], [12, 15], [15, 16], [15, 17], [15, 18], [19, 20]] head_atom: null @@ -326,7 +326,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 6, 1, 6, 1, 1, 1, 6, 1, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 19], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 19], [6, 7], [6, 8], [6, 9], [9, 10], [9, 11], [9, 15], [11, 12], [11, 13], [11, 14], [15, 16], [15, 17], [15, 18], [19, 20]] head_atom: null @@ -339,7 +339,7 @@ template: 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 7, 1, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 22], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 22], [6, 7], [6, 8], [6, 9], [9, 10], [9, 11], [9, 12], [12, 13], [12, 14], [12, 15], [15, 16], [15, 17], [15, 18], [18, 19], [18, 20], [18, 21], [22, 23]] head_atom: null @@ -350,7 +350,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 32.06, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 6, 1, 1, 16, 6, 1, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 17], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 17], [6, 7], [6, 8], [6, 9], [9, 10], [9, 11], [9, 12], [12, 13], [13, 14], [13, 15], [13, 16], [17, 18]] head_atom: null @@ -363,7 +363,7 @@ template: 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 6, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 20], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 20], [6, 7], [6, 8], [6, 9], [9, 10], [9, 18], [10, 11], [10, 12], [12, 13], [12, 14], [14, 15], [14, 16], [16, 17], [16, 18], [18, 19], [20, 21]] head_atom: null @@ -373,7 +373,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 6, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 12], [3, 4], [3, 5], [3, 6], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 12], [3, 4], [3, 5], [3, 6], [6, 7], [6, 8], [6, 9], [9, 10], [9, 11], [9, 12], [12, 13], [12, 14], [14, 15]] head_atom: null tail_atom: 14 @@ -382,7 +382,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 16.0, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 8, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 11], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 11], [6, 7], [6, 8], [6, 9], [9, 10], [11, 12]] head_atom: null tail_atom: 11 @@ -392,7 +392,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 16.0, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 6, 1, 1, 1, 8, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 14], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 14], [6, 7], [6, 8], [6, 12], [8, 9], [8, 10], [8, 11], [12, 13], [14, 15]] head_atom: null tail_atom: 14 @@ -404,7 +404,7 @@ template: 12.01, 1.008, 12.01, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 6, 6, 1, 7, 1, 6, 6, 1, 6, 1, 6, 1, 6, 1, 6, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 24], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 24], [6, 7], [6, 8], [6, 9], [9, 10], [9, 23], [10, 11], [10, 12], [12, 13], [12, 14], [14, 15], [14, 23], [15, 16], [15, 17], [17, 18], [17, 19], [19, 20], [19, 21], [21, 22], [21, 23], [24, 25]] @@ -418,7 +418,7 @@ template: 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 1, 6, 6, 1, 6, 1, 6, 8, 1, 6, 1, 6, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 21], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 21], [6, 7], [6, 8], [6, 9], [9, 10], [9, 19], [10, 11], [10, 12], [12, 13], [12, 14], [14, 15], [14, 17], [15, 16], [17, 18], [17, 19], [19, 20], [21, 22]] head_atom: null @@ -429,7 +429,7 @@ template: atom_mass: [14.01, 1.008, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0] atomic_number: [7, 1, 1, 1, 6, 1, 6, 1, 6, 1, 1, 1, 6, 1, 1, 1, 6, 8] - bond: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 16], [6, 7], [6, 8], + bonds: [[0, 1], [0, 2], [0, 3], [0, 4], [4, 5], [4, 6], [4, 16], [6, 7], [6, 8], [6, 12], [8, 9], [8, 10], [8, 11], [12, 13], [12, 14], [12, 15], [16, 17]] head_atom: null tail_atom: 16 @@ -438,7 +438,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 8], [4, 5], [4, 6], [4, 7], [8, 9], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 8], [4, 5], [4, 6], [4, 7], [8, 9], [8, 10]] head_atom: 0 tail_atom: null @@ -450,7 +450,7 @@ template: 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 7, 1, 6, 7, 1, 1, 7, 1, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 22], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 22], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 10], [10, 11], [10, 12], [10, 13], [13, 14], [13, 15], [15, 16], [15, 19], [16, 17], [16, 18], [19, 20], [19, 21], [22, 23], [22, 24]] head_atom: 0 @@ -460,7 +460,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0, 14.01, 1.008, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 8, 7, 1, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 12], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 12], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [9, 10], [9, 11], [12, 13], [12, 14]] head_atom: 0 tail_atom: null @@ -469,7 +469,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0, 16.0, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 8, 8, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 10], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 10], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [10, 11], [10, 12]] head_atom: 0 tail_atom: null @@ -478,7 +478,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 32.06, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 16, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 9], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 9], [4, 5], [4, 6], [4, 7], [7, 8], [9, 10], [9, 11]] head_atom: 0 tail_atom: null @@ -488,7 +488,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0, 14.01, 1.008, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 8, 7, 1, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 10], [10, 11], [10, 12], [12, 13], [12, 14], [15, 16], [15, 17]] head_atom: 0 tail_atom: null @@ -497,7 +497,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0, 16.0, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 8, 8, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 13], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 13], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 10], [10, 11], [10, 12], [13, 14], [13, 15]] head_atom: 0 tail_atom: null @@ -505,7 +505,7 @@ template: atom_name: [N, H, CA, HA2, HA3, C, O, OXT] atom_mass: [14.01, 1.008, 12.01, 1.008, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 5], [5, 6], [5, 7]] + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 5], [5, 6], [5, 7]] head_atom: 0 tail_atom: null CHID: @@ -514,7 +514,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 14.01, 1.008, 12.01, 1.008, 14.01, 12.01, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 7, 1, 6, 1, 7, 6, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], [7, 13], [8, 9], [8, 10], [10, 11], [10, 12], [12, 13], [13, 14], [15, 16], [15, 17]] head_atom: 0 @@ -525,7 +525,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 14.01, 12.01, 1.008, 14.01, 1.008, 12.01, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 7, 6, 1, 7, 1, 6, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], [7, 13], [8, 9], [9, 10], [9, 11], [11, 12], [11, 13], [13, 14], [15, 16], [15, 17]] head_atom: 0 @@ -536,7 +536,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 6, 1, 1, 1, 6, 1, 1, 6, 1, 1, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 17], [4, 5], [4, 6], [4, 10], [6, + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 17], [4, 5], [4, 6], [4, 10], [6, 7], [6, 8], [6, 9], [10, 11], [10, 12], [10, 13], [13, 14], [13, 15], [13, 16], [17, 18], [17, 19]] head_atom: 0 @@ -547,7 +547,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 1, 6, 1, 1, 1, 6, 1, 1, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 17], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 17], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 13], [9, 10], [9, 11], [9, 12], [13, 14], [13, 15], [13, 16], [17, 18], [17, 19]] head_atom: 0 @@ -560,7 +560,7 @@ template: 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 6, 1, 1, 7, 1, 1, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 20], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 20], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 10], [10, 11], [10, 12], [10, 13], [13, 14], [13, 15], [13, 16], [16, 17], [16, 18], [16, 19], [20, 21], [20, 22]] head_atom: 0 @@ -571,7 +571,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 32.06, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 1, 1, 16, 6, 1, 1, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 15], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 10], [10, 11], [11, 12], [11, 13], [11, 14], [15, 16], [15, 17]] head_atom: 0 tail_atom: null @@ -581,7 +581,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 12.01, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 6, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 18], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 18], [4, 5], [4, 6], [4, 7], [7, 8], [7, 16], [8, 9], [8, 10], [10, 11], [10, 12], [12, 13], [12, 14], [14, 15], [14, 16], [16, 17], [18, 19], [18, 20]] head_atom: 0 @@ -591,7 +591,7 @@ template: atom_mass: [14.01, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 1.008, 12.01, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 6, 1, 1, 6, 1, 1, 6, 1, 1, 6, 1, 6, 8, 8] - bond: [[0, 1], [0, 10], [1, 2], [1, 3], [1, 4], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 10], [1, 2], [1, 3], [1, 4], [4, 5], [4, 6], [4, 7], [7, 8], [7, 9], [7, 10], [10, 11], [10, 12], [12, 13], [12, 14]] head_atom: 0 tail_atom: null @@ -600,7 +600,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 16.0, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 8, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 9], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 9], [4, 5], [4, 6], [4, 7], [7, 8], [9, 10], [9, 11]] head_atom: 0 tail_atom: null @@ -609,7 +609,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 16.0, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 6, 1, 1, 1, 8, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 12], [4, 5], [4, 6], [4, 10], [6, + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 12], [4, 5], [4, 6], [4, 10], [6, 7], [6, 8], [6, 9], [10, 11], [12, 13], [12, 14]] head_atom: 0 tail_atom: null @@ -621,7 +621,7 @@ template: 12.01, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 6, 1, 7, 1, 6, 6, 1, 6, 1, 6, 1, 6, 1, 6, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 22], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 22], [4, 5], [4, 6], [4, 7], [7, 8], [7, 21], [8, 9], [8, 10], [10, 11], [10, 12], [12, 13], [12, 21], [13, 14], [13, 15], [15, 16], [15, 17], [17, 18], [17, 19], [19, 20], [19, 21], [22, 23], [22, 24]] @@ -634,7 +634,7 @@ template: 12.01, 1.008, 12.01, 16.0, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 1, 6, 6, 1, 6, 1, 6, 8, 1, 6, 1, 6, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 19], [4, 5], [4, 6], [4, 7], [7, 8], + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 19], [4, 5], [4, 6], [4, 7], [7, 8], [7, 17], [8, 9], [8, 10], [10, 11], [10, 12], [12, 13], [12, 15], [13, 14], [15, 16], [15, 17], [17, 18], [19, 20], [19, 21]] head_atom: 0 @@ -645,7 +645,7 @@ template: atom_mass: [14.01, 1.008, 12.01, 1.008, 12.01, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 1.008, 1.008, 1.008, 12.01, 16.0, 16.0] atomic_number: [7, 1, 6, 1, 6, 1, 6, 1, 1, 1, 6, 1, 1, 1, 6, 8, 8] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 14], [4, 5], [4, 6], [4, 10], [6, + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 14], [4, 5], [4, 6], [4, 10], [6, 7], [6, 8], [6, 9], [10, 11], [10, 12], [10, 13], [14, 15], [14, 16]] head_atom: 0 tail_atom: null @@ -653,13 +653,13 @@ template: atom_name: [H1, CH3, H2, H3, C, O] atom_mass: [1.008, 12.01, 1.008, 1.008, 12.01, 16.0] atomic_number: [1, 6, 1, 1, 6, 8] - bond: [[0, 1], [1, 2], [1, 3], [1, 4], [4, 5]] + bonds: [[0, 1], [1, 2], [1, 3], [1, 4], [4, 5]] head_atom: null tail_atom: 4 NME: atom_name: [N, H, CH3, HH31, HH32, HH33] atom_mass: [14.01, 1.008, 12.01, 1.008, 1.008, 1.008] atomic_number: [7, 1, 6, 1, 1, 1] - bond: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 5]] + bonds: [[0, 1], [0, 2], [2, 3], [2, 4], [2, 5]] head_atom: 0 tail_atom: null diff --git a/MindSPONGE/src/sponge/data/template/water_3p.yaml b/MindSPONGE/src/sponge/data/template/water_3p.yaml index 632d357f1..cee8e50b6 100644 --- a/MindSPONGE/src/sponge/data/template/water_3p.yaml +++ b/MindSPONGE/src/sponge/data/template/water_3p.yaml @@ -4,7 +4,7 @@ template: atom_type: [OW, HW, HW] atom_mass: [16.00, 1.008, 1.008] atomic_number: [8, 1, 1] - bond: + bonds: - [0, 1] - [0, 2] head_atom: null diff --git a/MindSPONGE/src/sponge/potential/bias/oscillator.py b/MindSPONGE/src/sponge/potential/bias/oscillator.py index 8af217674..cd992706f 100644 --- a/MindSPONGE/src/sponge/potential/bias/oscillator.py +++ b/MindSPONGE/src/sponge/potential/bias/oscillator.py @@ -58,6 +58,7 @@ class OscillatorBias(Bias): self.k = Tensor(k, ms.float32) self.nonh_mask = Tensor(1 - nonh_mask, ms.int32) + @ms.jit def construct(self, coordinate: Tensor, neighbour_index: Tensor = None, diff --git a/MindSPONGE/src/sponge/system/modelling/hadder.py b/MindSPONGE/src/sponge/system/modelling/hadder.py index be6c88b2e..715f5191e 100644 --- a/MindSPONGE/src/sponge/system/modelling/hadder.py +++ b/MindSPONGE/src/sponge/system/modelling/hadder.py @@ -24,6 +24,7 @@ """ H-Adder Module. """ +import os import sys import time import numpy as np @@ -31,6 +32,9 @@ from .add_missing_atoms import add_h from .pdb_generator import gen_pdb from .pdb_parser import _read_pdb +RESIDUE_NAMES = np.array(['ALA', 'ARG', 'ASN', 'ASP', 'CYS', 'GLN', 'GLU', 'GLY', 'HID', 'HIS', + 'ILE', 'LEU', 'LYS', 'MET', 'PHE', 'PRO', 'SER', 'THR', 'TRP', 'TYR', 'VAL'], np.str_) + hnames = {'ACE': {'CH3': ['H1', 'H2', 'H3']}, 'ALA': {'N': ['H'], 'CA': ['HA'], 'CB': ['HB1', 'HB2', 'HB3']}, 'ARG': {'N': ['H'], 'CA': ['HA'], 'CB': ['HB2', 'HB3'], 'CG': ['HG2', 'HG3'], 'CD': ['HD2', 'HD3'], @@ -132,6 +136,8 @@ hnames = {'ACE': {'CH3': ['H1', 'H2', 'H3']}, 'CE2': ['HE2'], 'CD2': ['HD2']}, 'VAL': {'N': ['H'], 'CA': ['HA'], 'CB': ['HB'], 'CG1': ['HG11', 'HG12', 'HG13'], 'CG2': ['HG21', 'HG22', 'HG23']}, + 'WAT': {'O': ['H1', 'H2']}, + 'HOH': {'O': ['H1', 'H2']} } hbond_type = { @@ -631,6 +637,12 @@ hbond_type = { 'NME': { 'N': np.array(['c6', 'CH3', 'C']), 'CH3': np.array(['ch3', 'N', 'C']) + }, + 'WAT': { + 'O': np.array(['wat', 'O', 'O']) + }, + 'HOH': { + 'O': np.array(['wat', 'O', 'O']) } } @@ -639,7 +651,8 @@ addhs = {'c6': 1, 'c2h4': 2, 'ch3': 3, 'cc3': 1, - 'c2h2': 2} + 'c2h2': 2, + 'wat': 2} sys.path.append('../') @@ -658,21 +671,43 @@ def add_hydrogen(pdb_in, pdb_out): pdb_obj = _read_pdb(pdb_name, rebuild_hydrogen=True) atom_names = pdb_obj.atom_names res_names = pdb_obj.res_names + crds = pdb_obj.crds + chain_id = pdb_obj.chain_id + is_amino = np.isin(res_names, RESIDUE_NAMES) + + for i, res in enumerate(res_names): + if res == 'HIE': + res_names[i] = 'HIS' + if res == 'HOH': + res_names[i] = 'WAT' + if not is_amino[i]: + continue + if i == 0: + res_names[i] = 'N' * (res != 'ACE') + res + continue + elif i == len(res_names) - 1: + res_names[i] = 'C' * (res != 'NME') + res + break + if chain_id[i] < chain_id[i + 1]: + res_names[i] = 'C' * (res != 'ACE') + res + if chain_id[i] > chain_id[i - 1]: + res_names[i] = 'N' * (res != 'ACE') + res for i, res in enumerate(res_names): - res = 'N' * (i == 0 and res != 'ACE') + res - res = 'C' * (i == (len(res_names) - 1) and res != 'NME') + res h_names = [] crds[i] = np.array(crds[i]) + if res == 'NME': c_index = np.where(np.array(atom_names[i - 1]) == 'C') atom_names[i].insert(0, 'C') crds[i] = np.append(crds[i - 1][c_index], crds[i], axis=-2) + for atom in atom_names[i]: if atom == 'C' and len(res) == 4 and res.startswith( 'C') and np.isin(atom_names[i], 'OXT').sum() == 1: continue + if atom in hbond_type[res].keys() and len( hbond_type[res][atom].shape) == 1: addh_type = hbond_type[res][atom][0] @@ -690,6 +725,7 @@ def add_hydrogen(pdb_in, pdb_out): j=n, k=o) crds[i] = np.append(crds[i], new_crd, axis=0) + elif atom in hbond_type[res].keys(): for j, hbond in enumerate(hbond_type[res][atom]): addh_type = hbond[0] @@ -703,8 +739,10 @@ def add_hydrogen(pdb_in, pdb_out): j=n, k=o) crds[i] = np.append(crds[i], new_crd, axis=0) + else: continue + atom_names[i].extend(h_names) if res == 'NME': @@ -730,13 +768,17 @@ def add_hydrogen(pdb_in, pdb_out): print('[Error] Adding hydrogen atoms failed.') raise ValueError('The value of crd after adding hydrogen is empty!') + # Clear old pdb files. + if os.path.exists(new_pdb_name): + os.remove(new_pdb_name) + gen_pdb(new_crds[None, :], new_atom_names, - new_res_names, new_res_ids, new_pdb_name) + new_res_names, new_res_ids, chain_id=chain_id, pdb_name=new_pdb_name) end_time = time.time() print( - '[MindSPONGE] Adding {} hydrogen atoms for the protein molecule in {} seconds.'.format( - round(len(new_crds), 3), round(end_time - start_time, 3))) + '[MindSPONGE] 1 H-Adding task with {} atoms complete in {} seconds.'.format( + new_crds.shape[-2], round(end_time - start_time, 3))) def read_pdb(pdb_name: str, rebuild_hydrogen: bool = False, rebuild_suffix: str = '_addH', diff --git a/MindSPONGE/src/sponge/system/modelling/pdb_generator.py b/MindSPONGE/src/sponge/system/modelling/pdb_generator.py index 73873217d..687db3843 100644 --- a/MindSPONGE/src/sponge/system/modelling/pdb_generator.py +++ b/MindSPONGE/src/sponge/system/modelling/pdb_generator.py @@ -27,9 +27,10 @@ Module used to generate a pdb file via crd and res names. import os import stat +import numpy as np -def gen_pdb(crd, atom_names, res_names, res_ids, pdb_name='temp.pdb'): +def gen_pdb(crd, atom_names, res_names, res_ids, chain_id=None, pdb_name='temp.pdb'): """Write protein crd information into pdb format files. Args: crd(numpy.float32): The coordinates of protein atoms. @@ -37,13 +38,23 @@ def gen_pdb(crd, atom_names, res_names, res_ids, pdb_name='temp.pdb'): res_names(numpy.str_): The residue names of amino names. res_ids(numpy.int32): A unique mask each same residue. pdb_name(str): The path to save the pdb file, absolute path is suggested. + chain_id(numpy.int32): The chain index of each residue. """ + if os.path.exists(pdb_name): + os.remove(pdb_name) + success = 1 file = os.open(pdb_name, os.O_RDWR | os.O_CREAT, stat.S_IRWXU) pdb = os.fdopen(file, "w") - + res_ids = np.array(res_ids, np.int32) + chain_labels = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'] + record_resids = res_ids.copy() pdb.write('MODEL 1\n') for i, c in enumerate(crd[0]): + if chain_id is not None and i > 0: + if chain_id[res_ids[i] - 1] > chain_id[res_ids[i - 1] - 1]: + pdb.write('TER\n') + record_resids -= record_resids[i] - 1 pdb.write('ATOM'.ljust(6)) pdb.write('{}'.format((i + 1) % 100000).rjust(5)) if len(atom_names[i]) < 4: @@ -52,9 +63,12 @@ def gen_pdb(crd, atom_names, res_names, res_ids, pdb_name='temp.pdb'): else: pdb.write(' ') pdb.write(atom_names[i].ljust(4)) - pdb.write(res_names[i].rjust(4)) - pdb.write('A'.rjust(2)) - pdb.write('{}'.format(res_ids[i] % 10000).rjust(4)) + pdb.write(res_names[i][-3:].rjust(4)) + if chain_id is None: + pdb.write('A'.rjust(2)) + else: + pdb.write('{}'.format(chain_labels[chain_id[res_ids[i] - 1]]).rjust(2)) + pdb.write('{}'.format(record_resids[i] % 10000).rjust(4)) pdb.write(' ') pdb.write('{:.3f}'.format(c[0]).rjust(8)) pdb.write('{:.3f}'.format(c[1]).rjust(8)) diff --git a/MindSPONGE/src/sponge/system/modelling/pdb_parser.py b/MindSPONGE/src/sponge/system/modelling/pdb_parser.py index 15bbf80e3..1f68d6d0d 100644 --- a/MindSPONGE/src/sponge/system/modelling/pdb_parser.py +++ b/MindSPONGE/src/sponge/system/modelling/pdb_parser.py @@ -44,7 +44,7 @@ def _read_pdb(pdb_name, rebuild_hydrogen=False, remove_hydrogen=False): init_res_ids(list): The residue id of each atom. """ pdb_obj = namedtuple('PDBObject', ['atom_names', 'res_names', 'crds', 'res_pointer', 'flatten_atoms', - 'flatten_crds', 'init_res_names', 'init_res_ids']) + 'flatten_crds', 'init_res_names', 'init_res_ids', 'chain_id']) with open(pdb_name, 'r') as pdb: lines = pdb.readlines() atom_names = [] @@ -58,19 +58,26 @@ def _read_pdb(pdb_name, rebuild_hydrogen=False, remove_hydrogen=False): res_pointer = [] flatten_atoms = [] flatten_crds = [] - for index, line in enumerate(lines): - if not line.startswith('ATOM') and index < len(lines) - 1: - continue - if not line.startswith('ATOM') and index == len(lines) - 1: + chain_id = [] + c_id = 0 + for _, line in enumerate(lines): + if line.startswith('END'): atom_names.append(atom_group) crds.append(crd_group) break + if line.startswith('TER'): + c_id += 1 + continue + if not (line.startswith('ATOM') or line.startswith('HETATM')): + continue + atom_name = line[12:16].strip() if rebuild_hydrogen and atom_name.startswith('H'): continue if remove_hydrogen and atom_name.startswith('H'): continue res_name = line[17:20].strip() + res_id = int(line[22:26].strip()) crd = [float(line[30:38]), float(line[38:46]), @@ -86,6 +93,7 @@ def _read_pdb(pdb_name, rebuild_hydrogen=False, remove_hydrogen=False): atom_group.append(atom_name) crd_group.append(crd) res_pointer.append(0) + chain_id.append(c_id) elif res_id != res_ids[-1]: atom_names.append(atom_group) crds.append(crd_group) @@ -96,17 +104,18 @@ def _read_pdb(pdb_name, rebuild_hydrogen=False, remove_hydrogen=False): atom_group.append(atom_name) crd_group.append(crd) res_pointer.append(pointer) + chain_id.append(c_id) else: atom_group.append(atom_name) crd_group.append(crd) - if index == len(lines) - 1: - atom_names.append(atom_group) - crds.append(crd_group) + + atom_names.append(atom_group) + crds.append(crd_group) flatten_atoms = np.array(flatten_atoms, np.str_) flatten_crds = np.array(flatten_crds, np.float32) init_res_names = np.array(init_res_names) init_res_ids = np.array(init_res_ids, np.int32) res_pointer = np.array(res_pointer, np.int32) - - return pdb_obj(atom_names, res_names, crds, res_pointer, flatten_atoms, flatten_crds, init_res_names, init_res_ids) + return pdb_obj(atom_names, res_names, crds, res_pointer, flatten_atoms, flatten_crds, init_res_names, init_res_ids, + chain_id) diff --git a/MindSPONGE/src/sponge/system/molecule/protein.py b/MindSPONGE/src/sponge/system/molecule/protein.py index 6eacbc07b..d96eba258 100644 --- a/MindSPONGE/src/sponge/system/molecule/protein.py +++ b/MindSPONGE/src/sponge/system/molecule/protein.py @@ -24,17 +24,20 @@ Protein modeling. """ -from typing import Union, List +from typing import Union, List, Tuple import numpy as np from numpy import ndarray from mindspore.common import Tensor from .molecule import Molecule from ..residue.amino import AminoAcid +from ..residue import Residue from ..modelling.hadder import read_pdb from ...data.template import get_template from ...function import get_arguments +RESIDUE_NAMES = ['ALA', 'ARG', 'ASN', 'ASP', 'CYS', 'GLN', 'GLU', 'GLY', 'HID', 'HIS', + 'ILE', 'LEU', 'LYS', 'MET', 'PHE', 'PRO', 'SER', 'THR', 'TRP', 'TYR', 'VAL'] backbone_atoms = np.array(['N', 'CA', 'C', 'O'], np.str_) include_backbone_atoms = np.array(['OXT'], np.str_) @@ -90,7 +93,7 @@ class Protein(Molecule): sequence: List[str] = None, coordinate: Union[Tensor, ndarray, List[float]] = None, pbc_box: Union[Tensor, ndarray, List[float]] = None, - template: Union[dict, str] = 'protein0.yaml', + template: Union[dict, str, List[Union[dict, str]], Tuple[Union[dict, str]]] = 'protein0.yaml', rebuild_hydrogen: bool = False, rebuild_suffix: str = '_addH', length_unit: str = None, @@ -112,24 +115,48 @@ class Protein(Molecule): flatten_crds = pdb_obj.flatten_crds init_res_names = pdb_obj.init_res_names init_res_ids = pdb_obj.init_res_ids - - if len(residue_name) > 1: - if residue_name[0] != 'ACE': - residue_name[0] = 'N' + residue_name[0] - if residue_name[-1] != 'NME': - residue_name[-1] = 'C' + residue_name[-1] + chain_id = pdb_obj.chain_id + self.chain_id = chain_id + + residue_names = np.array(RESIDUE_NAMES, np.str_) + is_amino = np.isin(residue_name, residue_names) + + for i, res in enumerate(residue_name): + if res == 'HIE': + residue_name[i] = 'HIS' + if res == 'HOH': + residue_name[i] = 'WAT' + if not is_amino[i]: + continue + if i == 0: + residue_name[i] = 'N' * (res != 'ACE') + res + continue + elif i == len(residue_name) - 1: + residue_name[i] = 'C' * (res != 'NME') + res + break + if chain_id[i] < chain_id[i + 1]: + residue_name[i] = 'C' * (res != 'ACE') + res + if chain_id[i] > chain_id[i - 1]: + residue_name[i] = 'N' * (res != 'ACE') + res self.init_resname = init_res_names self.init_resid = init_res_ids num_residue = len(residue_name) residue_pointer = np.append(residue_pointer, len(flatten_atoms)) + self.template = template template = get_template(template) self.residue = [] for i in range(num_residue): name = residue_name[i] + if name == 'HIE': + name = 'HIS' atom_name = flatten_atoms[residue_pointer[i]: residue_pointer[i + 1]][None, :] - residue = AminoAcid(name=name, template=template, atom_name=atom_name) + if name in RESIDUE_NAMES: + residue = AminoAcid(name=name, template=template, atom_name=atom_name) + else: + residue = Residue(name=name, template=template, atom_name=atom_name, + length_unit=self.units.length_unit) self.residue.append(residue) coordinate = flatten_crds * self.units.convert_length_from('A') diff --git a/MindSPONGE/src/sponge/system/residue/residue.py b/MindSPONGE/src/sponge/system/residue/residue.py index 79aa2202a..94acc8bf8 100644 --- a/MindSPONGE/src/sponge/system/residue/residue.py +++ b/MindSPONGE/src/sponge/system/residue/residue.py @@ -150,7 +150,7 @@ class Residue: if atom_charge is not None: atom_charge = np.array(atom_charge, np.float32) - bonds = template.get('bond') + bonds = template.get('bonds') if bonds is not None: bonds = np.array(bonds, np.int32) @@ -189,7 +189,7 @@ class Residue: if settle: settle_index = get_template_index(template, self.atom_name) - + settle_unit = settle.get('length_unit') distance = settle.get('distance') settle_length = np.array([[distance['OW-HW'], distance['HW-HW']]], np.float32) @@ -236,7 +236,7 @@ class Residue: self.start_index = get_integer(start_index) # (A'') - self._index = msnp.arange(self.num_atoms) + self._index = Tensor(np.arange(self.num_atoms), ms.int32) self.system_index = self._index + start_index # (1,A') or (B,A') @@ -261,10 +261,10 @@ class Residue: # (B,A') self.atom_mask = F.logical_and(self.atomic_number > 0, self.atom_mass > 0) - self.inv_mass = msnp.where( - self.atom_mask, msnp.reciprocal(self.atom_mass), 0) + self.inv_mass = Tensor(np.where(self.atom_mask.asnumpy(), + np.reciprocal(self.atom_mass.asnumpy()), 0)) # (B,1) - self.natom_tensor = msnp.sum(F.cast(self.atom_mask, ms.float32), -1, keepdims=True) + self.natom_tensor = msnp.sum(self.atom_mask, -1, keepdims=True) self.total_mass = msnp.sum(self.atom_mass, -1, keepdims=True) # (B,A') @@ -381,7 +381,7 @@ class Residue: @classmethod def _get_bond(cls, template: dict, atom_index: ndarray = None) -> ndarray: """get bond from template and atom index""" - bonds = template.get('bond') + bonds = template.get('bonds') if bonds is None: return None bonds = np.array(bonds, np.int32) @@ -397,7 +397,10 @@ class Residue: bonds = np.stack(bond_, axis=0) else: serial: list = atom_index.reshape(-1).tolist() - bonds = np.array([serial.index(idx) for idx in bond_list]).reshape(bonds.shape) + bond_list = np.array(bond_list).reshape((-1, 2)) + itsct = np.where(np.isin(bond_list, serial).sum(axis=-1) > 1)[0] + bond_list = bond_list[itsct].reshape(-1) + bonds = np.array([serial.index(idx) for idx in bond_list]).reshape((-1, 2)) return bonds def build_atom_mass(self, template: dict): @@ -541,7 +544,7 @@ class Residue: f'the shape of "atom_name" {atom_name}!') atom_mask = F.logical_and(atomic_number > 0, atom_mass > 0) - inv_mass = msnp.where(atom_mask, msnp.reciprocal(atom_mass), 0) + inv_mass = Tensor(np.where(atom_mask.asnumpy(), np.reciprocal(atom_mass.asnumpy()), 0)) if atom_type is None: atom_type = atom_name.copy() @@ -570,8 +573,7 @@ class Residue: self.num_atoms = self.atom_name.shape[-1] self._index = msnp.arange(self.num_atoms) self.system_index = self._index + self.start_index - self.natom_tensor = msnp.sum( - F.cast(self.atom_mask, ms.int32), -1, keepdims=True) + self.natom_tensor = msnp.sum(self.atom_mask, -1, keepdims=True) self.total_mass = msnp.sum(self.atom_mass, -1, keepdims=True) return self -- Gitee