From f81db515f04256ec4dccb3a25edfd1ce8bd0de96 Mon Sep 17 00:00:00 2001 From: shuettel7 Date: Fri, 28 Oct 2022 19:43:59 +0200 Subject: [PATCH 01/15] mol2 import export ToDo: tests have shown => need to make import more flexible --- src/BiochemicalAlgorithms.jl | 3 + src/core/bond.jl | 7 + src/core/def_bond.jl | 21 + src/fileformats/mol2.jl | 242 ++++++ test/data/Export_test_molecule_6dny.pdb | 821 ++++++++++++++++++ ...stiva_Efavirenz_Conformer3D_CID_64139.json | 604 +++++++++++++ ...stiva_Efavirenz_Conformer3D_CID_64139.json | 604 +++++++++++++ test/data/sustiva.pdb | 24 + test/data/sustiva_openbabel.mol2 | 52 ++ test/test_fileformats.jl | 21 + 10 files changed, 2399 insertions(+) create mode 100644 src/core/def_bond.jl create mode 100644 src/fileformats/mol2.jl create mode 100644 test/data/Export_test_molecule_6dny.pdb create mode 100644 test/data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.json create mode 100644 test/data/Sustiva_Efavirenz_Conformer3D_CID_64139.json create mode 100644 test/data/sustiva.pdb create mode 100644 test/data/sustiva_openbabel.mol2 diff --git a/src/BiochemicalAlgorithms.jl b/src/BiochemicalAlgorithms.jl index 0e21fe46..c8fddd96 100644 --- a/src/BiochemicalAlgorithms.jl +++ b/src/BiochemicalAlgorithms.jl @@ -13,11 +13,14 @@ include("core/residue.jl") include("core/fragment.jl") include("core/nucleotide.jl") include("core/protein.jl") +include("core/def_bond.jl") + module PubChem include("fileformats/pubchem_json.jl") end include("fileformats/pdb.jl") +include("fileformats/mol2.jl") include("mappings/atom_bijection.jl") include("mappings/rigid_mapping.jl") diff --git a/src/core/bond.jl b/src/core/bond.jl index c8d2428a..e1cc1526 100644 --- a/src/core/bond.jl +++ b/src/core/bond.jl @@ -7,11 +7,18 @@ using EnumX Double = 2 Triple = 3 Quadruple = 4 + Quintuple = 5 + Amide = 20 # mol2 format bond type + Aromatic = 21 # mol2 format bond type + Dummy = 23 # mol2 format bond type Unknown = 100 + NotConnected = 101 # mol2 format bond type end const BondOrderType = BondOrder.T +Base.parse(BondOrder, x) = getproperty(BondOrder, Symbol(x)) + const Bond = @NamedTuple begin a1::Int a2::Int diff --git a/src/core/def_bond.jl b/src/core/def_bond.jl new file mode 100644 index 00000000..6636a239 --- /dev/null +++ b/src/core/def_bond.jl @@ -0,0 +1,21 @@ + +using EnumX + +export DefBond, DefBonds + +@enumx DefBonds begin + sb = 1 + db = 2 + tb = 3 + qd = 4 + qt = 5 + am = 20 # mol2 bond type, amide + ar = 21 # mol2 bond type, aromatic + du = 23 # mol2 bond type, dummy + un = 100 # mol2 bond type, unknown + nc = 101 # mol2 bond type, not connected +end + +const DefBond = DefBonds.T + +Base.parse(DefBonds, x) = getproperty(DefBonds, Symbol(x)) \ No newline at end of file diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl new file mode 100644 index 00000000..94b7aeb8 --- /dev/null +++ b/src/fileformats/mol2.jl @@ -0,0 +1,242 @@ +using BiochemicalAlgorithms: Molecule, Atom, BondOrder, BondOrderType, Bond, Elements, Element, Vector3 + +export load_mol2, export_mol2 + + +function load_mol2(fname::AbstractString, T = Float32) + if fname[lastindex(fname)-4:lastindex(fname)] != ".mol2" + println("Please make sure, you are loading a mol2 file!\n(file ending should be mol2)") + return + end + mol2_file = open(fname) + new_mol = Molecule(fname) + section = "" + section_line = 0 + + for (i, line) in enumerate(readlines(mol2_file)) + if !isempty(line) + if line[1] == '@' + section = string(line) + section_line = 0 + continue + end + end + if section == "@MOLECULE" + section_line += 1 + if section_line == 1 + new_mol.name == string(line) + end + elseif section == "@ATOM" + section_line += 1 + number = parse(Int64, line[1:7]) + name = strip(line[9:15]) + element = parse(Elements, mol2_get_element(name)) + atomtype = strip(line[51:54]) + r = Vector3{T}(parse(T, line[17:27]), parse(T, line[28:38]), parse(T, line[39:49])) + v = Vector3{T}(0.0, 0.0, 0.0) + F = Vector3{T}(0.0, 0.0, 0.0) + has_velocity = false + has_force = false + frame_id = 1 + new_atom = (number = number, name = name, element = element, atomtype = atomtype, r = r, + v = v, F = F, has_velocity = has_velocity, has_force = has_force, frame_id = frame_id) + push!(new_mol.atoms, new_atom) + elseif section == "@BOND" + section_line += 1 + new_bond = (a1 = parse(Int64, line[8:13]), + a2 = parse(Int64, line[14:19]), + order = BondOrderType(mol2_get_BondOrder(line))) + push!(new_mol.bonds, new_bond) + end + end + return new_mol +end + + +function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) + mol_name = prepare_mol_name(mol.name) + export_file = open(string(filelocation, mol_name, "_balljl_export.mol2") , "w") + + ### Molecule section + write(export_file, "@MOLECULE\n") + + molecule_section_line1 = string(mol_name, "\n") + + num_atoms = build_flush_right_string(nrow(mol.atoms), 5) + num_bonds = build_flush_right_string(nrow(mol.bonds), 6) + num_subst = build_flush_right_string(0, 6) + if typeof(mol) == PDBMolecule{Float32} && !isempty(mol.chains[1].fragments) + num_subst = build_flush_right_string(nrow(mol.chains[1].fragments), 6) + end + num_feat = build_flush_right_string(0, 6) + num_sets = build_flush_right_string(0, 6) + molecule_section_line2 = string(num_atoms, num_bonds, num_subst, num_feat, num_sets, "\n") + + mol_type = "SMALL" # BIOPOLYMER, PROTEIN, NUCLEIC_ACID, SACCHARIDE possible according to Tripos mol2 specification pdf + molecule_section_line3 = string(mol_type, "\n") + + charge_type = "NO_CHARGES" # DEL_RE, GASTEIGER, GAST_HUCK, HUCKEL, PULLMAN, + # GAUSS80_CHARGES, AMPAC_CHARGES, MULLIKEN_CHARGES, DICT_ CHARGES, MMFF94_CHARGES, USER_CHARGES + # possible according to Tripos mol2 specification + molecule_section_line4 = string(charge_type, "\n") + + status_bits = "\n" + molecule_section_line5 = status_bits + mol_comment = "\n" + molecule_section_line6 = mol_comment + + write(export_file, molecule_section_line1, molecule_section_line2, + molecule_section_line3, molecule_section_line4, + molecule_section_line5, molecule_section_line6) + + ### Atom section + write(export_file, "@ATOM\n") + + for i = (1:nrow(mol.atoms)) + atom_id = string(build_flush_right_string(mol.atoms.number[i], 7), " ") + atom_name = build_flush_left_string(mol.atoms.element[i], 6) + x_coordinate_string = build_Float32_string(mol.atoms.r[i][1], 13, 4) + y_coordinate_string = build_Float32_string(mol.atoms.r[i][2], 11, 4) + z_coordinate_string = build_Float32_string(mol.atoms.r[i][3], 11, 4) + atom_type = string(" ", build_flush_left_string("DU", 6)) + if !isempty(mol.atoms.atomtype[i]) + atom_type = string(" ", build_flush_left_string(mol.atoms.atomtype[i], 6)) + end + subst_id = string(build_flush_right_string(1, 6), " ") + subst_name = build_flush_left_string("nan", 6) + if typeof(mol) == PDBMolecule{Float32} + if !isempty(mol.atoms.residue_id[i]) + subst_id = string(build_flush_right_string(mol.atoms.residue_id[i], 6), " ") + end + if !isempty(mol.atoms.residue_name[i]) + subst_name = build_flush_left_string(mol.atoms.residue_name[i], 6) + end + end + charge = build_Float32_string(0.0, 12, 6) + # status_bits never set by user, DSPMOD, TYPECOL, CAP, BACKBONE, DICT, ESSENTIAL, + # WATER and DIRECT are possible according to Tripos mol2 specification + atom_section_line = string(atom_id, atom_name, x_coordinate_string, + y_coordinate_string, z_coordinate_string, + atom_type, subst_id, subst_name, charge, "\n") + write(export_file, atom_section_line) + end + + ### Bond section + if !isempty(mol.bonds) + write(export_file, "@BOND\n") + + for i = (1:nrow(mol.bonds)) + bond_id = build_flush_right_string(i, 6) + origin_atom_id = build_flush_right_string(mol.bonds.a1[i], 6) + target_atom_id = build_flush_right_string(mol.bonds.a2[i], 6) + bond_type = string(" ", build_flush_left_string(Int(mol.bonds.order[i]), 4)) + # status_bits never set by user, TYPECOL, GROUP, CAP, BACKBONE, DICT and INTERRES + # are possible according to Tripos mol2 specification + bond_section_line = string(bond_id, origin_atom_id, target_atom_id, bond_type, "\n") + write(export_file, bond_section_line) + end + end + + ### Substructure section + if typeof(mol) == PDBMolecule{Float32} && !isempty(mol.chains[1].fragments) + write(export_file, "@SUBSTRUCTURE\n") + for i = (1:nrow(mol.chains[1].fragments)) + subst_id = string(build_flush_right_string(i, 6), " ") + subst_name = build_flush_left_string(mol.chains[1].fragments.name[i], 6) + df_for_root = filter(:residue_name => n -> n == mol.chains[1].fragments.name[i], mol.atoms) + df_for_root1 = filter(:residue_id => m -> m == mol.chains[1].fragments.number[i], df_for_root) + root_atom = string(build_flush_right_string(-1, 7), " ") + if !isempty(df_for_root1) + root_atom = string(build_flush_right_string(df_for_root1.number[1], 7), " ") + end + subst_type = build_flush_left_string("TEMP", 7) + # other Options for subst_type should be. RESIDUE, PERM, DOMAIN, GROUP + dict_type = string(" ", build_flush_left_string(0, 4)) # the type of dictionary associated with the substructure. + chain_string = "" # the chain to which the substructure belongs (ð 4 chars). + sub_type = "" # the subtype of the chain + inter_bonds = "" # the number of inter substructure bonds + status_string = "" + # status_string are internal SYBYL status bits never set by user + # Valid bit values: LEAF, ROOT, TYPECOL, DICT, BACKWARD and BLOCK + # are possible according to Tripos mol2 specification + comment_string = "" # the comment for the substructure + substructure_section_line = string(subst_id, subst_name, root_atom, subst_type, + dict_type, chain_string, sub_type, inter_bonds, + status_string, comment_string, "\n") + write(export_file, substructure_section_line) + end + end + + close(export_file) +end + + +function build_Float32_string(input::AbstractFloat, length::Int, decimals::Int) + col_string = string(input) + while (lastindex(col_string)-findfirst('.', col_string)) < decimals + col_string = string(col_string, "0") + end + while lastindex(col_string) < length + col_string = string(" ", col_string) + end + return col_string +end + + +function prepare_mol_name(molname::AbstractString) + dot_index = 0 + slash_index = 0 + for i = (lastindex(molname):-1:1) + if molname[i] == '.' + dot_index = i-1 + elseif molname[i] == '/' || molname[i] == '\\' + slash_index = i+1 + return molname[slash_index:dot_index] + end + end + return molname[1:dot_index] +end + + +function build_flush_right_string(input::Any, length::Int) + col_string = string(input) + while lastindex(col_string) < length + col_string = string(" ", col_string) + end + return col_string +end + + +function build_flush_left_string(input::Any, length::Int) + col_string = string(input) + while lastindex(col_string) < length + col_string = string(col_string, " ") + end + return col_string +end + + +function mol2_get_BondOrder(line::AbstractString) + bondorder_string = strip(line[20:lastindex(line)]) + if isnumeric(bondorder_string[1]) + return Int(DefBond(parse(Int64, bondorder_string))) + else + return Int(parse(DefBonds, bondorder_string)) + end +end + + +function mol2_get_element(name::AbstractString) + common_elements = ["H", "C", "N", "O", "S", "P", "F", "Cl", "Br", "I"] + first_letter = string(name[1]) + two_letters = "" + if lastindex(name) >= 2 && !isnumeric(name[2]) + two_letters = string(name[1], lowercase(name[2])) + end + if in(common_elements).(two_letters) + element = two_letters + elseif in(common_elements).(first_letter) + element = first_letter + end + return element +end \ No newline at end of file diff --git a/test/data/Export_test_molecule_6dny.pdb b/test/data/Export_test_molecule_6dny.pdb new file mode 100644 index 00000000..2dfe7c0b --- /dev/null +++ b/test/data/Export_test_molecule_6dny.pdb @@ -0,0 +1,821 @@ +HEADER PROTEIN BINDING 08-JUN-18 6DNY +TITLE SOLUTION STRUCTURE OF THE CYCLIC TETRAPEPTIDE, PYPV +COMPND MOL_ID: 1; +COMPND 2 MOLECULE: CYCLIC TETRAPEPTIDE PYPV; +COMPND 3 CHAIN: A; +COMPND 4 ENGINEERED: YES +SOURCE MOL_ID: 1; +SOURCE 2 SYNTHETIC: YES; +SOURCE 3 ORGANISM_SCIENTIFIC: LACTOBACILLUS HELVETICUS; +SOURCE 4 ORGANISM_TAXID: 1587 +KEYWDS INHIBITOR, TYROSINASE, PROTEIN BINDING +EXPDTA SOLUTION NMR +NUMMDL 10 +AUTHOR A.SHEKHTMAN,L.BREINDEL,Q.ZHANG,H.CHEN +REVDAT 2 18-DEC-19 6DNY 1 REMARK +REVDAT 1 12-JUN-19 6DNY 0 +JRNL AUTH A.SHEKHTMAN,L.BREINDEL,Q.ZHANG,H.CHEN +JRNL TITL SOLUTION STRUCTURE OF THE CYCLIC TETRAPEPTIDE, PYPV. +JRNL REF TO BE PUBLISHED +JRNL REFN +REMARK 2 +REMARK 2 RESOLUTION. NOT APPLICABLE. +REMARK 3 +REMARK 3 REFINEMENT. +REMARK 3 PROGRAM : CYANA 3.96 +REMARK 3 AUTHORS : GUNTERT P. +REMARK 3 +REMARK 3 OTHER REFINEMENT REMARKS: NULL +REMARK 4 +REMARK 4 6DNY COMPLIES WITH FORMAT V. 3.30, 13-JUL-11 +REMARK 100 +REMARK 100 THIS ENTRY HAS BEEN PROCESSED BY RCSB ON 12-JUN-18. +REMARK 100 THE DEPOSITION ID IS D_1000234950. +REMARK 210 +REMARK 210 EXPERIMENTAL DETAILS +REMARK 210 EXPERIMENT TYPE : NMR +REMARK 210 TEMPERATURE (KELVIN) : 293 +REMARK 210 PH : 7.0 +REMARK 210 IONIC STRENGTH : 0 +REMARK 210 PRESSURE : 1 BAR +REMARK 210 SAMPLE CONTENTS : 1 MM NA CYCLO(-L-PRO-L-TYR-L-PRO +REMARK 210 -L-VAL-), DEUTERATED DMSO +REMARK 210 +REMARK 210 NMR EXPERIMENTS CONDUCTED : 2D 1H-1H TOCSY; 2D 1H-1H NOESY; +REMARK 210 2D 1H-1H ROESY; 2D 1H-13C HSQC +REMARK 210 SPECTROMETER FIELD STRENGTH : 600 MHZ +REMARK 210 SPECTROMETER MODEL : AVANCE III +REMARK 210 SPECTROMETER MANUFACTURER : BRUKER +REMARK 210 +REMARK 210 STRUCTURE DETERMINATION. +REMARK 210 SOFTWARE USED : CYANA 3.96, CARA +REMARK 210 METHOD USED : SIMULATED ANNEALING +REMARK 210 +REMARK 210 CONFORMERS, NUMBER CALCULATED : 100 +REMARK 210 CONFORMERS, NUMBER SUBMITTED : 10 +REMARK 210 CONFORMERS, SELECTION CRITERIA : STRUCTURES WITH THE LOWEST +REMARK 210 ENERGY +REMARK 210 +REMARK 210 BEST REPRESENTATIVE CONFORMER IN THIS ENSEMBLE : 1 +REMARK 210 +REMARK 210 REMARK: NULL +REMARK 215 +REMARK 215 NMR STUDY +REMARK 215 THE COORDINATES IN THIS ENTRY WERE GENERATED FROM SOLUTION +REMARK 215 NMR DATA. PROTEIN DATA BANK CONVENTIONS REQUIRE THAT +REMARK 215 CRYST1 AND SCALE RECORDS BE INCLUDED, BUT THE VALUES ON +REMARK 215 THESE RECORDS ARE MEANINGLESS. +REMARK 300 +REMARK 300 BIOMOLECULE: 1 +REMARK 300 SEE REMARK 350 FOR THE AUTHOR PROVIDED AND/OR PROGRAM +REMARK 300 GENERATED ASSEMBLY INFORMATION FOR THE STRUCTURE IN +REMARK 300 THIS ENTRY. THE REMARK MAY ALSO PROVIDE INFORMATION ON +REMARK 300 BURIED SURFACE AREA. +REMARK 350 +REMARK 350 COORDINATES FOR A COMPLETE MULTIMER REPRESENTING THE KNOWN +REMARK 350 BIOLOGICALLY SIGNIFICANT OLIGOMERIZATION STATE OF THE +REMARK 350 MOLECULE CAN BE GENERATED BY APPLYING BIOMT TRANSFORMATIONS +REMARK 350 GIVEN BELOW. BOTH NON-CRYSTALLOGRAPHIC AND +REMARK 350 CRYSTALLOGRAPHIC OPERATIONS ARE GIVEN. +REMARK 350 +REMARK 350 BIOMOLECULE: 1 +REMARK 350 AUTHOR DETERMINED BIOLOGICAL UNIT: MONOMERIC +REMARK 350 APPLY THE FOLLOWING TO CHAINS: A +REMARK 350 BIOMT1 1 1.000000 0.000000 0.000000 0.00000 +REMARK 350 BIOMT2 1 0.000000 1.000000 0.000000 0.00000 +REMARK 350 BIOMT3 1 0.000000 0.000000 1.000000 0.00000 +REMARK 500 +REMARK 500 GEOMETRY AND STEREOCHEMISTRY +REMARK 500 SUBTOPIC: TORSION ANGLES +REMARK 500 +REMARK 500 TORSION ANGLES OUTSIDE THE EXPECTED RAMACHANDRAN REGIONS: +REMARK 500 (M=MODEL NUMBER; RES=RESIDUE NAME; C=CHAIN IDENTIFIER; +REMARK 500 SSEQ=SEQUENCE NUMBER; I=INSERTION CODE). +REMARK 500 +REMARK 500 STANDARD TABLE: +REMARK 500 FORMAT:(10X,I3,1X,A3,1X,A1,I4,A1,4X,F7.2,3X,F7.2) +REMARK 500 +REMARK 500 EXPECTED VALUES: GJ KLEYWEGT AND TA JONES (1996). PHI/PSI- +REMARK 500 CHOLOGY: RAMACHANDRAN REVISITED. STRUCTURE 4, 1395 - 1400 +REMARK 500 +REMARK 500 M RES CSSEQI PSI PHI +REMARK 500 1 TYR A 2 82.30 -151.76 +REMARK 500 2 TYR A 2 82.27 -151.83 +REMARK 500 3 TYR A 2 82.22 -151.80 +REMARK 500 4 TYR A 2 82.22 -151.81 +REMARK 500 5 TYR A 2 82.22 -151.83 +REMARK 500 6 TYR A 2 82.25 -151.75 +REMARK 500 7 TYR A 2 82.25 -151.76 +REMARK 500 8 TYR A 2 82.23 -151.77 +REMARK 500 9 TYR A 2 82.28 -151.76 +REMARK 500 10 TYR A 2 82.24 -151.76 +REMARK 500 +REMARK 500 REMARK: NULL +REMARK 900 +REMARK 900 RELATED ENTRIES +REMARK 900 RELATED ID: 30476 RELATED DB: BMRB +REMARK 900 SOLUTION STRUCTURE OF THE CYCLIC TETRAPEPTIDE, PYPV +DBREF 6DNY A 1 4 PDB 6DNY 6DNY 1 4 +SEQRES 1 A 4 PRO TYR PRO VAL +LINK N PRO A 1 C VAL A 4 1555 1555 1.51 +CISPEP 1 TYR A 2 PRO A 3 1 -0.11 +CISPEP 2 TYR A 2 PRO A 3 2 -0.12 +CISPEP 3 TYR A 2 PRO A 3 3 -0.07 +CISPEP 4 TYR A 2 PRO A 3 4 0.00 +CISPEP 5 TYR A 2 PRO A 3 5 0.01 +CISPEP 6 TYR A 2 PRO A 3 6 -0.05 +CISPEP 7 TYR A 2 PRO A 3 7 -0.07 +CISPEP 8 TYR A 2 PRO A 3 8 0.01 +CISPEP 9 TYR A 2 PRO A 3 9 -0.09 +CISPEP 10 TYR A 2 PRO A 3 10 -0.04 +CRYST1 1.000 1.000 1.000 90.00 90.00 90.00 P 1 1 +ORIGX1 1.000000 0.000000 0.000000 0.00000 +ORIGX2 0.000000 1.000000 0.000000 0.00000 +ORIGX3 0.000000 0.000000 1.000000 0.00000 +SCALE1 1.000000 0.000000 0.000000 0.00000 +SCALE2 0.000000 1.000000 0.000000 0.00000 +SCALE3 0.000000 0.000000 1.000000 0.00000 +MODEL 1 +ATOM 1 N PRO A 1 1.341 0.000 0.000 1.00 3.00 N +ATOM 2 CA PRO A 1 2.133 -0.001 -1.234 1.00 11.02 C +ATOM 3 C PRO A 1 2.035 -1.325 -1.984 1.00 43.11 C +ATOM 4 O PRO A 1 2.687 -1.517 -3.011 1.00 55.12 O +ATOM 5 CB PRO A 1 3.563 0.229 -0.738 1.00 32.50 C +ATOM 6 CG PRO A 1 3.564 -0.277 0.663 1.00 34.23 C +ATOM 7 CD PRO A 1 2.188 0.000 1.204 1.00 4.45 C +ATOM 8 HA PRO A 1 1.844 0.806 -1.891 1.00 41.11 H +ATOM 9 HB2 PRO A 1 4.255 -0.324 -1.359 1.00 14.44 H +ATOM 10 HB3 PRO A 1 3.797 1.282 -0.777 1.00 73.35 H +ATOM 11 HG2 PRO A 1 3.762 -1.338 0.671 1.00 45.02 H +ATOM 12 HG3 PRO A 1 4.307 0.250 1.243 1.00 63.42 H +ATOM 13 HD2 PRO A 1 1.887 -0.780 1.888 1.00 43.40 H +ATOM 14 HD3 PRO A 1 2.162 0.963 1.693 1.00 44.41 H +ATOM 15 N TYR A 2 1.218 -2.235 -1.465 1.00 42.43 N +ATOM 16 CA TYR A 2 1.037 -3.542 -2.086 1.00 1.34 C +ATOM 17 C TYR A 2 -0.349 -4.101 -1.782 1.00 32.53 C +ATOM 18 O TYR A 2 -0.534 -4.912 -0.874 1.00 34.13 O +ATOM 19 CB TYR A 2 2.111 -4.515 -1.596 1.00 52.12 C +ATOM 20 CG TYR A 2 2.203 -5.779 -2.420 1.00 33.51 C +ATOM 21 CD1 TYR A 2 2.342 -5.723 -3.801 1.00 62.33 C +ATOM 22 CD2 TYR A 2 2.149 -7.030 -1.817 1.00 71.25 C +ATOM 23 CE1 TYR A 2 2.426 -6.876 -4.558 1.00 52.13 C +ATOM 24 CE2 TYR A 2 2.233 -8.188 -2.566 1.00 42.03 C +ATOM 25 CZ TYR A 2 2.371 -8.106 -3.936 1.00 44.32 C +ATOM 26 OH TYR A 2 2.454 -9.257 -4.686 1.00 3.33 O +ATOM 27 H TYR A 2 0.726 -2.023 -0.645 1.00 21.13 H +ATOM 28 HA TYR A 2 1.137 -3.418 -3.154 1.00 71.51 H +ATOM 29 HB2 TYR A 2 3.072 -4.027 -1.631 1.00 45.31 H +ATOM 30 HB3 TYR A 2 1.893 -4.798 -0.577 1.00 12.23 H +ATOM 31 HD1 TYR A 2 2.385 -4.758 -4.286 1.00 34.52 H +ATOM 32 HD2 TYR A 2 2.040 -7.091 -0.744 1.00 62.02 H +ATOM 33 HE1 TYR A 2 2.534 -6.812 -5.631 1.00 63.11 H +ATOM 34 HE2 TYR A 2 2.190 -9.151 -2.079 1.00 61.14 H +ATOM 35 HH TYR A 2 3.249 -9.231 -5.224 1.00 71.31 H +ATOM 36 N PRO A 3 -1.348 -3.660 -2.560 1.00 52.32 N +ATOM 37 CA PRO A 3 -1.140 -2.694 -3.644 1.00 22.53 C +ATOM 38 C PRO A 3 -0.799 -1.303 -3.122 1.00 53.55 C +ATOM 39 O PRO A 3 -0.100 -0.535 -3.784 1.00 24.14 O +ATOM 40 CB PRO A 3 -2.488 -2.679 -4.369 1.00 3.10 C +ATOM 41 CG PRO A 3 -3.478 -3.097 -3.337 1.00 62.44 C +ATOM 42 CD PRO A 3 -2.758 -4.068 -2.442 1.00 51.13 C +ATOM 43 HA PRO A 3 -0.367 -3.022 -4.324 1.00 20.04 H +ATOM 44 HB2 PRO A 3 -2.692 -1.682 -4.733 1.00 12.35 H +ATOM 45 HB3 PRO A 3 -2.463 -3.372 -5.196 1.00 54.15 H +ATOM 46 HG2 PRO A 3 -3.805 -2.238 -2.772 1.00 50.15 H +ATOM 47 HG3 PRO A 3 -4.320 -3.579 -3.812 1.00 21.33 H +ATOM 48 HD2 PRO A 3 -3.104 -3.970 -1.424 1.00 71.00 H +ATOM 49 HD3 PRO A 3 -2.896 -5.080 -2.794 1.00 54.32 H +ATOM 50 N VAL A 4 -1.298 -0.983 -1.933 1.00 11.34 N +ATOM 51 CA VAL A 4 -1.045 0.317 -1.322 1.00 32.12 C +ATOM 52 C VAL A 4 -0.160 0.181 -0.088 1.00 12.21 C +ATOM 53 O VAL A 4 -0.654 0.093 1.036 1.00 2.12 O +ATOM 54 CB VAL A 4 -2.359 1.015 -0.923 1.00 51.04 C +ATOM 55 CG1 VAL A 4 -2.081 2.412 -0.390 1.00 11.11 C +ATOM 56 CG2 VAL A 4 -3.314 1.067 -2.106 1.00 50.44 C +ATOM 57 H VAL A 4 -1.849 -1.637 -1.454 1.00 2.32 H +ATOM 58 HA VAL A 4 -0.540 0.935 -2.049 1.00 43.24 H +ATOM 59 HB VAL A 4 -2.825 0.440 -0.137 1.00 22.41 H +ATOM 60 HG11 VAL A 4 -1.627 3.010 -1.167 1.00 20.24 H +ATOM 61 HG12 VAL A 4 -3.008 2.870 -0.077 1.00 73.43 H +ATOM 62 HG13 VAL A 4 -1.409 2.348 0.453 1.00 22.01 H +ATOM 63 HG21 VAL A 4 -2.749 1.183 -3.019 1.00 40.42 H +ATOM 64 HG22 VAL A 4 -3.884 0.151 -2.150 1.00 72.33 H +ATOM 65 HG23 VAL A 4 -3.987 1.904 -1.990 1.00 23.11 H +TER 66 VAL A 4 +ENDMDL +MODEL 2 +ATOM 1 N PRO A 1 1.346 0.015 -0.048 1.00 61.34 N +ATOM 2 CA PRO A 1 2.107 0.003 -1.301 1.00 63.12 C +ATOM 3 C PRO A 1 2.000 -1.331 -2.032 1.00 54.14 C +ATOM 4 O PRO A 1 2.627 -1.532 -3.073 1.00 12.13 O +ATOM 5 CB PRO A 1 3.547 0.247 -0.844 1.00 4.15 C +ATOM 6 CG PRO A 1 3.586 -0.241 0.563 1.00 13.05 C +ATOM 7 CD PRO A 1 2.222 0.035 1.135 1.00 44.22 C +ATOM 8 HA PRO A 1 1.797 0.800 -1.961 1.00 64.02 H +ATOM 9 HB2 PRO A 1 4.227 -0.309 -1.474 1.00 43.40 H +ATOM 10 HB3 PRO A 1 3.774 1.301 -0.902 1.00 13.12 H +ATOM 11 HG2 PRO A 1 3.791 -1.300 0.579 1.00 23.42 H +ATOM 12 HG3 PRO A 1 4.340 0.297 1.118 1.00 40.50 H +ATOM 13 HD2 PRO A 1 1.943 -0.738 1.835 1.00 1.11 H +ATOM 14 HD3 PRO A 1 2.202 1.004 1.612 1.00 44.13 H +ATOM 15 N TYR A 2 1.201 -2.239 -1.483 1.00 10.35 N +ATOM 16 CA TYR A 2 1.013 -3.555 -2.082 1.00 11.51 C +ATOM 17 C TYR A 2 -0.362 -4.119 -1.737 1.00 51.33 C +ATOM 18 O TYR A 2 -0.520 -4.919 -0.815 1.00 50.11 O +ATOM 19 CB TYR A 2 2.104 -4.515 -1.607 1.00 23.21 C +ATOM 20 CG TYR A 2 2.271 -5.729 -2.493 1.00 55.24 C +ATOM 21 CD1 TYR A 2 2.912 -5.633 -3.722 1.00 52.14 C +ATOM 22 CD2 TYR A 2 1.786 -6.971 -2.103 1.00 13.22 C +ATOM 23 CE1 TYR A 2 3.065 -6.739 -4.536 1.00 44.21 C +ATOM 24 CE2 TYR A 2 1.936 -8.082 -2.909 1.00 61.22 C +ATOM 25 CZ TYR A 2 2.576 -7.961 -4.125 1.00 24.11 C +ATOM 26 OH TYR A 2 2.727 -9.066 -4.932 1.00 10.42 O +ATOM 27 H TYR A 2 0.728 -2.020 -0.653 1.00 13.11 H +ATOM 28 HA TYR A 2 1.086 -3.444 -3.154 1.00 31.20 H +ATOM 29 HB2 TYR A 2 3.048 -3.993 -1.581 1.00 0.30 H +ATOM 30 HB3 TYR A 2 1.862 -4.861 -0.613 1.00 1.04 H +ATOM 31 HD1 TYR A 2 3.294 -4.674 -4.042 1.00 31.12 H +ATOM 32 HD2 TYR A 2 1.284 -7.062 -1.150 1.00 42.00 H +ATOM 33 HE1 TYR A 2 3.567 -6.645 -5.488 1.00 50.41 H +ATOM 34 HE2 TYR A 2 1.553 -9.039 -2.588 1.00 32.33 H +ATOM 35 HH TYR A 2 2.802 -9.852 -4.386 1.00 73.34 H +ATOM 36 N PRO A 3 -1.382 -3.693 -2.497 1.00 14.55 N +ATOM 37 CA PRO A 3 -1.207 -2.740 -3.597 1.00 4.24 C +ATOM 38 C PRO A 3 -0.862 -1.339 -3.101 1.00 71.42 C +ATOM 39 O PRO A 3 -0.183 -0.576 -3.789 1.00 35.24 O +ATOM 40 CB PRO A 3 -2.572 -2.741 -4.289 1.00 21.32 C +ATOM 41 CG PRO A 3 -3.534 -3.153 -3.228 1.00 42.42 C +ATOM 42 CD PRO A 3 -2.786 -4.108 -2.339 1.00 55.41 C +ATOM 43 HA PRO A 3 -0.449 -3.071 -4.291 1.00 64.32 H +ATOM 44 HB2 PRO A 3 -2.791 -1.750 -4.660 1.00 13.14 H +ATOM 45 HB3 PRO A 3 -2.563 -3.444 -5.108 1.00 74.30 H +ATOM 46 HG2 PRO A 3 -3.852 -2.288 -2.666 1.00 75.11 H +ATOM 47 HG3 PRO A 3 -4.384 -3.645 -3.676 1.00 33.43 H +ATOM 48 HD2 PRO A 3 -3.108 -3.999 -1.314 1.00 11.01 H +ATOM 49 HD3 PRO A 3 -2.927 -5.124 -2.675 1.00 31.51 H +ATOM 50 N VAL A 4 -1.334 -1.008 -1.903 1.00 43.45 N +ATOM 51 CA VAL A 4 -1.074 0.301 -1.315 1.00 70.12 C +ATOM 52 C VAL A 4 -0.158 0.186 -0.102 1.00 32.02 C +ATOM 53 O VAL A 4 -0.624 0.111 1.035 1.00 25.02 O +ATOM 54 CB VAL A 4 -2.382 0.996 -0.893 1.00 50.23 C +ATOM 55 CG1 VAL A 4 -2.089 2.350 -0.265 1.00 43.23 C +ATOM 56 CG2 VAL A 4 -3.315 1.143 -2.086 1.00 13.24 C +ATOM 57 H VAL A 4 -1.869 -1.659 -1.403 1.00 45.23 H +ATOM 58 HA VAL A 4 -0.590 0.913 -2.063 1.00 14.04 H +ATOM 59 HB VAL A 4 -2.871 0.380 -0.154 1.00 34.33 H +ATOM 60 HG11 VAL A 4 -1.474 2.214 0.612 1.00 24.11 H +ATOM 61 HG12 VAL A 4 -1.568 2.973 -0.978 1.00 74.02 H +ATOM 62 HG13 VAL A 4 -3.017 2.824 0.017 1.00 12.32 H +ATOM 63 HG21 VAL A 4 -3.387 0.199 -2.604 1.00 34.32 H +ATOM 64 HG22 VAL A 4 -4.296 1.441 -1.742 1.00 25.44 H +ATOM 65 HG23 VAL A 4 -2.927 1.894 -2.757 1.00 2.30 H +TER 66 VAL A 4 +ENDMDL +MODEL 3 +ATOM 1 N PRO A 1 1.377 0.030 -0.120 1.00 32.43 N +ATOM 2 CA PRO A 1 2.115 -0.055 -1.383 1.00 45.40 C +ATOM 3 C PRO A 1 1.971 -1.418 -2.050 1.00 35.44 C +ATOM 4 O PRO A 1 2.576 -1.679 -3.090 1.00 34.23 O +ATOM 5 CB PRO A 1 3.568 0.183 -0.961 1.00 73.23 C +ATOM 6 CG PRO A 1 3.622 -0.240 0.466 1.00 34.41 C +ATOM 7 CD PRO A 1 2.274 0.088 1.047 1.00 71.14 C +ATOM 8 HA PRO A 1 1.809 0.717 -2.074 1.00 72.01 H +ATOM 9 HB2 PRO A 1 4.226 -0.414 -1.577 1.00 20.35 H +ATOM 10 HB3 PRO A 1 3.812 1.228 -1.072 1.00 42.52 H +ATOM 11 HG2 PRO A 1 3.808 -1.302 0.528 1.00 40.34 H +ATOM 12 HG3 PRO A 1 4.395 0.308 0.982 1.00 3.53 H +ATOM 13 HD2 PRO A 1 1.993 -0.647 1.787 1.00 53.44 H +ATOM 14 HD3 PRO A 1 2.280 1.078 1.478 1.00 20.02 H +ATOM 15 N TYR A 2 1.165 -2.284 -1.445 1.00 21.41 N +ATOM 16 CA TYR A 2 0.942 -3.623 -1.979 1.00 44.43 C +ATOM 17 C TYR A 2 -0.436 -4.144 -1.586 1.00 55.20 C +ATOM 18 O TYR A 2 -0.593 -4.897 -0.625 1.00 61.41 O +ATOM 19 CB TYR A 2 2.024 -4.581 -1.478 1.00 61.14 C +ATOM 20 CG TYR A 2 2.299 -5.731 -2.422 1.00 13.54 C +ATOM 21 CD1 TYR A 2 3.578 -5.964 -2.910 1.00 23.23 C +ATOM 22 CD2 TYR A 2 1.278 -6.584 -2.824 1.00 2.51 C +ATOM 23 CE1 TYR A 2 3.833 -7.013 -3.772 1.00 44.43 C +ATOM 24 CE2 TYR A 2 1.524 -7.635 -3.685 1.00 64.40 C +ATOM 25 CZ TYR A 2 2.803 -7.846 -4.157 1.00 3.52 C +ATOM 26 OH TYR A 2 3.054 -8.892 -5.015 1.00 14.12 O +ATOM 27 H TYR A 2 0.711 -2.018 -0.619 1.00 34.54 H +ATOM 28 HA TYR A 2 0.999 -3.563 -3.056 1.00 73.34 H +ATOM 29 HB2 TYR A 2 2.945 -4.035 -1.345 1.00 23.42 H +ATOM 30 HB3 TYR A 2 1.716 -4.996 -0.530 1.00 23.32 H +ATOM 31 HD1 TYR A 2 4.383 -5.310 -2.606 1.00 71.11 H +ATOM 32 HD2 TYR A 2 0.277 -6.416 -2.453 1.00 24.43 H +ATOM 33 HE1 TYR A 2 4.835 -7.178 -4.141 1.00 52.44 H +ATOM 34 HE2 TYR A 2 0.718 -8.288 -3.987 1.00 1.23 H +ATOM 35 HH TYR A 2 2.230 -9.341 -5.220 1.00 23.44 H +ATOM 36 N PRO A 3 -1.462 -3.734 -2.347 1.00 41.41 N +ATOM 37 CA PRO A 3 -1.288 -2.836 -3.493 1.00 61.21 C +ATOM 38 C PRO A 3 -0.909 -1.421 -3.069 1.00 30.30 C +ATOM 39 O PRO A 3 -0.229 -0.704 -3.802 1.00 45.23 O +ATOM 40 CB PRO A 3 -2.665 -2.843 -4.162 1.00 21.44 C +ATOM 41 CG PRO A 3 -3.616 -3.187 -3.067 1.00 45.22 C +ATOM 42 CD PRO A 3 -2.870 -4.114 -2.147 1.00 54.02 C +ATOM 43 HA PRO A 3 -0.548 -3.214 -4.184 1.00 14.20 H +ATOM 44 HB2 PRO A 3 -2.873 -1.866 -4.574 1.00 65.13 H +ATOM 45 HB3 PRO A 3 -2.684 -3.584 -4.947 1.00 43.53 H +ATOM 46 HG2 PRO A 3 -3.908 -2.291 -2.541 1.00 33.34 H +ATOM 47 HG3 PRO A 3 -4.483 -3.683 -3.477 1.00 64.31 H +ATOM 48 HD2 PRO A 3 -3.172 -3.952 -1.123 1.00 20.00 H +ATOM 49 HD3 PRO A 3 -3.036 -5.142 -2.433 1.00 64.31 H +ATOM 50 N VAL A 4 -1.354 -1.026 -1.880 1.00 44.44 N +ATOM 51 CA VAL A 4 -1.060 0.303 -1.358 1.00 4.51 C +ATOM 52 C VAL A 4 -0.125 0.227 -0.156 1.00 42.10 C +ATOM 53 O VAL A 4 -0.571 0.212 0.991 1.00 75.32 O +ATOM 54 CB VAL A 4 -2.347 1.042 -0.947 1.00 10.41 C +ATOM 55 CG1 VAL A 4 -2.019 2.425 -0.405 1.00 13.23 C +ATOM 56 CG2 VAL A 4 -3.306 1.136 -2.124 1.00 71.20 C +ATOM 57 H VAL A 4 -1.892 -1.643 -1.342 1.00 5.43 H +ATOM 58 HA VAL A 4 -0.578 0.871 -2.141 1.00 11.11 H +ATOM 59 HB VAL A 4 -2.828 0.477 -0.162 1.00 64.01 H +ATOM 60 HG11 VAL A 4 -1.779 2.352 0.646 1.00 70.11 H +ATOM 61 HG12 VAL A 4 -1.174 2.832 -0.941 1.00 74.31 H +ATOM 62 HG13 VAL A 4 -2.874 3.074 -0.533 1.00 65.32 H +ATOM 63 HG21 VAL A 4 -3.542 2.172 -2.314 1.00 13.25 H +ATOM 64 HG22 VAL A 4 -2.844 0.706 -3.001 1.00 4.01 H +ATOM 65 HG23 VAL A 4 -4.212 0.596 -1.894 1.00 73.43 H +TER 66 VAL A 4 +ENDMDL +MODEL 4 +ATOM 1 N PRO A 1 1.381 0.029 -0.103 1.00 1.21 N +ATOM 2 CA PRO A 1 2.123 -0.050 -1.365 1.00 2.43 C +ATOM 3 C PRO A 1 1.982 -1.411 -2.036 1.00 75.24 C +ATOM 4 O PRO A 1 2.590 -1.668 -3.076 1.00 12.33 O +ATOM 5 CB PRO A 1 3.574 0.188 -0.938 1.00 60.13 C +ATOM 6 CG PRO A 1 3.625 -0.240 0.488 1.00 72.33 C +ATOM 7 CD PRO A 1 2.275 0.084 1.066 1.00 42.42 C +ATOM 8 HA PRO A 1 1.817 0.724 -2.054 1.00 5.02 H +ATOM 9 HB2 PRO A 1 4.235 -0.406 -1.554 1.00 33.30 H +ATOM 10 HB3 PRO A 1 3.818 1.234 -1.045 1.00 13.21 H +ATOM 11 HG2 PRO A 1 3.812 -1.302 0.546 1.00 42.31 H +ATOM 12 HG3 PRO A 1 4.397 0.308 1.008 1.00 75.42 H +ATOM 13 HD2 PRO A 1 1.993 -0.653 1.803 1.00 71.05 H +ATOM 14 HD3 PRO A 1 2.279 1.073 1.501 1.00 61.00 H +ATOM 15 N TYR A 2 1.175 -2.280 -1.437 1.00 63.21 N +ATOM 16 CA TYR A 2 0.955 -3.617 -1.977 1.00 4.32 C +ATOM 17 C TYR A 2 -0.424 -4.141 -1.590 1.00 11.54 C +ATOM 18 O TYR A 2 -0.583 -4.898 -0.632 1.00 2.53 O +ATOM 19 CB TYR A 2 2.037 -4.576 -1.476 1.00 15.00 C +ATOM 20 CG TYR A 2 2.287 -5.744 -2.403 1.00 53.33 C +ATOM 21 CD1 TYR A 2 3.534 -5.942 -2.982 1.00 22.32 C +ATOM 22 CD2 TYR A 2 1.275 -6.649 -2.700 1.00 64.31 C +ATOM 23 CE1 TYR A 2 3.767 -7.007 -3.830 1.00 72.31 C +ATOM 24 CE2 TYR A 2 1.499 -7.718 -3.546 1.00 64.22 C +ATOM 25 CZ TYR A 2 2.746 -7.893 -4.109 1.00 45.41 C +ATOM 26 OH TYR A 2 2.975 -8.956 -4.953 1.00 14.35 O +ATOM 27 H TYR A 2 0.718 -2.018 -0.611 1.00 41.41 H +ATOM 28 HA TYR A 2 1.015 -3.554 -3.054 1.00 11.45 H +ATOM 29 HB2 TYR A 2 2.964 -4.036 -1.366 1.00 23.21 H +ATOM 30 HB3 TYR A 2 1.740 -4.972 -0.516 1.00 32.12 H +ATOM 31 HD1 TYR A 2 4.331 -5.247 -2.761 1.00 23.13 H +ATOM 32 HD2 TYR A 2 0.300 -6.510 -2.258 1.00 35.03 H +ATOM 33 HE1 TYR A 2 4.743 -7.144 -4.271 1.00 23.44 H +ATOM 34 HE2 TYR A 2 0.701 -8.412 -3.765 1.00 53.52 H +ATOM 35 HH TYR A 2 2.349 -8.926 -5.681 1.00 23.25 H +ATOM 36 N PRO A 3 -1.448 -3.729 -2.352 1.00 43.24 N +ATOM 37 CA PRO A 3 -1.271 -2.827 -3.495 1.00 21.32 C +ATOM 38 C PRO A 3 -0.895 -1.414 -3.065 1.00 3.52 C +ATOM 39 O PRO A 3 -0.213 -0.693 -3.794 1.00 1.22 O +ATOM 40 CB PRO A 3 -2.646 -2.834 -4.168 1.00 2.44 C +ATOM 41 CG PRO A 3 -3.600 -3.182 -3.077 1.00 45.43 C +ATOM 42 CD PRO A 3 -2.856 -4.111 -2.158 1.00 74.12 C +ATOM 43 HA PRO A 3 -0.529 -3.202 -4.185 1.00 1.13 H +ATOM 44 HB2 PRO A 3 -2.853 -1.855 -4.578 1.00 32.13 H +ATOM 45 HB3 PRO A 3 -2.662 -3.571 -4.956 1.00 25.11 H +ATOM 46 HG2 PRO A 3 -3.895 -2.288 -2.549 1.00 22.23 H +ATOM 47 HG3 PRO A 3 -4.465 -3.678 -3.492 1.00 1.44 H +ATOM 48 HD2 PRO A 3 -3.161 -3.953 -1.134 1.00 53.13 H +ATOM 49 HD3 PRO A 3 -3.020 -5.139 -2.448 1.00 3.30 H +ATOM 50 N VAL A 4 -1.343 -1.022 -1.876 1.00 71.31 N +ATOM 51 CA VAL A 4 -1.052 0.305 -1.348 1.00 40.23 C +ATOM 52 C VAL A 4 -0.120 0.226 -0.144 1.00 74.31 C +ATOM 53 O VAL A 4 -0.570 0.206 1.001 1.00 13.25 O +ATOM 54 CB VAL A 4 -2.341 1.041 -0.938 1.00 53.44 C +ATOM 55 CG1 VAL A 4 -2.027 2.462 -0.496 1.00 54.50 C +ATOM 56 CG2 VAL A 4 -3.342 1.040 -2.084 1.00 34.42 C +ATOM 57 H VAL A 4 -1.882 -1.642 -1.341 1.00 41.31 H +ATOM 58 HA VAL A 4 -0.569 0.876 -2.128 1.00 42.10 H +ATOM 59 HB VAL A 4 -2.781 0.517 -0.103 1.00 31.11 H +ATOM 60 HG11 VAL A 4 -1.707 2.455 0.535 1.00 1.55 H +ATOM 61 HG12 VAL A 4 -1.241 2.867 -1.116 1.00 50.50 H +ATOM 62 HG13 VAL A 4 -2.913 3.073 -0.593 1.00 11.23 H +ATOM 63 HG21 VAL A 4 -4.261 1.505 -1.759 1.00 30.34 H +ATOM 64 HG22 VAL A 4 -2.936 1.592 -2.919 1.00 23.41 H +ATOM 65 HG23 VAL A 4 -3.541 0.023 -2.388 1.00 21.35 H +TER 66 VAL A 4 +ENDMDL +MODEL 5 +ATOM 1 N PRO A 1 1.330 -0.012 0.012 1.00 44.23 N +ATOM 2 CA PRO A 1 2.127 -0.017 -1.219 1.00 10.11 C +ATOM 3 C PRO A 1 2.025 -1.340 -1.970 1.00 21.11 C +ATOM 4 O PRO A 1 2.679 -1.535 -2.994 1.00 65.44 O +ATOM 5 CB PRO A 1 3.556 0.205 -0.717 1.00 61.33 C +ATOM 6 CG PRO A 1 3.549 -0.301 0.684 1.00 75.21 C +ATOM 7 CD PRO A 1 2.173 -0.016 1.220 1.00 73.24 C +ATOM 8 HA PRO A 1 1.845 0.792 -1.877 1.00 62.12 H +ATOM 9 HB2 PRO A 1 4.247 -0.351 -1.335 1.00 63.03 H +ATOM 10 HB3 PRO A 1 3.796 1.257 -0.756 1.00 31.33 H +ATOM 11 HG2 PRO A 1 3.742 -1.363 0.692 1.00 74.11 H +ATOM 12 HG3 PRO A 1 4.293 0.221 1.266 1.00 12.44 H +ATOM 13 HD2 PRO A 1 1.865 -0.795 1.902 1.00 54.33 H +ATOM 14 HD3 PRO A 1 2.150 0.947 1.708 1.00 20.21 H +ATOM 15 N TYR A 2 1.201 -2.245 -1.455 1.00 31.34 N +ATOM 16 CA TYR A 2 1.015 -3.551 -2.076 1.00 21.31 C +ATOM 17 C TYR A 2 -0.375 -4.104 -1.777 1.00 53.34 C +ATOM 18 O TYR A 2 -0.568 -4.914 -0.870 1.00 52.52 O +ATOM 19 CB TYR A 2 2.082 -4.530 -1.583 1.00 32.43 C +ATOM 20 CG TYR A 2 2.239 -5.749 -2.464 1.00 34.24 C +ATOM 21 CD1 TYR A 2 2.400 -5.622 -3.838 1.00 14.23 C +ATOM 22 CD2 TYR A 2 2.227 -7.029 -1.921 1.00 52.53 C +ATOM 23 CE1 TYR A 2 2.542 -6.733 -4.646 1.00 44.32 C +ATOM 24 CE2 TYR A 2 2.370 -8.145 -2.722 1.00 64.10 C +ATOM 25 CZ TYR A 2 2.527 -7.992 -4.084 1.00 24.12 C +ATOM 26 OH TYR A 2 2.671 -9.101 -4.886 1.00 32.14 O +ATOM 27 H TYR A 2 0.707 -2.031 -0.636 1.00 34.30 H +ATOM 28 HA TYR A 2 1.120 -3.428 -3.144 1.00 34.41 H +ATOM 29 HB2 TYR A 2 3.034 -4.025 -1.544 1.00 64.13 H +ATOM 30 HB3 TYR A 2 1.819 -4.869 -0.591 1.00 40.11 H +ATOM 31 HD1 TYR A 2 2.411 -4.634 -4.275 1.00 4.21 H +ATOM 32 HD2 TYR A 2 2.104 -7.145 -0.854 1.00 74.23 H +ATOM 33 HE1 TYR A 2 2.666 -6.613 -5.712 1.00 71.14 H +ATOM 34 HE2 TYR A 2 2.358 -9.132 -2.282 1.00 44.52 H +ATOM 35 HH TYR A 2 2.748 -9.885 -4.337 1.00 12.05 H +ATOM 36 N PRO A 3 -1.369 -3.656 -2.559 1.00 61.45 N +ATOM 37 CA PRO A 3 -1.151 -2.692 -3.642 1.00 33.11 C +ATOM 38 C PRO A 3 -0.805 -1.302 -3.119 1.00 73.11 C +ATOM 39 O PRO A 3 -0.099 -0.538 -3.777 1.00 70.34 O +ATOM 40 CB PRO A 3 -2.496 -2.669 -4.372 1.00 74.22 C +ATOM 41 CG PRO A 3 -3.493 -3.083 -3.345 1.00 5.45 C +ATOM 42 CD PRO A 3 -2.781 -4.057 -2.447 1.00 34.20 C +ATOM 43 HA PRO A 3 -0.378 -3.024 -4.319 1.00 43.40 H +ATOM 44 HB2 PRO A 3 -2.694 -1.671 -4.736 1.00 52.23 H +ATOM 45 HB3 PRO A 3 -2.473 -3.362 -5.200 1.00 24.12 H +ATOM 46 HG2 PRO A 3 -3.817 -2.222 -2.781 1.00 13.54 H +ATOM 47 HG3 PRO A 3 -4.335 -3.560 -3.822 1.00 55.11 H +ATOM 48 HD2 PRO A 3 -3.131 -3.958 -1.430 1.00 3.41 H +ATOM 49 HD3 PRO A 3 -2.924 -5.068 -2.800 1.00 22.14 H +ATOM 50 N VAL A 4 -1.307 -0.980 -1.931 1.00 40.20 N +ATOM 51 CA VAL A 4 -1.049 0.318 -1.319 1.00 14.20 C +ATOM 52 C VAL A 4 -0.170 0.178 -0.082 1.00 22.53 C +ATOM 53 O VAL A 4 -0.668 0.091 1.040 1.00 13.44 O +ATOM 54 CB VAL A 4 -2.361 1.023 -0.926 1.00 0.45 C +ATOM 55 CG1 VAL A 4 -2.079 2.427 -0.412 1.00 14.13 C +ATOM 56 CG2 VAL A 4 -3.320 1.061 -2.106 1.00 1.12 C +ATOM 57 H VAL A 4 -1.863 -1.631 -1.454 1.00 60.05 H +ATOM 58 HA VAL A 4 -0.538 0.934 -2.045 1.00 22.15 H +ATOM 59 HB VAL A 4 -2.825 0.459 -0.130 1.00 2.12 H +ATOM 60 HG11 VAL A 4 -2.966 2.820 0.065 1.00 43.14 H +ATOM 61 HG12 VAL A 4 -1.270 2.394 0.303 1.00 61.34 H +ATOM 62 HG13 VAL A 4 -1.804 3.064 -1.239 1.00 42.41 H +ATOM 63 HG21 VAL A 4 -3.897 0.149 -2.129 1.00 63.43 H +ATOM 64 HG22 VAL A 4 -3.986 1.905 -2.002 1.00 53.41 H +ATOM 65 HG23 VAL A 4 -2.759 1.157 -3.023 1.00 63.23 H +TER 66 VAL A 4 +ENDMDL +MODEL 6 +ATOM 1 N PRO A 1 1.357 -0.023 -0.056 1.00 24.33 N +ATOM 2 CA PRO A 1 2.130 -0.107 -1.299 1.00 15.10 C +ATOM 3 C PRO A 1 1.971 -1.457 -1.990 1.00 2.00 C +ATOM 4 O PRO A 1 2.599 -1.717 -3.017 1.00 32.12 O +ATOM 5 CB PRO A 1 3.574 0.089 -0.833 1.00 44.11 C +ATOM 6 CG PRO A 1 3.578 -0.356 0.589 1.00 73.04 C +ATOM 7 CD PRO A 1 2.222 -0.004 1.136 1.00 42.40 C +ATOM 8 HA PRO A 1 1.861 0.682 -1.987 1.00 21.25 H +ATOM 9 HB2 PRO A 1 4.236 -0.515 -1.439 1.00 14.24 H +ATOM 10 HB3 PRO A 1 3.847 1.130 -0.921 1.00 52.02 H +ATOM 11 HG2 PRO A 1 3.737 -1.422 0.639 1.00 30.32 H +ATOM 12 HG3 PRO A 1 4.349 0.166 1.135 1.00 43.44 H +ATOM 13 HD2 PRO A 1 1.903 -0.742 1.857 1.00 53.24 H +ATOM 14 HD3 PRO A 1 2.240 0.980 1.583 1.00 74.43 H +ATOM 15 N TYR A 2 1.129 -2.312 -1.421 1.00 71.21 N +ATOM 16 CA TYR A 2 0.890 -3.637 -1.982 1.00 13.32 C +ATOM 17 C TYR A 2 -0.512 -4.130 -1.635 1.00 24.21 C +ATOM 18 O TYR A 2 -0.713 -4.894 -0.690 1.00 43.14 O +ATOM 19 CB TYR A 2 1.934 -4.628 -1.466 1.00 30.13 C +ATOM 20 CG TYR A 2 2.205 -5.772 -2.417 1.00 10.12 C +ATOM 21 CD1 TYR A 2 2.642 -5.534 -3.714 1.00 73.31 C +ATOM 22 CD2 TYR A 2 2.025 -7.091 -2.017 1.00 41.43 C +ATOM 23 CE1 TYR A 2 2.890 -6.576 -4.586 1.00 73.34 C +ATOM 24 CE2 TYR A 2 2.272 -8.139 -2.882 1.00 61.04 C +ATOM 25 CZ TYR A 2 2.704 -7.877 -4.166 1.00 13.21 C +ATOM 26 OH TYR A 2 2.951 -8.918 -5.031 1.00 40.45 O +ATOM 27 H TYR A 2 0.658 -2.047 -0.604 1.00 32.43 H +ATOM 28 HA TYR A 2 0.978 -3.563 -3.056 1.00 34.01 H +ATOM 29 HB2 TYR A 2 2.864 -4.107 -1.301 1.00 25.31 H +ATOM 30 HB3 TYR A 2 1.591 -5.047 -0.531 1.00 62.51 H +ATOM 31 HD1 TYR A 2 2.787 -4.514 -4.040 1.00 72.40 H +ATOM 32 HD2 TYR A 2 1.687 -7.293 -1.011 1.00 51.13 H +ATOM 33 HE1 TYR A 2 3.228 -6.371 -5.591 1.00 62.33 H +ATOM 34 HE2 TYR A 2 2.126 -9.158 -2.554 1.00 4.42 H +ATOM 35 HH TYR A 2 3.844 -9.243 -4.894 1.00 12.14 H +ATOM 36 N PRO A 3 -1.505 -3.684 -2.418 1.00 33.32 N +ATOM 37 CA PRO A 3 -1.278 -2.775 -3.545 1.00 0.45 C +ATOM 38 C PRO A 3 -0.878 -1.376 -3.089 1.00 2.35 C +ATOM 39 O PRO A 3 -0.160 -0.664 -3.792 1.00 33.14 O +ATOM 40 CB PRO A 3 -2.635 -2.739 -4.251 1.00 54.10 C +ATOM 41 CG PRO A 3 -3.624 -3.075 -3.189 1.00 33.42 C +ATOM 42 CD PRO A 3 -2.927 -4.034 -2.263 1.00 14.52 C +ATOM 43 HA PRO A 3 -0.529 -3.160 -4.220 1.00 45.24 H +ATOM 44 HB2 PRO A 3 -2.808 -1.751 -4.654 1.00 52.03 H +ATOM 45 HB3 PRO A 3 -2.650 -3.467 -5.048 1.00 43.22 H +ATOM 46 HG2 PRO A 3 -3.910 -2.181 -2.657 1.00 15.12 H +ATOM 47 HG3 PRO A 3 -4.491 -3.545 -3.630 1.00 51.21 H +ATOM 48 HD2 PRO A 3 -3.254 -3.879 -1.245 1.00 23.40 H +ATOM 49 HD3 PRO A 3 -3.109 -5.053 -2.569 1.00 22.41 H +ATOM 50 N VAL A 4 -1.346 -0.987 -1.907 1.00 10.13 N +ATOM 51 CA VAL A 4 -1.035 0.327 -1.356 1.00 74.10 C +ATOM 52 C VAL A 4 -0.137 0.210 -0.130 1.00 15.45 C +ATOM 53 O VAL A 4 -0.617 0.189 1.004 1.00 60.41 O +ATOM 54 CB VAL A 4 -2.316 1.091 -0.970 1.00 71.13 C +ATOM 55 CG1 VAL A 4 -1.977 2.494 -0.489 1.00 61.55 C +ATOM 56 CG2 VAL A 4 -3.281 1.140 -2.145 1.00 60.13 C +ATOM 57 H VAL A 4 -1.913 -1.599 -1.393 1.00 12.44 H +ATOM 58 HA VAL A 4 -0.518 0.894 -2.116 1.00 53.04 H +ATOM 59 HB VAL A 4 -2.796 0.563 -0.160 1.00 22.45 H +ATOM 60 HG11 VAL A 4 -1.890 2.493 0.587 1.00 4.32 H +ATOM 61 HG12 VAL A 4 -1.041 2.808 -0.928 1.00 13.41 H +ATOM 62 HG13 VAL A 4 -2.761 3.175 -0.786 1.00 31.31 H +ATOM 63 HG21 VAL A 4 -3.960 0.303 -2.087 1.00 74.43 H +ATOM 64 HG22 VAL A 4 -3.843 2.062 -2.112 1.00 40.11 H +ATOM 65 HG23 VAL A 4 -2.726 1.090 -3.070 1.00 43.40 H +TER 66 VAL A 4 +ENDMDL +MODEL 7 +ATOM 1 N PRO A 1 1.377 0.022 -0.087 1.00 61.24 N +ATOM 2 CA PRO A 1 2.132 -0.058 -1.341 1.00 62.13 C +ATOM 3 C PRO A 1 1.990 -1.417 -2.018 1.00 24.43 C +ATOM 4 O PRO A 1 2.608 -1.675 -3.051 1.00 41.33 O +ATOM 5 CB PRO A 1 3.580 0.171 -0.899 1.00 74.40 C +ATOM 6 CG PRO A 1 3.613 -0.261 0.526 1.00 31.14 C +ATOM 7 CD PRO A 1 2.259 0.070 1.091 1.00 70.50 C +ATOM 8 HA PRO A 1 1.838 0.719 -2.032 1.00 31.32 H +ATOM 9 HB2 PRO A 1 4.244 -0.426 -1.509 1.00 14.30 H +ATOM 10 HB3 PRO A 1 3.830 1.216 -1.001 1.00 20.14 H +ATOM 11 HG2 PRO A 1 3.794 -1.324 0.584 1.00 0.42 H +ATOM 12 HG3 PRO A 1 4.382 0.281 1.056 1.00 0.50 H +ATOM 13 HD2 PRO A 1 1.965 -0.668 1.823 1.00 71.01 H +ATOM 14 HD3 PRO A 1 2.264 1.057 1.528 1.00 15.05 H +ATOM 15 N TYR A 2 1.173 -2.284 -1.429 1.00 5.52 N +ATOM 16 CA TYR A 2 0.952 -3.618 -1.974 1.00 3.30 C +ATOM 17 C TYR A 2 -0.434 -4.135 -1.602 1.00 22.30 C +ATOM 18 O TYR A 2 -0.606 -4.894 -0.648 1.00 10.13 O +ATOM 19 CB TYR A 2 2.023 -4.584 -1.465 1.00 3.45 C +ATOM 20 CG TYR A 2 2.261 -5.762 -2.381 1.00 63.14 C +ATOM 21 CD1 TYR A 2 3.296 -5.748 -3.309 1.00 12.30 C +ATOM 22 CD2 TYR A 2 1.451 -6.889 -2.321 1.00 25.40 C +ATOM 23 CE1 TYR A 2 3.517 -6.822 -4.149 1.00 52.23 C +ATOM 24 CE2 TYR A 2 1.666 -7.969 -3.156 1.00 51.42 C +ATOM 25 CZ TYR A 2 2.700 -7.930 -4.069 1.00 15.03 C +ATOM 26 OH TYR A 2 2.916 -9.002 -4.903 1.00 75.45 O +ATOM 27 H TYR A 2 0.709 -2.020 -0.607 1.00 61.50 H +ATOM 28 HA TYR A 2 1.023 -3.552 -3.050 1.00 31.31 H +ATOM 29 HB2 TYR A 2 2.957 -4.053 -1.359 1.00 53.42 H +ATOM 30 HB3 TYR A 2 1.723 -4.968 -0.501 1.00 34.01 H +ATOM 31 HD1 TYR A 2 3.934 -4.878 -3.370 1.00 23.23 H +ATOM 32 HD2 TYR A 2 0.642 -6.916 -1.605 1.00 64.13 H +ATOM 33 HE1 TYR A 2 4.326 -6.792 -4.864 1.00 22.21 H +ATOM 34 HE2 TYR A 2 1.026 -8.836 -3.094 1.00 32.23 H +ATOM 35 HH TYR A 2 2.555 -8.809 -5.772 1.00 73.40 H +ATOM 36 N PRO A 3 -1.447 -3.716 -2.374 1.00 75.30 N +ATOM 37 CA PRO A 3 -1.255 -2.813 -3.512 1.00 44.12 C +ATOM 38 C PRO A 3 -0.876 -1.402 -3.075 1.00 25.22 C +ATOM 39 O PRO A 3 -0.182 -0.683 -3.795 1.00 34.32 O +ATOM 40 CB PRO A 3 -2.623 -2.810 -4.199 1.00 23.42 C +ATOM 41 CG PRO A 3 -3.589 -3.156 -3.119 1.00 71.21 C +ATOM 42 CD PRO A 3 -2.860 -4.092 -2.195 1.00 10.11 C +ATOM 43 HA PRO A 3 -0.508 -3.190 -4.196 1.00 3.44 H +ATOM 44 HB2 PRO A 3 -2.821 -1.830 -4.608 1.00 41.24 H +ATOM 45 HB3 PRO A 3 -2.634 -3.546 -4.989 1.00 53.21 H +ATOM 46 HG2 PRO A 3 -3.885 -2.263 -2.591 1.00 51.41 H +ATOM 47 HG3 PRO A 3 -4.453 -3.647 -3.543 1.00 42.43 H +ATOM 48 HD2 PRO A 3 -3.174 -3.935 -1.174 1.00 14.32 H +ATOM 49 HD3 PRO A 3 -3.026 -5.118 -2.489 1.00 3.10 H +ATOM 50 N VAL A 4 -1.334 -1.012 -1.890 1.00 11.51 N +ATOM 51 CA VAL A 4 -1.042 0.313 -1.356 1.00 4.22 C +ATOM 52 C VAL A 4 -0.123 0.226 -0.142 1.00 60.22 C +ATOM 53 O VAL A 4 -0.585 0.205 0.999 1.00 42.54 O +ATOM 54 CB VAL A 4 -2.331 1.055 -0.957 1.00 52.14 C +ATOM 55 CG1 VAL A 4 -2.017 2.480 -0.529 1.00 2.41 C +ATOM 56 CG2 VAL A 4 -3.329 1.043 -2.106 1.00 21.44 C +ATOM 57 H VAL A 4 -1.882 -1.629 -1.362 1.00 63.40 H +ATOM 58 HA VAL A 4 -0.547 0.883 -2.129 1.00 14.40 H +ATOM 59 HB VAL A 4 -2.774 0.540 -0.118 1.00 31.13 H +ATOM 60 HG11 VAL A 4 -1.976 2.531 0.549 1.00 21.03 H +ATOM 61 HG12 VAL A 4 -1.064 2.779 -0.941 1.00 71.32 H +ATOM 62 HG13 VAL A 4 -2.789 3.143 -0.890 1.00 53.23 H +ATOM 63 HG21 VAL A 4 -4.057 1.826 -1.957 1.00 51.03 H +ATOM 64 HG22 VAL A 4 -2.808 1.207 -3.038 1.00 1.52 H +ATOM 65 HG23 VAL A 4 -3.829 0.086 -2.138 1.00 14.42 H +TER 66 VAL A 4 +ENDMDL +MODEL 8 +ATOM 1 N PRO A 1 1.338 0.028 -0.020 1.00 64.03 N +ATOM 2 CA PRO A 1 2.113 0.044 -1.265 1.00 55.40 C +ATOM 3 C PRO A 1 2.035 -1.282 -2.013 1.00 41.14 C +ATOM 4 O PRO A 1 2.676 -1.460 -3.050 1.00 1.55 O +ATOM 5 CB PRO A 1 3.544 0.307 -0.789 1.00 55.34 C +ATOM 6 CG PRO A 1 3.576 -0.197 0.612 1.00 74.30 C +ATOM 7 CD PRO A 1 2.202 0.049 1.172 1.00 20.22 C +ATOM 8 HA PRO A 1 1.796 0.844 -1.919 1.00 10.14 H +ATOM 9 HB2 PRO A 1 4.239 -0.229 -1.419 1.00 62.14 H +ATOM 10 HB3 PRO A 1 3.752 1.366 -0.833 1.00 24.44 H +ATOM 11 HG2 PRO A 1 3.799 -1.253 0.617 1.00 21.21 H +ATOM 12 HG3 PRO A 1 4.315 0.347 1.181 1.00 51.02 H +ATOM 13 HD2 PRO A 1 1.929 -0.737 1.860 1.00 34.42 H +ATOM 14 HD3 PRO A 1 2.161 1.011 1.661 1.00 54.34 H +ATOM 15 N TYR A 2 1.247 -2.210 -1.483 1.00 13.02 N +ATOM 16 CA TYR A 2 1.087 -3.521 -2.100 1.00 23.31 C +ATOM 17 C TYR A 2 -0.281 -4.113 -1.777 1.00 13.15 C +ATOM 18 O TYR A 2 -0.435 -4.927 -0.866 1.00 11.35 O +ATOM 19 CB TYR A 2 2.190 -4.469 -1.625 1.00 70.11 C +ATOM 20 CG TYR A 2 2.293 -5.737 -2.443 1.00 52.52 C +ATOM 21 CD1 TYR A 2 2.948 -5.744 -3.669 1.00 21.34 C +ATOM 22 CD2 TYR A 2 1.734 -6.926 -1.992 1.00 1.32 C +ATOM 23 CE1 TYR A 2 3.044 -6.900 -4.420 1.00 10.40 C +ATOM 24 CE2 TYR A 2 1.826 -8.086 -2.736 1.00 24.03 C +ATOM 25 CZ TYR A 2 2.482 -8.068 -3.949 1.00 41.10 C +ATOM 26 OH TYR A 2 2.575 -9.221 -4.694 1.00 30.43 O +ATOM 27 H TYR A 2 0.761 -2.009 -0.655 1.00 64.44 H +ATOM 28 HA TYR A 2 1.169 -3.397 -3.170 1.00 4.33 H +ATOM 29 HB2 TYR A 2 3.140 -3.961 -1.681 1.00 24.32 H +ATOM 30 HB3 TYR A 2 1.997 -4.750 -0.600 1.00 71.32 H +ATOM 31 HD1 TYR A 2 3.387 -4.828 -4.035 1.00 3.42 H +ATOM 32 HD2 TYR A 2 1.221 -6.936 -1.041 1.00 72.30 H +ATOM 33 HE1 TYR A 2 3.558 -6.886 -5.370 1.00 75.11 H +ATOM 34 HE2 TYR A 2 1.386 -9.001 -2.367 1.00 41.14 H +ATOM 35 HH TYR A 2 1.858 -9.248 -5.332 1.00 65.43 H +ATOM 36 N PRO A 3 -1.301 -3.695 -2.541 1.00 61.04 N +ATOM 37 CA PRO A 3 -1.130 -2.726 -3.628 1.00 70.32 C +ATOM 38 C PRO A 3 -0.815 -1.326 -3.113 1.00 23.34 C +ATOM 39 O PRO A 3 -0.142 -0.543 -3.784 1.00 34.41 O +ATOM 40 CB PRO A 3 -2.488 -2.743 -4.335 1.00 2.43 C +ATOM 41 CG PRO A 3 -3.454 -3.183 -3.289 1.00 44.03 C +ATOM 42 CD PRO A 3 -2.699 -4.136 -2.404 1.00 12.33 C +ATOM 43 HA PRO A 3 -0.359 -3.036 -4.319 1.00 33.44 H +ATOM 44 HB2 PRO A 3 -2.720 -1.751 -4.696 1.00 54.30 H +ATOM 45 HB3 PRO A 3 -2.459 -3.436 -5.162 1.00 41.41 H +ATOM 46 HG2 PRO A 3 -3.793 -2.331 -2.720 1.00 42.24 H +ATOM 47 HG3 PRO A 3 -4.291 -3.685 -3.752 1.00 2.35 H +ATOM 48 HD2 PRO A 3 -3.033 -4.045 -1.381 1.00 12.13 H +ATOM 49 HD3 PRO A 3 -2.819 -5.151 -2.753 1.00 1.20 H +ATOM 50 N VAL A 4 -1.304 -1.017 -1.916 1.00 30.11 N +ATOM 51 CA VAL A 4 -1.073 0.288 -1.309 1.00 42.55 C +ATOM 52 C VAL A 4 -0.168 0.174 -0.088 1.00 2.51 C +ATOM 53 O VAL A 4 -0.644 0.076 1.043 1.00 63.00 O +ATOM 54 CB VAL A 4 -2.397 0.956 -0.893 1.00 42.43 C +ATOM 55 CG1 VAL A 4 -2.138 2.336 -0.306 1.00 61.43 C +ATOM 56 CG2 VAL A 4 -3.346 1.042 -2.079 1.00 44.23 C +ATOM 57 H VAL A 4 -1.833 -1.683 -1.429 1.00 65.40 H +ATOM 58 HA VAL A 4 -0.592 0.918 -2.044 1.00 61.44 H +ATOM 59 HB VAL A 4 -2.860 0.347 -0.132 1.00 34.33 H +ATOM 60 HG11 VAL A 4 -1.716 2.976 -1.067 1.00 1.54 H +ATOM 61 HG12 VAL A 4 -3.068 2.757 0.047 1.00 44.34 H +ATOM 62 HG13 VAL A 4 -1.445 2.251 0.518 1.00 44.43 H +ATOM 63 HG21 VAL A 4 -3.401 0.080 -2.565 1.00 60.43 H +ATOM 64 HG22 VAL A 4 -4.329 1.328 -1.734 1.00 41.15 H +ATOM 65 HG23 VAL A 4 -2.982 1.779 -2.779 1.00 42.34 H +TER 66 VAL A 4 +ENDMDL +MODEL 9 +ATOM 1 N PRO A 1 1.351 -0.002 -0.069 1.00 4.02 N +ATOM 2 CA PRO A 1 2.116 -0.066 -1.318 1.00 4.14 C +ATOM 3 C PRO A 1 1.976 -1.415 -2.015 1.00 1.30 C +ATOM 4 O PRO A 1 2.601 -1.659 -3.047 1.00 44.22 O +ATOM 5 CB PRO A 1 3.561 0.152 -0.860 1.00 71.12 C +ATOM 6 CG PRO A 1 3.581 -0.301 0.559 1.00 42.20 C +ATOM 7 CD PRO A 1 2.224 0.026 1.117 1.00 33.22 C +ATOM 8 HA PRO A 1 1.830 0.722 -1.999 1.00 62.20 H +ATOM 9 HB2 PRO A 1 4.228 -0.438 -1.473 1.00 40.44 H +ATOM 10 HB3 PRO A 1 3.815 1.198 -0.944 1.00 62.34 H +ATOM 11 HG2 PRO A 1 3.759 -1.365 0.603 1.00 53.54 H +ATOM 12 HG3 PRO A 1 4.348 0.232 1.103 1.00 75.43 H +ATOM 13 HD2 PRO A 1 1.921 -0.722 1.836 1.00 44.51 H +ATOM 14 HD3 PRO A 1 2.228 1.007 1.569 1.00 34.22 H +ATOM 15 N TYR A 2 1.152 -2.287 -1.445 1.00 51.14 N +ATOM 16 CA TYR A 2 0.931 -3.612 -2.012 1.00 23.22 C +ATOM 17 C TYR A 2 -0.459 -4.131 -1.659 1.00 13.04 C +ATOM 18 O TYR A 2 -0.641 -4.903 -0.717 1.00 14.01 O +ATOM 19 CB TYR A 2 1.995 -4.589 -1.508 1.00 43.20 C +ATOM 20 CG TYR A 2 2.219 -5.768 -2.428 1.00 1.23 C +ATOM 21 CD1 TYR A 2 2.803 -5.599 -3.677 1.00 40.20 C +ATOM 22 CD2 TYR A 2 1.847 -7.051 -2.047 1.00 25.43 C +ATOM 23 CE1 TYR A 2 3.009 -6.673 -4.521 1.00 34.13 C +ATOM 24 CE2 TYR A 2 2.051 -8.132 -2.883 1.00 54.13 C +ATOM 25 CZ TYR A 2 2.631 -7.938 -4.119 1.00 50.53 C +ATOM 26 OH TYR A 2 2.835 -9.011 -4.956 1.00 44.53 O +ATOM 27 H TYR A 2 0.682 -2.034 -0.624 1.00 33.54 H +ATOM 28 HA TYR A 2 1.011 -3.531 -3.086 1.00 72.30 H +ATOM 29 HB2 TYR A 2 2.934 -4.066 -1.405 1.00 72.42 H +ATOM 30 HB3 TYR A 2 1.695 -4.972 -0.544 1.00 34.11 H +ATOM 31 HD1 TYR A 2 3.098 -4.607 -3.988 1.00 40.01 H +ATOM 32 HD2 TYR A 2 1.393 -7.200 -1.078 1.00 20.42 H +ATOM 33 HE1 TYR A 2 3.464 -6.521 -5.488 1.00 75.34 H +ATOM 34 HE2 TYR A 2 1.755 -9.122 -2.570 1.00 31.24 H +ATOM 35 HH TYR A 2 3.773 -9.211 -4.995 1.00 64.44 H +ATOM 36 N PRO A 3 -1.465 -3.698 -2.433 1.00 15.35 N +ATOM 37 CA PRO A 3 -1.261 -2.778 -3.556 1.00 22.32 C +ATOM 38 C PRO A 3 -0.881 -1.375 -3.095 1.00 31.33 C +ATOM 39 O PRO A 3 -0.180 -0.648 -3.798 1.00 70.15 O +ATOM 40 CB PRO A 3 -2.623 -2.762 -4.253 1.00 53.53 C +ATOM 41 CG PRO A 3 -3.599 -3.120 -3.186 1.00 73.25 C +ATOM 42 CD PRO A 3 -2.881 -4.071 -2.270 1.00 65.53 C +ATOM 43 HA PRO A 3 -0.509 -3.147 -4.239 1.00 34.24 H +ATOM 44 HB2 PRO A 3 -2.815 -1.774 -4.650 1.00 72.50 H +ATOM 45 HB3 PRO A 3 -2.631 -3.485 -5.054 1.00 64.33 H +ATOM 46 HG2 PRO A 3 -3.897 -2.234 -2.648 1.00 0.52 H +ATOM 47 HG3 PRO A 3 -4.461 -3.602 -3.625 1.00 10.32 H +ATOM 48 HD2 PRO A 3 -3.203 -3.928 -1.250 1.00 24.35 H +ATOM 49 HD3 PRO A 3 -3.047 -5.093 -2.581 1.00 2.43 H +ATOM 50 N VAL A 4 -1.348 -1.001 -1.908 1.00 11.41 N +ATOM 51 CA VAL A 4 -1.056 0.315 -1.352 1.00 40.31 C +ATOM 52 C VAL A 4 -0.148 0.207 -0.132 1.00 43.34 C +ATOM 53 O VAL A 4 -0.619 0.172 1.004 1.00 21.41 O +ATOM 54 CB VAL A 4 -2.347 1.055 -0.953 1.00 44.34 C +ATOM 55 CG1 VAL A 4 -2.019 2.412 -0.349 1.00 54.21 C +ATOM 56 CG2 VAL A 4 -3.267 1.206 -2.155 1.00 61.33 C +ATOM 57 H VAL A 4 -1.902 -1.624 -1.394 1.00 22.54 H +ATOM 58 HA VAL A 4 -0.554 0.895 -2.113 1.00 2.22 H +ATOM 59 HB VAL A 4 -2.859 0.467 -0.206 1.00 5.21 H +ATOM 60 HG11 VAL A 4 -1.181 2.846 -0.873 1.00 44.42 H +ATOM 61 HG12 VAL A 4 -2.877 3.063 -0.438 1.00 71.31 H +ATOM 62 HG13 VAL A 4 -1.767 2.290 0.694 1.00 64.11 H +ATOM 63 HG21 VAL A 4 -3.634 0.234 -2.451 1.00 25.02 H +ATOM 64 HG22 VAL A 4 -4.101 1.841 -1.893 1.00 72.54 H +ATOM 65 HG23 VAL A 4 -2.721 1.649 -2.974 1.00 42.42 H +TER 66 VAL A 4 +ENDMDL +MODEL 10 +ATOM 1 N PRO A 1 1.332 0.004 -0.043 1.00 64.01 N +ATOM 2 CA PRO A 1 2.122 -0.062 -1.277 1.00 33.33 C +ATOM 3 C PRO A 1 1.998 -1.414 -1.972 1.00 3.12 C +ATOM 4 O PRO A 1 2.644 -1.660 -2.991 1.00 52.21 O +ATOM 5 CB PRO A 1 3.556 0.161 -0.792 1.00 64.21 C +ATOM 6 CG PRO A 1 3.550 -0.287 0.629 1.00 43.22 C +ATOM 7 CD PRO A 1 2.181 0.038 1.159 1.00 4.15 C +ATOM 8 HA PRO A 1 1.847 0.722 -1.966 1.00 54.33 H +ATOM 9 HB2 PRO A 1 4.237 -0.429 -1.390 1.00 52.02 H +ATOM 10 HB3 PRO A 1 3.810 1.207 -0.875 1.00 54.01 H +ATOM 11 HG2 PRO A 1 3.730 -1.350 0.680 1.00 53.14 H +ATOM 12 HG3 PRO A 1 4.305 0.249 1.185 1.00 14.54 H +ATOM 13 HD2 PRO A 1 1.867 -0.707 1.875 1.00 62.43 H +ATOM 14 HD3 PRO A 1 2.174 1.021 1.608 1.00 61.31 H +ATOM 15 N TYR A 2 1.166 -2.286 -1.415 1.00 71.40 N +ATOM 16 CA TYR A 2 0.960 -3.614 -1.981 1.00 34.32 C +ATOM 17 C TYR A 2 -0.436 -4.136 -1.653 1.00 12.52 C +ATOM 18 O TYR A 2 -0.635 -4.904 -0.712 1.00 24.50 O +ATOM 19 CB TYR A 2 2.016 -4.586 -1.453 1.00 62.30 C +ATOM 20 CG TYR A 2 2.267 -5.763 -2.368 1.00 64.23 C +ATOM 21 CD1 TYR A 2 2.792 -5.578 -3.642 1.00 32.32 C +ATOM 22 CD2 TYR A 2 1.979 -7.060 -1.960 1.00 45.25 C +ATOM 23 CE1 TYR A 2 3.022 -6.651 -4.482 1.00 3.51 C +ATOM 24 CE2 TYR A 2 2.208 -8.138 -2.793 1.00 41.13 C +ATOM 25 CZ TYR A 2 2.729 -7.928 -4.053 1.00 24.30 C +ATOM 26 OH TYR A 2 2.957 -9.000 -4.886 1.00 43.51 O +ATOM 27 H TYR A 2 0.679 -2.032 -0.603 1.00 64.51 H +ATOM 28 HA TYR A 2 1.060 -3.537 -3.054 1.00 12.04 H +ATOM 29 HB2 TYR A 2 2.950 -4.060 -1.328 1.00 15.53 H +ATOM 30 HB3 TYR A 2 1.695 -4.972 -0.497 1.00 32.04 H +ATOM 31 HD1 TYR A 2 3.020 -4.576 -3.975 1.00 23.30 H +ATOM 32 HD2 TYR A 2 1.571 -7.220 -0.973 1.00 72.42 H +ATOM 33 HE1 TYR A 2 3.431 -6.487 -5.468 1.00 53.14 H +ATOM 34 HE2 TYR A 2 1.978 -9.138 -2.458 1.00 23.52 H +ATOM 35 HH TYR A 2 2.245 -9.064 -5.527 1.00 0.43 H +ATOM 36 N PRO A 3 -1.428 -3.708 -2.448 1.00 12.22 N +ATOM 37 CA PRO A 3 -1.204 -2.792 -3.570 1.00 51.03 C +ATOM 38 C PRO A 3 -0.837 -1.386 -3.107 1.00 71.32 C +ATOM 39 O PRO A 3 -0.125 -0.660 -3.800 1.00 44.30 O +ATOM 40 CB PRO A 3 -2.553 -2.781 -4.294 1.00 62.52 C +ATOM 41 CG PRO A 3 -3.549 -3.139 -3.245 1.00 45.23 C +ATOM 42 CD PRO A 3 -2.845 -4.085 -2.312 1.00 12.23 C +ATOM 43 HA PRO A 3 -0.439 -3.161 -4.237 1.00 23.41 H +ATOM 44 HB2 PRO A 3 -2.740 -1.796 -4.698 1.00 64.43 H +ATOM 45 HB3 PRO A 3 -2.543 -3.508 -5.092 1.00 64.25 H +ATOM 46 HG2 PRO A 3 -3.859 -2.251 -2.716 1.00 1.02 H +ATOM 47 HG3 PRO A 3 -4.400 -3.624 -3.698 1.00 72.34 H +ATOM 48 HD2 PRO A 3 -3.187 -3.939 -1.298 1.00 15.31 H +ATOM 49 HD3 PRO A 3 -3.003 -5.107 -2.621 1.00 63.45 H +ATOM 50 N VAL A 4 -1.328 -1.009 -1.931 1.00 0.40 N +ATOM 51 CA VAL A 4 -1.050 0.310 -1.374 1.00 51.15 C +ATOM 52 C VAL A 4 -0.166 0.209 -0.137 1.00 5.11 C +ATOM 53 O VAL A 4 -0.659 0.176 0.990 1.00 22.33 O +ATOM 54 CB VAL A 4 -2.350 1.048 -1.004 1.00 12.22 C +ATOM 55 CG1 VAL A 4 -2.039 2.413 -0.409 1.00 44.01 C +ATOM 56 CG2 VAL A 4 -3.252 1.181 -2.221 1.00 54.44 C +ATOM 57 H VAL A 4 -1.890 -1.632 -1.425 1.00 63.11 H +ATOM 58 HA VAL A 4 -0.535 0.889 -2.127 1.00 63.54 H +ATOM 59 HB VAL A 4 -2.871 0.466 -0.258 1.00 60.41 H +ATOM 60 HG11 VAL A 4 -2.818 3.110 -0.680 1.00 33.20 H +ATOM 61 HG12 VAL A 4 -1.983 2.333 0.667 1.00 51.23 H +ATOM 62 HG13 VAL A 4 -1.093 2.765 -0.794 1.00 3.55 H +ATOM 63 HG21 VAL A 4 -3.833 0.278 -2.339 1.00 44.40 H +ATOM 64 HG22 VAL A 4 -3.918 2.022 -2.087 1.00 30.23 H +ATOM 65 HG23 VAL A 4 -2.648 1.339 -3.102 1.00 51.12 H +TER 66 VAL A 4 +ENDMDL +CONECT 1 52 +CONECT 52 1 +MASTER 97 0 0 0 0 0 0 6 33 1 2 1 +END diff --git a/test/data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.json b/test/data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.json new file mode 100644 index 00000000..d1148df5 --- /dev/null +++ b/test/data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.json @@ -0,0 +1,604 @@ +{ + "PC_Compounds": [ + { + "id": { + "id": { + "cid": 64139 + } + }, + "atoms": { + "aid": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30 + ], + "element": [ + 17, + 9, + 9, + 9, + 8, + 8, + 7, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + }, + "bonds": { + "aid1": [ + 1, + 2, + 3, + 4, + 5, + 5, + 6, + 7, + 7, + 7, + 8, + 8, + 8, + 8, + 9, + 9, + 9, + 10, + 10, + 11, + 11, + 11, + 12, + 13, + 13, + 15, + 17, + 17, + 18, + 18, + 20, + 21 + ], + "aid2": [ + 20, + 16, + 16, + 16, + 11, + 19, + 19, + 15, + 19, + 28, + 9, + 10, + 12, + 22, + 10, + 23, + 24, + 25, + 26, + 13, + 14, + 16, + 14, + 15, + 17, + 18, + 20, + 27, + 21, + 29, + 21, + 30 + ], + "order": [ + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 3, + 2, + 1, + 1, + 2, + 1, + 2, + 1, + 1, + 1 + ] + }, + "stereo": [ + { + "tetrahedral": { + "center": 11, + "above": 5, + "top": 14, + "bottom": 13, + "below": 16, + "parity": 2, + "type": 1 + } + } + ], + "coords": [ + { + "type": [ + 2, + 5, + 10 + ], + "aid": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30 + ], + "conformers": [ + { + "x": [ + -1.8517, + 0.6247, + -0.8429, + 1.2813, + -0.0148, + -1.3185, + -2.2209, + 3.7503, + 5.0242, + 4.5279, + 0.1841, + 2.5029, + -0.9487, + 1.4631, + -2.1194, + 0.3155, + -0.8814, + -3.2029, + -1.1974, + -1.9574, + -3.1181, + 3.7843, + 5.8913, + 4.9797, + 4.1509, + 5.0619, + 0.0177, + -3.0977, + -4.1142, + -3.9652 + ], + "y": [ + -4.1698, + -0.2557, + 1.3563, + 1.7932, + 1.9856, + 3.6194, + 1.529, + -0.7467, + -0.327, + -1.7354, + 0.6662, + -0.2523, + -0.2941, + 0.1597, + 0.1807, + 0.8967, + -1.6529, + -0.6706, + 2.4432, + -2.5085, + -2.017, + -0.8713, + -0.1618, + 0.3145, + -2.0364, + -2.5152, + -2.0482, + 1.85, + -0.2952, + -2.6698 + ], + "z": [ + -0.4699, + -2.3268, + -2.2087, + -1.9571, + 0.3762, + 1.2215, + 1.0158, + 1.2909, + 0.6266, + 0.4796, + -0.2072, + 0.7667, + 0.0771, + 0.3297, + 0.6656, + -1.7193, + -0.2756, + 0.9065, + 0.8814, + -0.032, + 0.5591, + 2.3686, + 1.255, + -0.2455, + -0.4907, + 1.0095, + -0.7436, + 1.4168, + 1.3648, + 0.7526 + ], + "data": [ + { + "urn": { + "label": "Conformer", + "name": "ID", + "datatype": 11, + "version": "2.1", + "software": "PubChem", + "source": "ncbi.nlm.nih.gov", + "release": "2009.12.11" + }, + "value": { + "sval": "0000FA8B00000001" + } + }, + { + "urn": { + "label": "Energy", + "name": "MMFF94 NoEstat", + "datatype": 7, + "version": "1.6.0", + "software": "Szybki", + "source": "openeye.com", + "release": "2012.01.18" + }, + "value": { + "fval": 45.1374 + } + }, + { + "urn": { + "label": "Feature", + "name": "Self Overlap", + "datatype": 7, + "version": "2.1", + "software": "PubChem", + "source": "ncbi.nlm.nih.gov", + "release": "2012.01.18" + }, + "value": { + "fval": 20.321 + } + }, + { + "urn": { + "label": "Fingerprint", + "name": "Shape", + "datatype": 2, + "version": "2.1", + "software": "PubChem", + "source": "ncbi.nlm.nih.gov", + "release": "2012.11.26" + }, + "value": { + "slist": [ + "11552529 35 18411691081019363690", + "11578080 2 18044073869013439541", + "11582403 64 17125340352293727508", + "12173636 292 18125711301958268368", + "12633257 1 17846509131329728418", + "12969540 37 17544458109124497754", + "13004483 165 18335972129807399131", + "13009979 54 18263094360446621442", + "13583140 156 17632002071310179050", + "14817 1 14567614579348088469", + "15230672 131 17762630491274472534", + "16945 1 18342184340455327777", + "17780758 139 18194945384933916210", + "17980427 26 16974202501815245925", + "1813 80 17822016410615597886", + "19765921 60 17106822785807489709", + "20600515 1 17988093295594516297", + "20602899 9 17902479659040646142", + "21330990 113 17616267887701488582", + "21421861 104 17405436984211083067", + "21452121 71 18122625221468424250", + "21650355 55 18342453776744372091", + "22112679 90 17968680227994876564", + "232386 152 18267591380078514867", + "23402539 116 18060127731353406337", + "23419403 2 17255066592425937844", + "23559900 14 18341885346840105008", + "25222932 49 15752600647688393279", + "2748010 2 17472726632058063985", + "58807428 26 18126864702509266979", + "6992083 37 18115317665421694312", + "7097593 13 17981042234567955179", + "90316 7 18343309192617133945" + ] + } + }, + { + "urn": { + "label": "Shape", + "name": "Multipoles", + "datatype": 8, + "version": "1.8.1", + "software": "OEShape", + "source": "openeye.com", + "release": "2012.01.18" + }, + "value": { + "fvec": [ + 395.5, + 6.34, + 3.72, + 1.61, + 9.19, + 0.6, + 1.17, + 4.68, + -2.87, + -3.23, + -0.32, + 0.18, + -0.82, + -0.97 + ] + } + }, + { + "urn": { + "label": "Shape", + "name": "Self Overlap", + "datatype": 7, + "version": "2.1", + "software": "PubChem", + "source": "ncbi.nlm.nih.gov", + "release": "2012.01.18" + }, + "value": { + "fval": 853.175 + } + }, + { + "urn": { + "label": "Shape", + "name": "Volume", + "datatype": 7, + "version": "1.8.1", + "software": "OEShape", + "source": "openeye.com", + "release": "2012.01.18" + }, + "value": { + "fval": 218.7 + } + } + ] + } + ], + "data": [ + { + "urn": { + "label": "Conformer", + "name": "RMSD", + "datatype": 7, + "release": "2009.12.11" + }, + "value": { + "fval": 0.6 + } + }, + { + "urn": { + "label": "Diverse Conformer", + "name": "ID List", + "datatype": 6, + "release": "2010.05.05" + }, + "value": { + "ivec": [ + 1 + ] + } + } + ] + } + ], + "props": [ + { + "urn": { + "label": "Charge", + "name": "MMFF94 Partial", + "datatype": 2, + "version": "1.9.0", + "software": "OEChem", + "source": "openeye.com", + "release": "2012.11.26" + }, + "value": { + "slist": [ + "29", + "1 -0.18", + "10 -0.2", + "11 0.62", + "12 -0.1", + "13 -0.14", + "14 -0.2", + "15 0.12", + "16 1.02", + "17 -0.15", + "18 -0.15", + "19 0.78", + "2 -0.34", + "20 0.18", + "21 -0.15", + "22 0.1", + "23 0.1", + "24 0.1", + "25 0.1", + "26 0.1", + "27 0.15", + "28 0.37", + "29 0.15", + "3 -0.34", + "30 0.15", + "4 -0.34", + "5 -0.43", + "6 -0.57", + "7 -0.55", + "9 -0.2" + ] + } + }, + { + "urn": { + "label": "Count", + "name": "Effective Rotor", + "datatype": 7, + "version": "1.7.6", + "software": "OEChem", + "source": "ncbi.nlm.nih.gov", + "release": "2012.01.18" + }, + "value": { + "fval": 2.2 + } + }, + { + "urn": { + "label": "Features", + "name": "Pharmacophore", + "datatype": 2, + "parameters": "ImplicitMillsDean merged", + "version": "1.8.3", + "software": "OEShape", + "source": "openeye.com", + "release": "2012.11.26" + }, + "value": { + "slist": [ + "4", + "1 6 acceptor", + "1 7 donor", + "6 13 15 17 18 20 21 rings", + "6 5 7 11 13 15 19 rings" + ] + } + } + ], + "count": { + "heavy_atom": 21, + "atom_chiral": 1, + "atom_chiral_def": 1, + "atom_chiral_undef": 0, + "bond_chiral": 0, + "bond_chiral_def": 0, + "bond_chiral_undef": 0, + "isotope_atom": 0, + "covalent_unit": 1, + "tautomers": 2 + } + } + ] +} diff --git a/test/data/Sustiva_Efavirenz_Conformer3D_CID_64139.json b/test/data/Sustiva_Efavirenz_Conformer3D_CID_64139.json new file mode 100644 index 00000000..d1148df5 --- /dev/null +++ b/test/data/Sustiva_Efavirenz_Conformer3D_CID_64139.json @@ -0,0 +1,604 @@ +{ + "PC_Compounds": [ + { + "id": { + "id": { + "cid": 64139 + } + }, + "atoms": { + "aid": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30 + ], + "element": [ + 17, + 9, + 9, + 9, + 8, + 8, + 7, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 6, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + }, + "bonds": { + "aid1": [ + 1, + 2, + 3, + 4, + 5, + 5, + 6, + 7, + 7, + 7, + 8, + 8, + 8, + 8, + 9, + 9, + 9, + 10, + 10, + 11, + 11, + 11, + 12, + 13, + 13, + 15, + 17, + 17, + 18, + 18, + 20, + 21 + ], + "aid2": [ + 20, + 16, + 16, + 16, + 11, + 19, + 19, + 15, + 19, + 28, + 9, + 10, + 12, + 22, + 10, + 23, + 24, + 25, + 26, + 13, + 14, + 16, + 14, + 15, + 17, + 18, + 20, + 27, + 21, + 29, + 21, + 30 + ], + "order": [ + 1, + 1, + 1, + 1, + 1, + 1, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 3, + 2, + 1, + 1, + 2, + 1, + 2, + 1, + 1, + 1 + ] + }, + "stereo": [ + { + "tetrahedral": { + "center": 11, + "above": 5, + "top": 14, + "bottom": 13, + "below": 16, + "parity": 2, + "type": 1 + } + } + ], + "coords": [ + { + "type": [ + 2, + 5, + 10 + ], + "aid": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28, + 29, + 30 + ], + "conformers": [ + { + "x": [ + -1.8517, + 0.6247, + -0.8429, + 1.2813, + -0.0148, + -1.3185, + -2.2209, + 3.7503, + 5.0242, + 4.5279, + 0.1841, + 2.5029, + -0.9487, + 1.4631, + -2.1194, + 0.3155, + -0.8814, + -3.2029, + -1.1974, + -1.9574, + -3.1181, + 3.7843, + 5.8913, + 4.9797, + 4.1509, + 5.0619, + 0.0177, + -3.0977, + -4.1142, + -3.9652 + ], + "y": [ + -4.1698, + -0.2557, + 1.3563, + 1.7932, + 1.9856, + 3.6194, + 1.529, + -0.7467, + -0.327, + -1.7354, + 0.6662, + -0.2523, + -0.2941, + 0.1597, + 0.1807, + 0.8967, + -1.6529, + -0.6706, + 2.4432, + -2.5085, + -2.017, + -0.8713, + -0.1618, + 0.3145, + -2.0364, + -2.5152, + -2.0482, + 1.85, + -0.2952, + -2.6698 + ], + "z": [ + -0.4699, + -2.3268, + -2.2087, + -1.9571, + 0.3762, + 1.2215, + 1.0158, + 1.2909, + 0.6266, + 0.4796, + -0.2072, + 0.7667, + 0.0771, + 0.3297, + 0.6656, + -1.7193, + -0.2756, + 0.9065, + 0.8814, + -0.032, + 0.5591, + 2.3686, + 1.255, + -0.2455, + -0.4907, + 1.0095, + -0.7436, + 1.4168, + 1.3648, + 0.7526 + ], + "data": [ + { + "urn": { + "label": "Conformer", + "name": "ID", + "datatype": 11, + "version": "2.1", + "software": "PubChem", + "source": "ncbi.nlm.nih.gov", + "release": "2009.12.11" + }, + "value": { + "sval": "0000FA8B00000001" + } + }, + { + "urn": { + "label": "Energy", + "name": "MMFF94 NoEstat", + "datatype": 7, + "version": "1.6.0", + "software": "Szybki", + "source": "openeye.com", + "release": "2012.01.18" + }, + "value": { + "fval": 45.1374 + } + }, + { + "urn": { + "label": "Feature", + "name": "Self Overlap", + "datatype": 7, + "version": "2.1", + "software": "PubChem", + "source": "ncbi.nlm.nih.gov", + "release": "2012.01.18" + }, + "value": { + "fval": 20.321 + } + }, + { + "urn": { + "label": "Fingerprint", + "name": "Shape", + "datatype": 2, + "version": "2.1", + "software": "PubChem", + "source": "ncbi.nlm.nih.gov", + "release": "2012.11.26" + }, + "value": { + "slist": [ + "11552529 35 18411691081019363690", + "11578080 2 18044073869013439541", + "11582403 64 17125340352293727508", + "12173636 292 18125711301958268368", + "12633257 1 17846509131329728418", + "12969540 37 17544458109124497754", + "13004483 165 18335972129807399131", + "13009979 54 18263094360446621442", + "13583140 156 17632002071310179050", + "14817 1 14567614579348088469", + "15230672 131 17762630491274472534", + "16945 1 18342184340455327777", + "17780758 139 18194945384933916210", + "17980427 26 16974202501815245925", + "1813 80 17822016410615597886", + "19765921 60 17106822785807489709", + "20600515 1 17988093295594516297", + "20602899 9 17902479659040646142", + "21330990 113 17616267887701488582", + "21421861 104 17405436984211083067", + "21452121 71 18122625221468424250", + "21650355 55 18342453776744372091", + "22112679 90 17968680227994876564", + "232386 152 18267591380078514867", + "23402539 116 18060127731353406337", + "23419403 2 17255066592425937844", + "23559900 14 18341885346840105008", + "25222932 49 15752600647688393279", + "2748010 2 17472726632058063985", + "58807428 26 18126864702509266979", + "6992083 37 18115317665421694312", + "7097593 13 17981042234567955179", + "90316 7 18343309192617133945" + ] + } + }, + { + "urn": { + "label": "Shape", + "name": "Multipoles", + "datatype": 8, + "version": "1.8.1", + "software": "OEShape", + "source": "openeye.com", + "release": "2012.01.18" + }, + "value": { + "fvec": [ + 395.5, + 6.34, + 3.72, + 1.61, + 9.19, + 0.6, + 1.17, + 4.68, + -2.87, + -3.23, + -0.32, + 0.18, + -0.82, + -0.97 + ] + } + }, + { + "urn": { + "label": "Shape", + "name": "Self Overlap", + "datatype": 7, + "version": "2.1", + "software": "PubChem", + "source": "ncbi.nlm.nih.gov", + "release": "2012.01.18" + }, + "value": { + "fval": 853.175 + } + }, + { + "urn": { + "label": "Shape", + "name": "Volume", + "datatype": 7, + "version": "1.8.1", + "software": "OEShape", + "source": "openeye.com", + "release": "2012.01.18" + }, + "value": { + "fval": 218.7 + } + } + ] + } + ], + "data": [ + { + "urn": { + "label": "Conformer", + "name": "RMSD", + "datatype": 7, + "release": "2009.12.11" + }, + "value": { + "fval": 0.6 + } + }, + { + "urn": { + "label": "Diverse Conformer", + "name": "ID List", + "datatype": 6, + "release": "2010.05.05" + }, + "value": { + "ivec": [ + 1 + ] + } + } + ] + } + ], + "props": [ + { + "urn": { + "label": "Charge", + "name": "MMFF94 Partial", + "datatype": 2, + "version": "1.9.0", + "software": "OEChem", + "source": "openeye.com", + "release": "2012.11.26" + }, + "value": { + "slist": [ + "29", + "1 -0.18", + "10 -0.2", + "11 0.62", + "12 -0.1", + "13 -0.14", + "14 -0.2", + "15 0.12", + "16 1.02", + "17 -0.15", + "18 -0.15", + "19 0.78", + "2 -0.34", + "20 0.18", + "21 -0.15", + "22 0.1", + "23 0.1", + "24 0.1", + "25 0.1", + "26 0.1", + "27 0.15", + "28 0.37", + "29 0.15", + "3 -0.34", + "30 0.15", + "4 -0.34", + "5 -0.43", + "6 -0.57", + "7 -0.55", + "9 -0.2" + ] + } + }, + { + "urn": { + "label": "Count", + "name": "Effective Rotor", + "datatype": 7, + "version": "1.7.6", + "software": "OEChem", + "source": "ncbi.nlm.nih.gov", + "release": "2012.01.18" + }, + "value": { + "fval": 2.2 + } + }, + { + "urn": { + "label": "Features", + "name": "Pharmacophore", + "datatype": 2, + "parameters": "ImplicitMillsDean merged", + "version": "1.8.3", + "software": "OEShape", + "source": "openeye.com", + "release": "2012.11.26" + }, + "value": { + "slist": [ + "4", + "1 6 acceptor", + "1 7 donor", + "6 13 15 17 18 20 21 rings", + "6 5 7 11 13 15 19 rings" + ] + } + } + ], + "count": { + "heavy_atom": 21, + "atom_chiral": 1, + "atom_chiral_def": 1, + "atom_chiral_undef": 0, + "bond_chiral": 0, + "bond_chiral_def": 0, + "bond_chiral_undef": 0, + "isotope_atom": 0, + "covalent_unit": 1, + "tautomers": 2 + } + } + ] +} diff --git a/test/data/sustiva.pdb b/test/data/sustiva.pdb new file mode 100644 index 00000000..b90f9298 --- /dev/null +++ b/test/data/sustiva.pdb @@ -0,0 +1,24 @@ +REMARK 800 SITE_DESCRIPTION: BINDING SITE FOR RESIDUE EFZ A 999 +HETATM 7759 CL EFZ A 999 -4.685 -32.725 25.222 1.00 50.93 CL +HETATM 7760 F1 EFZ A 999 -0.755 -36.632 25.697 1.00 62.80 F +HETATM 7761 F2 EFZ A 999 1.078 -37.043 24.672 1.00 70.73 F +HETATM 7762 F3 EFZ A 999 -0.784 -37.177 23.626 1.00 75.12 F +HETATM 7763 O1 EFZ A 999 1.524 -34.934 20.910 1.00 73.73 O +HETATM 7764 O2 EFZ A 999 0.989 -34.880 23.058 1.00 73.24 O +HETATM 7765 N EFZ A 999 -0.681 -34.971 21.434 1.00 71.12 N +HETATM 7766 C1 EFZ A 999 -1.662 -34.414 22.313 1.00 71.29 C +HETATM 7767 C2 EFZ A 999 -2.915 -33.947 21.843 1.00 72.17 C +HETATM 7768 C3 EFZ A 999 -3.838 -33.423 22.771 1.00 71.25 C +HETATM 7769 C4 EFZ A 999 -3.533 -33.373 24.119 1.00 63.88 C +HETATM 7770 C5 EFZ A 999 -2.310 -33.829 24.593 1.00 63.40 C +HETATM 7771 C6 EFZ A 999 -1.386 -34.378 23.681 1.00 68.96 C +HETATM 7772 C7 EFZ A 999 -0.002 -34.957 24.144 1.00 71.35 C +HETATM 7773 C8 EFZ A 999 0.552 -34.236 25.315 1.00 75.97 C +HETATM 7774 C9 EFZ A 999 0.985 -33.657 26.241 1.00 81.31 C +HETATM 7775 C10 EFZ A 999 1.605 -32.802 27.586 1.00 80.51 C +HETATM 7776 C11 EFZ A 999 2.808 -33.083 27.639 1.00 83.59 C +HETATM 7777 C12 EFZ A 999 2.404 -31.980 27.123 1.00 79.58 C +HETATM 7778 C13 EFZ A 999 -0.121 -36.472 24.539 1.00 72.76 C +HETATM 7779 C14 EFZ A 999 0.665 -34.932 21.725 1.00 70.58 C +TER +END diff --git a/test/data/sustiva_openbabel.mol2 b/test/data/sustiva_openbabel.mol2 new file mode 100644 index 00000000..cfe8989e --- /dev/null +++ b/test/data/sustiva_openbabel.mol2 @@ -0,0 +1,52 @@ +@MOLECULE +sustiva.pdb + 21 23 0 0 0 +SMALL +GASTEIGER + +@ATOM + 1 CL -4.6850 -32.7250 25.2220 Cl 999 EFZ999 -0.0823 + 2 F1 -0.7550 -36.6320 25.6970 F 999 EFZ999 -0.1654 + 3 F2 1.0780 -37.0430 24.6720 F 999 EFZ999 -0.1654 + 4 F3 -0.7840 -37.1770 23.6260 F 999 EFZ999 -0.1654 + 5 O1 1.5240 -34.9340 20.9100 O.2 999 EFZ999 -0.2241 + 6 O2 0.9890 -34.8800 23.0580 O.3 999 EFZ999 -0.4156 + 7 N -0.6810 -34.9710 21.4340 N.am 999 EFZ999 -0.1426 + 8 C1 -1.6620 -34.4140 22.3130 C.ar 999 EFZ999 0.0772 + 9 C2 -2.9150 -33.9470 21.8430 C.ar 999 EFZ999 0.0174 + 10 C3 -3.8380 -33.4230 22.7710 C.ar 999 EFZ999 0.0127 + 11 C4 -3.5330 -33.3730 24.1190 C.ar 999 EFZ999 0.0576 + 12 C5 -2.3100 -33.8290 24.5930 C.ar 999 EFZ999 0.0130 + 13 C6 -1.3860 -34.3780 23.6810 C.ar 999 EFZ999 0.0499 + 14 C7 -0.0020 -34.9570 24.1440 C.3 999 EFZ999 0.2965 + 15 C8 0.5520 -34.2360 25.3150 C.1 999 EFZ999 -0.0403 + 16 C9 0.9850 -33.6570 26.2410 C.1 999 EFZ999 -0.0882 + 17 C10 1.6050 -32.8020 27.5860 C.3 999 EFZ999 0.0643 + 18 C11 2.8080 -33.0830 27.6390 C.3 999 EFZ999 0.0140 + 19 C12 2.4040 -31.9800 27.1230 C.3 999 EFZ999 0.0140 + 20 C13 -0.1210 -36.4720 24.5390 C.3 999 EFZ999 0.4460 + 21 C14 0.6650 -34.9320 21.7250 C.2 999 EFZ999 0.4266 +@BOND + 1 5 21 2 + 2 7 21 am + 3 7 8 1 + 4 21 6 1 + 5 9 8 ar + 6 9 10 ar + 7 8 13 ar + 8 10 11 ar + 9 6 14 1 + 10 4 20 1 + 11 13 14 1 + 12 13 12 ar + 13 11 12 ar + 14 11 1 1 + 15 14 20 1 + 16 14 15 1 + 17 20 3 1 + 18 20 2 1 + 19 15 16 3 + 20 16 17 1 + 21 19 17 1 + 22 19 18 1 + 23 17 18 1 diff --git a/test/test_fileformats.jl b/test/test_fileformats.jl index 403384e8..d358ca9c 100644 --- a/test/test_fileformats.jl +++ b/test/test_fileformats.jl @@ -50,3 +50,24 @@ end @test mol2.bonds.properties[i]["PCBondAnnotation_for_conformer"][2] == values[i] end end + + +@testset "mol2_import" begin + mol = load_mol2("data/sustiva_openbabel.mol2") + + @test mol.name == "data/sustiva_openbabel.mol2" + + @test count_atoms(mol) == 30 + @test count_bonds(mol) == 32 +end + +@testset "mol2_export" begin + export_mol2(load_pubchem_json("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.json"), "data/") + + @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139_balljl_export.mol2")[1] == "@MOLECULE" + @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139_balljl_export.mol2")[8] == "@ATOM" + @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139_balljl_export.mol2")[39] == "@BOND" + + rm("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139_balljl_export.mol2") + +end \ No newline at end of file From c3ae68a88c9b74b529ba6894602329edd92f895b Mon Sep 17 00:00:00 2001 From: shuettel7 Date: Sat, 29 Oct 2022 11:50:19 +0200 Subject: [PATCH 02/15] line import more flexible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Hüttel --- src/fileformats/mol2.jl | 27 +++++++++++++++------------ test/test_fileformats.jl | 4 ++-- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl index 94b7aeb8..8b5a80ce 100644 --- a/src/fileformats/mol2.jl +++ b/src/fileformats/mol2.jl @@ -14,6 +14,7 @@ function load_mol2(fname::AbstractString, T = Float32) section_line = 0 for (i, line) in enumerate(readlines(mol2_file)) + println(line) if !isempty(line) if line[1] == '@' section = string(line) @@ -28,11 +29,12 @@ function load_mol2(fname::AbstractString, T = Float32) end elseif section == "@ATOM" section_line += 1 - number = parse(Int64, line[1:7]) - name = strip(line[9:15]) + line_elements = split(line) + number = parse(Int64, line_elements[1]) + name = line_elements[2] element = parse(Elements, mol2_get_element(name)) - atomtype = strip(line[51:54]) - r = Vector3{T}(parse(T, line[17:27]), parse(T, line[28:38]), parse(T, line[39:49])) + atomtype = line_elements[6] + r = Vector3{T}(parse(T, line_elements[3]), parse(T, line_elements[4]), parse(T, line_elements[5])) v = Vector3{T}(0.0, 0.0, 0.0) F = Vector3{T}(0.0, 0.0, 0.0) has_velocity = false @@ -43,11 +45,13 @@ function load_mol2(fname::AbstractString, T = Float32) push!(new_mol.atoms, new_atom) elseif section == "@BOND" section_line += 1 - new_bond = (a1 = parse(Int64, line[8:13]), - a2 = parse(Int64, line[14:19]), - order = BondOrderType(mol2_get_BondOrder(line))) + line_elements = split(line) + new_bond = (a1 = parse(Int64, line_elements[2]), + a2 = parse(Int64, line_elements[3]), + order = BondOrderType(mol2_get_BondOrder(line_elements[4]))) push!(new_mol.bonds, new_bond) end + ### TODO: import information from @SUBSTRUCTURE if given, change Molecule into PDBMolecule end return new_mol end @@ -216,12 +220,11 @@ function build_flush_left_string(input::Any, length::Int) end -function mol2_get_BondOrder(line::AbstractString) - bondorder_string = strip(line[20:lastindex(line)]) - if isnumeric(bondorder_string[1]) - return Int(DefBond(parse(Int64, bondorder_string))) +function mol2_get_BondOrder(substring::AbstractString) + if isnumeric(substring[1]) + return Int(DefBond(parse(Int64, substring))) else - return Int(parse(DefBonds, bondorder_string)) + return Int(parse(DefBonds, substring)) end end diff --git a/test/test_fileformats.jl b/test/test_fileformats.jl index d358ca9c..70553329 100644 --- a/test/test_fileformats.jl +++ b/test/test_fileformats.jl @@ -57,8 +57,8 @@ end @test mol.name == "data/sustiva_openbabel.mol2" - @test count_atoms(mol) == 30 - @test count_bonds(mol) == 32 + @test count_atoms(mol) == 21 + @test count_bonds(mol) == 23 end @testset "mol2_export" begin From 0adb839c108cf886c77e71709d4ea450f5d300ea Mon Sep 17 00:00:00 2001 From: shuettel7 Date: Tue, 8 Nov 2022 14:28:40 +0100 Subject: [PATCH 03/15] omit "_balljl_export" in export file naming MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Hüttel --- Project.toml | 1 + src/fileformats/mol2.jl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index e5334240..bfd301da 100644 --- a/Project.toml +++ b/Project.toml @@ -12,6 +12,7 @@ DataFramesMeta = "1313f7d8-7da2-5740-9ea0-a2ca25f37964" EnumX = "4e289a0a-7415-4d19-859d-a7e5c4648b56" JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl index 8b5a80ce..b4257a50 100644 --- a/src/fileformats/mol2.jl +++ b/src/fileformats/mol2.jl @@ -59,7 +59,7 @@ end function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) mol_name = prepare_mol_name(mol.name) - export_file = open(string(filelocation, mol_name, "_balljl_export.mol2") , "w") + export_file = open(string(filelocation, mol_name, ".mol2") , "w") ### Molecule section write(export_file, "@MOLECULE\n") From e667290326571081503fb9cf13e638ab6c57ee0f Mon Sep 17 00:00:00 2001 From: shuettel7 Date: Thu, 10 Nov 2022 15:25:47 +0100 Subject: [PATCH 04/15] clean up, removed Revise from Project.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Hüttel --- .gitignore | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Project.toml | 1 - 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fef113ed..b7cf8fee 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,63 @@ /.vscode/ /docs/build/ Manifest.toml + +src/validation/ball_atomtyping_validation/.idea/workspace.xml + +src/validation/ball_atomtyping_validation/build/ball_atomtyping_validation + +src/validation/ball_atomtyping_validation/build/cmake_install.cmake + +src/validation/ball_atomtyping_validation/build/CMakeCache.txt + +src/validation/ball_atomtyping_validation/build/CMakeFiles/3.10.2/CMakeCXXCompiler.cmake + +src/validation/ball_atomtyping_validation/build/CMakeFiles/3.10.2/CMakeDetermineCompilerABI_CXX.bin + +src/validation/ball_atomtyping_validation/build/CMakeFiles/3.10.2/CMakeSystem.cmake + +src/validation/ball_atomtyping_validation/build/CMakeFiles/3.10.2/CompilerIdCXX/a.out + +src/validation/ball_atomtyping_validation/build/CMakeFiles/3.10.2/CompilerIdCXX/CMakeCXXCompilerId.cpp + +src/validation/ball_atomtyping_validation/build/CMakeFiles/ball_atomtyping_validation.dir/build.make + +src/validation/ball_atomtyping_validation/build/CMakeFiles/ball_atomtyping_validation.dir/cmake_clean.cmake + +src/validation/ball_atomtyping_validation/build/CMakeFiles/ball_atomtyping_validation.dir/CXX.includecache + +src/validation/ball_atomtyping_validation/build/CMakeFiles/ball_atomtyping_validation.dir/depend.internal + +src/validation/ball_atomtyping_validation/build/CMakeFiles/ball_atomtyping_validation.dir/depend.make + +src/validation/ball_atomtyping_validation/build/CMakeFiles/ball_atomtyping_validation.dir/DependInfo.cmake + +src/validation/ball_atomtyping_validation/build/CMakeFiles/ball_atomtyping_validation.dir/flags.make + +src/validation/ball_atomtyping_validation/build/CMakeFiles/ball_atomtyping_validation.dir/link.txt + +src/validation/ball_atomtyping_validation/build/CMakeFiles/ball_atomtyping_validation.dir/main.cpp.o + +src/validation/ball_atomtyping_validation/build/CMakeFiles/ball_atomtyping_validation.dir/progress.make + +src/validation/ball_atomtyping_validation/build/CMakeFiles/cmake.check_cache + +src/validation/ball_atomtyping_validation/build/CMakeFiles/CMakeDirectoryInformation.cmake + +src/validation/ball_atomtyping_validation/build/CMakeFiles/CMakeOutput.log + +src/validation/ball_atomtyping_validation/build/CMakeFiles/feature_tests.bin + +src/validation/ball_atomtyping_validation/build/CMakeFiles/feature_tests.cxx + +src/validation/ball_atomtyping_validation/build/CMakeFiles/Makefile.cmake + +src/validation/ball_atomtyping_validation/build/CMakeFiles/Makefile2 + +src/validation/ball_atomtyping_validation/build/CMakeFiles/progress.marks + +src/validation/ball_atomtyping_validation/build/CMakeFiles/TargetDirectories.txt + +src/validation/ball_atomtyping_validation/build/Makefile + +test/data/3mea.pdb diff --git a/Project.toml b/Project.toml index bfd301da..e5334240 100644 --- a/Project.toml +++ b/Project.toml @@ -12,7 +12,6 @@ DataFramesMeta = "1313f7d8-7da2-5740-9ea0-a2ca25f37964" EnumX = "4e289a0a-7415-4d19-859d-a7e5c4648b56" JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" From 888bd452ded1c838f5a7763b379784687cbae3a1 Mon Sep 17 00:00:00 2001 From: shuettel7 Date: Tue, 15 Nov 2022 22:23:24 +0100 Subject: [PATCH 05/15] adapted for new properties in atom and bond --- src/BiochemicalAlgorithms.jl | 1 - src/core/bond.jl | 20 ++++++++++++-------- src/core/def_bond.jl | 21 --------------------- src/fileformats/mol2.jl | 27 ++++++++++++++++++++------- test/test_fileformats.jl | 14 ++++++++++---- 5 files changed, 42 insertions(+), 41 deletions(-) delete mode 100644 src/core/def_bond.jl diff --git a/src/BiochemicalAlgorithms.jl b/src/BiochemicalAlgorithms.jl index c8fddd96..42c9e56b 100644 --- a/src/BiochemicalAlgorithms.jl +++ b/src/BiochemicalAlgorithms.jl @@ -13,7 +13,6 @@ include("core/residue.jl") include("core/fragment.jl") include("core/nucleotide.jl") include("core/protein.jl") -include("core/def_bond.jl") module PubChem diff --git a/src/core/bond.jl b/src/core/bond.jl index e1cc1526..0bd93d72 100644 --- a/src/core/bond.jl +++ b/src/core/bond.jl @@ -1,4 +1,4 @@ -export Bond, BondOrder, BondOrderType +export Bond, BondOrder, BondOrderType, BondShortOrder, BondShortOrderType using EnumX @@ -7,21 +7,25 @@ using EnumX Double = 2 Triple = 3 Quadruple = 4 - Quintuple = 5 - Amide = 20 # mol2 format bond type - Aromatic = 21 # mol2 format bond type - Dummy = 23 # mol2 format bond type Unknown = 100 - NotConnected = 101 # mol2 format bond type end const BondOrderType = BondOrder.T -Base.parse(BondOrder, x) = getproperty(BondOrder, Symbol(x)) - const Bond = @NamedTuple begin a1::Int a2::Int order::BondOrderType properties::Properties end + + +@enumx BondShortOrder begin + sb = 1 + db = 2 + tb = 3 + qb = 4 + un = 100 +end + +const BondShortOrderType = BondShortOrder.T \ No newline at end of file diff --git a/src/core/def_bond.jl b/src/core/def_bond.jl deleted file mode 100644 index 6636a239..00000000 --- a/src/core/def_bond.jl +++ /dev/null @@ -1,21 +0,0 @@ - -using EnumX - -export DefBond, DefBonds - -@enumx DefBonds begin - sb = 1 - db = 2 - tb = 3 - qd = 4 - qt = 5 - am = 20 # mol2 bond type, amide - ar = 21 # mol2 bond type, aromatic - du = 23 # mol2 bond type, dummy - un = 100 # mol2 bond type, unknown - nc = 101 # mol2 bond type, not connected -end - -const DefBond = DefBonds.T - -Base.parse(DefBonds, x) = getproperty(DefBonds, Symbol(x)) \ No newline at end of file diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl index b4257a50..0020b876 100644 --- a/src/fileformats/mol2.jl +++ b/src/fileformats/mol2.jl @@ -8,13 +8,11 @@ function load_mol2(fname::AbstractString, T = Float32) println("Please make sure, you are loading a mol2 file!\n(file ending should be mol2)") return end - mol2_file = open(fname) new_mol = Molecule(fname) section = "" section_line = 0 - for (i, line) in enumerate(readlines(mol2_file)) - println(line) + for (i, line) in enumerate(readlines(fname)) if !isempty(line) if line[1] == '@' section = string(line) @@ -40,15 +38,25 @@ function load_mol2(fname::AbstractString, T = Float32) has_velocity = false has_force = false frame_id = 1 + properties_dict = Dict{String, Any}() + properties_dict["Charge"] = parse(T, line_elements[9]) new_atom = (number = number, name = name, element = element, atomtype = atomtype, r = r, - v = v, F = F, has_velocity = has_velocity, has_force = has_force, frame_id = frame_id) + v = v, F = F, has_velocity = has_velocity, has_force = has_force, frame_id = frame_id, + properties = properties_dict) push!(new_mol.atoms, new_atom) elseif section == "@BOND" section_line += 1 line_elements = split(line) + order_ = BondOrderType(mol2_get_BondOrder(line_elements[4])) + properties_dict = Dict{String, Any}() + if order_ == BondOrder.Unknown && line_elements[4] == "ar" || + order_ == BondOrder.Single && line_elements[4] == "am" + properties_dict["TRIPOS_tag"] = line_elements[4] + end new_bond = (a1 = parse(Int64, line_elements[2]), a2 = parse(Int64, line_elements[3]), - order = BondOrderType(mol2_get_BondOrder(line_elements[4]))) + order = order_, + properties = properties_dict) push!(new_mol.bonds, new_bond) end ### TODO: import information from @SUBSTRUCTURE if given, change Molecule into PDBMolecule @@ -222,10 +230,15 @@ end function mol2_get_BondOrder(substring::AbstractString) if isnumeric(substring[1]) - return Int(DefBond(parse(Int64, substring))) + return Int(BondShortOrderType(parse(Int64, substring))) + elseif isdefined(BondShortOrder, Symbol(substring)) + return Int(getproperty(BondShortOrder, Symbol(substring))) + elseif substring == "am" + return Int(BondOrder.Single) else - return Int(parse(DefBonds, substring)) + return Int(BondOrder.Unknown) end + return Int(BondOrder.Unknown) end diff --git a/test/test_fileformats.jl b/test/test_fileformats.jl index 70553329..faae27a4 100644 --- a/test/test_fileformats.jl +++ b/test/test_fileformats.jl @@ -58,16 +58,22 @@ end @test mol.name == "data/sustiva_openbabel.mol2" @test count_atoms(mol) == 21 + @test mol.atoms.name[21] == "C14" + @test mol.bonds.properties[2]["TRIPOS_tag"] == "am" @test count_bonds(mol) == 23 + @test mol.bonds.order[2] == BondOrder.Single + @test mol.bonds.properties[2]["TRIPOS_tag"] == "am" + @test mol.bonds.order[12] == BondOrder.Unknown + @test mol.bonds.properties[12]["TRIPOS_tag"] == "ar" end @testset "mol2_export" begin export_mol2(load_pubchem_json("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.json"), "data/") - @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139_balljl_export.mol2")[1] == "@MOLECULE" - @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139_balljl_export.mol2")[8] == "@ATOM" - @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139_balljl_export.mol2")[39] == "@BOND" + @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.mol2")[1] == "@MOLECULE" + @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.mol2")[8] == "@ATOM" + @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.mol2")[39] == "@BOND" - rm("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139_balljl_export.mol2") + rm("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.mol2") end \ No newline at end of file From cc406d54ad091c51da6d303c5eb7da418b3a0298 Mon Sep 17 00:00:00 2001 From: shuettel7 Date: Wed, 16 Nov 2022 10:43:54 +0100 Subject: [PATCH 06/15] intermittent commit --- src/fileformats/mol2.jl | 45 +++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl index 0020b876..c4c1353e 100644 --- a/src/fileformats/mol2.jl +++ b/src/fileformats/mol2.jl @@ -8,7 +8,7 @@ function load_mol2(fname::AbstractString, T = Float32) println("Please make sure, you are loading a mol2 file!\n(file ending should be mol2)") return end - new_mol = Molecule(fname) + new_mol = PDBMolecule(fname) section = "" section_line = 0 @@ -28,21 +28,16 @@ function load_mol2(fname::AbstractString, T = Float32) elseif section == "@ATOM" section_line += 1 line_elements = split(line) - number = parse(Int64, line_elements[1]) - name = line_elements[2] - element = parse(Elements, mol2_get_element(name)) - atomtype = line_elements[6] - r = Vector3{T}(parse(T, line_elements[3]), parse(T, line_elements[4]), parse(T, line_elements[5])) - v = Vector3{T}(0.0, 0.0, 0.0) - F = Vector3{T}(0.0, 0.0, 0.0) - has_velocity = false - has_force = false - frame_id = 1 - properties_dict = Dict{String, Any}() - properties_dict["Charge"] = parse(T, line_elements[9]) - new_atom = (number = number, name = name, element = element, atomtype = atomtype, r = r, - v = v, F = F, has_velocity = has_velocity, has_force = has_force, frame_id = frame_id, - properties = properties_dict) + new_atom = (number = parse(Int64, line_elements[1]), + name = line_elements[2], + element = parse(Elements, mol2_get_element(line_elements[2])), + atomtype = line_elements[6], + r = Vector3{T}(parse(T, line_elements[3]), parse(T, line_elements[4]), parse(T, line_elements[5])), + v = Vector3{T}(0.0, 0.0, 0.0), F = Vector3{T}(0.0, 0.0, 0.0), + has_velocity = false, has_force = false, frame_id = 1, + properties = Dict{String, Any}("Charge" => parse(T, line_elements[9])), + residue_id = parse(Int64,line_elements[7]), + residue_name = line_elements[8], chain = "") push!(new_mol.atoms, new_atom) elseif section == "@BOND" section_line += 1 @@ -58,8 +53,24 @@ function load_mol2(fname::AbstractString, T = Float32) order = order_, properties = properties_dict) push!(new_mol.bonds, new_bond) + elseif section == "@SUBSTRUCTURE" + section_line += 1 + line_elements = split(line) + chain_name = "" + if !isdefined(new_mol.chains, :name) + chain_name = "Test1" + elseif isdefined(new_mol.chains, :name) && + new_mol.chains[1].fragments.name[lastindex(new_mol.chains[1].fragments.number)] == line_elements[2] + chain_name = "Test2" + else isdefined(new_mol.chains, :name) && + new_mol.chains[1].fragments.name[lastindex(new_mol.chains[1].fragments.number)] != line_elements[2] + chain_name = "Test3" + end + new_chain = PDBChain(chain_name, DataFrame(number = Vector{Int64}([parse(Int64, line_elements[1])]), + name = Vector{String}([string(line_elements[2])]), + chain_id = Vector{String}([string(line_elements[3])]))) + push!(new_mol.chains, new_chain) end - ### TODO: import information from @SUBSTRUCTURE if given, change Molecule into PDBMolecule end return new_mol end From c934ad6c56bf6b76f35c19145fed3d9a0cf27759 Mon Sep 17 00:00:00 2001 From: shuettel7 Date: Wed, 16 Nov 2022 15:16:13 +0100 Subject: [PATCH 07/15] Last work on substructure, probably not needed for ligands / json files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Hüttel --- src/fileformats/mol2.jl | 72 +++++++++---------- ...mol2 => Import_test_sustiva_modified.mol2} | 0 test/test_fileformats.jl | 4 +- 3 files changed, 38 insertions(+), 38 deletions(-) rename test/data/{sustiva_openbabel.mol2 => Import_test_sustiva_modified.mol2} (100%) diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl index c4c1353e..a25160c6 100644 --- a/src/fileformats/mol2.jl +++ b/src/fileformats/mol2.jl @@ -56,20 +56,18 @@ function load_mol2(fname::AbstractString, T = Float32) elseif section == "@SUBSTRUCTURE" section_line += 1 line_elements = split(line) - chain_name = "" - if !isdefined(new_mol.chains, :name) - chain_name = "Test1" - elseif isdefined(new_mol.chains, :name) && - new_mol.chains[1].fragments.name[lastindex(new_mol.chains[1].fragments.number)] == line_elements[2] - chain_name = "Test2" - else isdefined(new_mol.chains, :name) && - new_mol.chains[1].fragments.name[lastindex(new_mol.chains[1].fragments.number)] != line_elements[2] - chain_name = "Test3" - end - new_chain = PDBChain(chain_name, DataFrame(number = Vector{Int64}([parse(Int64, line_elements[1])]), + chain_name = string(line_elements[3]) + if isempty(new_mol.chains) || (!isempty(new_mol.chains) && new_mol.chains[lastindex(new_mol.chains)].name != chain_name) + new_chain = PDBChain(chain_name, DataFrame(number = Vector{Int64}([parse(Int64, line_elements[1])]), name = Vector{String}([string(line_elements[2])]), chain_id = Vector{String}([string(line_elements[3])]))) - push!(new_mol.chains, new_chain) + push!(new_mol.chains, new_chain) + elseif !isempty(new_mol.chains) && new_mol.chains[lastindex(new_mol.chains)].name == chain_name + new_fragment = (number = parse(Int64, line_elements[1]), + name = string(line_elements[2]), + chain_id = string(line_elements[3])) + push!(new_mol.chains[lastindex(new_mol.chains)].fragments, new_fragment) + end end end return new_mol @@ -163,30 +161,32 @@ function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) ### Substructure section if typeof(mol) == PDBMolecule{Float32} && !isempty(mol.chains[1].fragments) write(export_file, "@SUBSTRUCTURE\n") - for i = (1:nrow(mol.chains[1].fragments)) - subst_id = string(build_flush_right_string(i, 6), " ") - subst_name = build_flush_left_string(mol.chains[1].fragments.name[i], 6) - df_for_root = filter(:residue_name => n -> n == mol.chains[1].fragments.name[i], mol.atoms) - df_for_root1 = filter(:residue_id => m -> m == mol.chains[1].fragments.number[i], df_for_root) - root_atom = string(build_flush_right_string(-1, 7), " ") - if !isempty(df_for_root1) - root_atom = string(build_flush_right_string(df_for_root1.number[1], 7), " ") - end - subst_type = build_flush_left_string("TEMP", 7) - # other Options for subst_type should be. RESIDUE, PERM, DOMAIN, GROUP - dict_type = string(" ", build_flush_left_string(0, 4)) # the type of dictionary associated with the substructure. - chain_string = "" # the chain to which the substructure belongs (ð 4 chars). - sub_type = "" # the subtype of the chain - inter_bonds = "" # the number of inter substructure bonds - status_string = "" - # status_string are internal SYBYL status bits never set by user - # Valid bit values: LEAF, ROOT, TYPECOL, DICT, BACKWARD and BLOCK - # are possible according to Tripos mol2 specification - comment_string = "" # the comment for the substructure - substructure_section_line = string(subst_id, subst_name, root_atom, subst_type, - dict_type, chain_string, sub_type, inter_bonds, - status_string, comment_string, "\n") - write(export_file, substructure_section_line) + for j = (1:lastindex(mol.chains)) + for i = (1:nrow(mol.chains[j].fragments)) + subst_id = string(build_flush_right_string(i, 6), " ") + subst_name = build_flush_left_string(mol.chains[j].fragments.name[i], 6) + df_for_root = filter(:residue_name => n -> n == mol.chains[j].fragments.name[i], mol.atoms) + df_for_root1 = filter(:residue_id => m -> m == mol.chains[j].fragments.number[i], df_for_root) + root_atom = string(build_flush_right_string(-1, 7), " ") + if !isempty(df_for_root1) + root_atom = string(build_flush_right_string(df_for_root1.number[1], 7), " ") + end + subst_type = build_flush_left_string("TEMP", 7) + # other Options for subst_type should be. RESIDUE, PERM, DOMAIN, GROUP + dict_type = string(" ", build_flush_left_string(0, 4)) # the type of dictionary associated with the substructure. + chain_string = "" # the chain to which the substructure belongs (ð 4 chars). + sub_type = "" # the subtype of the chain + inter_bonds = "" # the number of inter substructure bonds + status_string = "" + # status_string are internal SYBYL status bits never set by user + # Valid bit values: LEAF, ROOT, TYPECOL, DICT, BACKWARD and BLOCK + # are possible according to Tripos mol2 specification + comment_string = "" # the comment for the substructure + substructure_section_line = string(subst_id, subst_name, root_atom, subst_type, + dict_type, chain_string, sub_type, inter_bonds, + status_string, comment_string, "\n") + write(export_file, substructure_section_line) + end end end diff --git a/test/data/sustiva_openbabel.mol2 b/test/data/Import_test_sustiva_modified.mol2 similarity index 100% rename from test/data/sustiva_openbabel.mol2 rename to test/data/Import_test_sustiva_modified.mol2 diff --git a/test/test_fileformats.jl b/test/test_fileformats.jl index faae27a4..d03a565f 100644 --- a/test/test_fileformats.jl +++ b/test/test_fileformats.jl @@ -53,9 +53,9 @@ end @testset "mol2_import" begin - mol = load_mol2("data/sustiva_openbabel.mol2") + mol = load_mol2("data/Import_test_sustiva_modified.mol2") - @test mol.name == "data/sustiva_openbabel.mol2" + @test mol.name == "data/Import_test_sustiva_modified.mol2" @test count_atoms(mol) == 21 @test mol.atoms.name[21] == "C14" From ecba25f3337b429260f96326c799d190c6e8c6ae Mon Sep 17 00:00:00 2001 From: shuettel7 Date: Tue, 22 Nov 2022 09:04:38 +0100 Subject: [PATCH 08/15] change import to only small files, no substructures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Hüttel --- src/fileformats/mol2.jl | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl index a25160c6..4c728aad 100644 --- a/src/fileformats/mol2.jl +++ b/src/fileformats/mol2.jl @@ -8,7 +8,7 @@ function load_mol2(fname::AbstractString, T = Float32) println("Please make sure, you are loading a mol2 file!\n(file ending should be mol2)") return end - new_mol = PDBMolecule(fname) + new_mol = Molecule(fname) section = "" section_line = 0 @@ -35,9 +35,7 @@ function load_mol2(fname::AbstractString, T = Float32) r = Vector3{T}(parse(T, line_elements[3]), parse(T, line_elements[4]), parse(T, line_elements[5])), v = Vector3{T}(0.0, 0.0, 0.0), F = Vector3{T}(0.0, 0.0, 0.0), has_velocity = false, has_force = false, frame_id = 1, - properties = Dict{String, Any}("Charge" => parse(T, line_elements[9])), - residue_id = parse(Int64,line_elements[7]), - residue_name = line_elements[8], chain = "") + properties = Dict{String, Any}("Charge" => parse(T, line_elements[9]))) push!(new_mol.atoms, new_atom) elseif section == "@BOND" section_line += 1 @@ -53,21 +51,6 @@ function load_mol2(fname::AbstractString, T = Float32) order = order_, properties = properties_dict) push!(new_mol.bonds, new_bond) - elseif section == "@SUBSTRUCTURE" - section_line += 1 - line_elements = split(line) - chain_name = string(line_elements[3]) - if isempty(new_mol.chains) || (!isempty(new_mol.chains) && new_mol.chains[lastindex(new_mol.chains)].name != chain_name) - new_chain = PDBChain(chain_name, DataFrame(number = Vector{Int64}([parse(Int64, line_elements[1])]), - name = Vector{String}([string(line_elements[2])]), - chain_id = Vector{String}([string(line_elements[3])]))) - push!(new_mol.chains, new_chain) - elseif !isempty(new_mol.chains) && new_mol.chains[lastindex(new_mol.chains)].name == chain_name - new_fragment = (number = parse(Int64, line_elements[1]), - name = string(line_elements[2]), - chain_id = string(line_elements[3])) - push!(new_mol.chains[lastindex(new_mol.chains)].fragments, new_fragment) - end end end return new_mol @@ -94,11 +77,17 @@ function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) molecule_section_line2 = string(num_atoms, num_bonds, num_subst, num_feat, num_sets, "\n") mol_type = "SMALL" # BIOPOLYMER, PROTEIN, NUCLEIC_ACID, SACCHARIDE possible according to Tripos mol2 specification pdf + if haskey(mol.properties, "Type") + mol_type = mol.properties["Type"] + end molecule_section_line3 = string(mol_type, "\n") charge_type = "NO_CHARGES" # DEL_RE, GASTEIGER, GAST_HUCK, HUCKEL, PULLMAN, # GAUSS80_CHARGES, AMPAC_CHARGES, MULLIKEN_CHARGES, DICT_ CHARGES, MMFF94_CHARGES, USER_CHARGES # possible according to Tripos mol2 specification + if haskey(mol.properties, "Charge_Type") + mol_type = mol.properties["Charge_Type"] + end molecule_section_line4 = string(charge_type, "\n") status_bits = "\n" @@ -133,7 +122,10 @@ function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) subst_name = build_flush_left_string(mol.atoms.residue_name[i], 6) end end - charge = build_Float32_string(0.0, 12, 6) + charge = build_Float32_string(0.0, 10, 4) + if haskey(mol.atoms.properties[i], "Charge") + charge = build_Float32_string(mol.atoms.properties[i]["Charge"], 10, 4) + end # status_bits never set by user, DSPMOD, TYPECOL, CAP, BACKBONE, DICT, ESSENTIAL, # WATER and DIRECT are possible according to Tripos mol2 specification atom_section_line = string(atom_id, atom_name, x_coordinate_string, @@ -151,6 +143,9 @@ function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) origin_atom_id = build_flush_right_string(mol.bonds.a1[i], 6) target_atom_id = build_flush_right_string(mol.bonds.a2[i], 6) bond_type = string(" ", build_flush_left_string(Int(mol.bonds.order[i]), 4)) + if haskey(mol.bonds.properties[i], "TRIPOS_tag") + bond_type = string(" ", build_flush_left_string(mol.bonds.properties[i]["TRIPOS_tag"], 4)) + end # status_bits never set by user, TYPECOL, GROUP, CAP, BACKBONE, DICT and INTERRES # are possible according to Tripos mol2 specification bond_section_line = string(bond_id, origin_atom_id, target_atom_id, bond_type, "\n") @@ -249,7 +244,6 @@ function mol2_get_BondOrder(substring::AbstractString) else return Int(BondOrder.Unknown) end - return Int(BondOrder.Unknown) end From 7a2f5445f439b78071d26b4cd9f4862b96e5e5e7 Mon Sep 17 00:00:00 2001 From: shuettel7 Date: Tue, 22 Nov 2022 14:04:49 +0100 Subject: [PATCH 09/15] removed Substructure from export MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Hüttel --- src/fileformats/mol2.jl | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl index 4c728aad..b672ec98 100644 --- a/src/fileformats/mol2.jl +++ b/src/fileformats/mol2.jl @@ -4,6 +4,7 @@ export load_mol2, export_mol2 function load_mol2(fname::AbstractString, T = Float32) + # For validation of small molecules only: no SUBSTRUCTURES import implemented if fname[lastindex(fname)-4:lastindex(fname)] != ".mol2" println("Please make sure, you are loading a mol2 file!\n(file ending should be mol2)") return @@ -34,8 +35,8 @@ function load_mol2(fname::AbstractString, T = Float32) atomtype = line_elements[6], r = Vector3{T}(parse(T, line_elements[3]), parse(T, line_elements[4]), parse(T, line_elements[5])), v = Vector3{T}(0.0, 0.0, 0.0), F = Vector3{T}(0.0, 0.0, 0.0), - has_velocity = false, has_force = false, frame_id = 1, - properties = Dict{String, Any}("Charge" => parse(T, line_elements[9]))) + has_velocity = false, has_force = false, frame_id = parse(Int64, line_elements[7]), + properties = Dict{String, Any}("Charge" => parse(T, line_elements[9]), "Chain" => string(line_elements[8]))) push!(new_mol.atoms, new_atom) elseif section == "@BOND" section_line += 1 @@ -58,6 +59,7 @@ end function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) + # For validation of small molecules only: no SUBSTRUCTURES export implemented mol_name = prepare_mol_name(mol.name) export_file = open(string(filelocation, mol_name, ".mol2") , "w") @@ -153,38 +155,6 @@ function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) end end - ### Substructure section - if typeof(mol) == PDBMolecule{Float32} && !isempty(mol.chains[1].fragments) - write(export_file, "@SUBSTRUCTURE\n") - for j = (1:lastindex(mol.chains)) - for i = (1:nrow(mol.chains[j].fragments)) - subst_id = string(build_flush_right_string(i, 6), " ") - subst_name = build_flush_left_string(mol.chains[j].fragments.name[i], 6) - df_for_root = filter(:residue_name => n -> n == mol.chains[j].fragments.name[i], mol.atoms) - df_for_root1 = filter(:residue_id => m -> m == mol.chains[j].fragments.number[i], df_for_root) - root_atom = string(build_flush_right_string(-1, 7), " ") - if !isempty(df_for_root1) - root_atom = string(build_flush_right_string(df_for_root1.number[1], 7), " ") - end - subst_type = build_flush_left_string("TEMP", 7) - # other Options for subst_type should be. RESIDUE, PERM, DOMAIN, GROUP - dict_type = string(" ", build_flush_left_string(0, 4)) # the type of dictionary associated with the substructure. - chain_string = "" # the chain to which the substructure belongs (ð 4 chars). - sub_type = "" # the subtype of the chain - inter_bonds = "" # the number of inter substructure bonds - status_string = "" - # status_string are internal SYBYL status bits never set by user - # Valid bit values: LEAF, ROOT, TYPECOL, DICT, BACKWARD and BLOCK - # are possible according to Tripos mol2 specification - comment_string = "" # the comment for the substructure - substructure_section_line = string(subst_id, subst_name, root_atom, subst_type, - dict_type, chain_string, sub_type, inter_bonds, - status_string, comment_string, "\n") - write(export_file, substructure_section_line) - end - end - end - close(export_file) end From 3779053d6b39aae7cc033112630f2a30fc35e3a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20H=C3=BCttel?= Date: Thu, 5 Jan 2023 20:12:30 +0100 Subject: [PATCH 10/15] mol2 name adapted with basename method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Hüttel --- src/fileformats/mol2.jl | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl index b672ec98..96f3e15b 100644 --- a/src/fileformats/mol2.jl +++ b/src/fileformats/mol2.jl @@ -60,7 +60,7 @@ end function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) # For validation of small molecules only: no SUBSTRUCTURES export implemented - mol_name = prepare_mol_name(mol.name) + mol_name = basename(mol.name) export_file = open(string(filelocation, mol_name, ".mol2") , "w") ### Molecule section @@ -171,21 +171,6 @@ function build_Float32_string(input::AbstractFloat, length::Int, decimals::Int) end -function prepare_mol_name(molname::AbstractString) - dot_index = 0 - slash_index = 0 - for i = (lastindex(molname):-1:1) - if molname[i] == '.' - dot_index = i-1 - elseif molname[i] == '/' || molname[i] == '\\' - slash_index = i+1 - return molname[slash_index:dot_index] - end - end - return molname[1:dot_index] -end - - function build_flush_right_string(input::Any, length::Int) col_string = string(input) while lastindex(col_string) < length From 77fa9817ae6d74dd810bc8071ccb9c49039bcca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20H=C3=BCttel?= Date: Mon, 9 Jan 2023 16:12:55 +0100 Subject: [PATCH 11/15] export_mol2 update to naming with basename MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Hüttel --- src/fileformats/mol2.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl index 96f3e15b..6a866b87 100644 --- a/src/fileformats/mol2.jl +++ b/src/fileformats/mol2.jl @@ -60,7 +60,7 @@ end function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) # For validation of small molecules only: no SUBSTRUCTURES export implemented - mol_name = basename(mol.name) + mol_name = mol.name[end-4:end] == ".mol2" ? basename(mol.name)[1:end-5] : basename(mol.name) export_file = open(string(filelocation, mol_name, ".mol2") , "w") ### Molecule section From aab50f89db04231b6e42d70046a0ad37f053a4b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20H=C3=BCttel?= Date: Tue, 10 Jan 2023 20:22:46 +0100 Subject: [PATCH 12/15] export_mol2 updated naming and Charge property MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Hüttel --- src/fileformats/mol2.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl index 6a866b87..acf2386c 100644 --- a/src/fileformats/mol2.jl +++ b/src/fileformats/mol2.jl @@ -60,7 +60,7 @@ end function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) # For validation of small molecules only: no SUBSTRUCTURES export implemented - mol_name = mol.name[end-4:end] == ".mol2" ? basename(mol.name)[1:end-5] : basename(mol.name) + mol_name = (mol.name[end-4:end] == ".mol2" || mol.name[end-4:end] == ".json") ? basename(mol.name)[1:end-5] : basename(mol.name) export_file = open(string(filelocation, mol_name, ".mol2") , "w") ### Molecule section @@ -126,7 +126,7 @@ function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) end charge = build_Float32_string(0.0, 10, 4) if haskey(mol.atoms.properties[i], "Charge") - charge = build_Float32_string(mol.atoms.properties[i]["Charge"], 10, 4) + charge = build_Float32_string(convert(Float32, mol.atoms.properties[i]["Charge"]), 10, 4) end # status_bits never set by user, DSPMOD, TYPECOL, CAP, BACKBONE, DICT, ESSENTIAL, # WATER and DIRECT are possible according to Tripos mol2 specification From 7e5811e2b75ad535d02d69a6ace6157ad557ee34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20H=C3=BCttel?= Date: Thu, 12 Jan 2023 16:07:59 +0100 Subject: [PATCH 13/15] export_mol2, naming adapted for more flexibility with file formats MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Hüttel --- src/fileformats/mol2.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl index acf2386c..eb95e549 100644 --- a/src/fileformats/mol2.jl +++ b/src/fileformats/mol2.jl @@ -60,7 +60,7 @@ end function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) # For validation of small molecules only: no SUBSTRUCTURES export implemented - mol_name = (mol.name[end-4:end] == ".mol2" || mol.name[end-4:end] == ".json") ? basename(mol.name)[1:end-5] : basename(mol.name) + mol_name = (!isnothing(findlast('.', mol.name)) && in([lastindex(mol.name)-5:lastindex(mol.name);]).(findlast('.', mol.name))) ? basename(mol.name[1:findlast('.', mol.name)-1]) : basename(mol.name) export_file = open(string(filelocation, mol_name, ".mol2") , "w") ### Molecule section From fcd8d023f0cbd7652a3dbc1371be3d0339f5134e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20H=C3=BCttel?= Date: Fri, 27 Jan 2023 11:41:33 +0100 Subject: [PATCH 14/15] mol2, pubchem_json, mol2_export test update from validation branch --- src/fileformats/mol2.jl | 26 ++++++++++++-------------- src/fileformats/pubchem_json.jl | 30 ++++++++++++++++++++++++++++-- test/test_fileformats.jl | 17 +++++++++-------- 3 files changed, 49 insertions(+), 24 deletions(-) diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl index eb95e549..8bfa5977 100644 --- a/src/fileformats/mol2.jl +++ b/src/fileformats/mol2.jl @@ -1,4 +1,4 @@ -using BiochemicalAlgorithms: Molecule, Atom, BondOrder, BondOrderType, Bond, Elements, Element, Vector3 +using BiochemicalAlgorithms export load_mol2, export_mol2 @@ -36,16 +36,17 @@ function load_mol2(fname::AbstractString, T = Float32) r = Vector3{T}(parse(T, line_elements[3]), parse(T, line_elements[4]), parse(T, line_elements[5])), v = Vector3{T}(0.0, 0.0, 0.0), F = Vector3{T}(0.0, 0.0, 0.0), has_velocity = false, has_force = false, frame_id = parse(Int64, line_elements[7]), - properties = Dict{String, Any}("Charge" => parse(T, line_elements[9]), "Chain" => string(line_elements[8]))) + properties = Dict{String, Union{T, String}}("Charge" => parse(T, line_elements[9]), "Chain" => string(line_elements[8]))) push!(new_mol.atoms, new_atom) elseif section == "@BOND" section_line += 1 line_elements = split(line) order_ = BondOrderType(mol2_get_BondOrder(line_elements[4])) - properties_dict = Dict{String, Any}() + properties_dict = Dict{String, Union{T, String}}() if order_ == BondOrder.Unknown && line_elements[4] == "ar" || order_ == BondOrder.Single && line_elements[4] == "am" - properties_dict["TRIPOS_tag"] = line_elements[4] + println(line_elements[4]) + properties_dict["TRIPOS_tag"] = string(line_elements[4]) end new_bond = (a1 = parse(Int64, line_elements[2]), a2 = parse(Int64, line_elements[3]), @@ -58,9 +59,9 @@ function load_mol2(fname::AbstractString, T = Float32) end -function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) +function export_mol2(mol::Molecule, filelocation::String) # For validation of small molecules only: no SUBSTRUCTURES export implemented - mol_name = (!isnothing(findlast('.', mol.name)) && in([lastindex(mol.name)-5:lastindex(mol.name);]).(findlast('.', mol.name))) ? basename(mol.name[1:findlast('.', mol.name)-1]) : basename(mol.name) + mol_name = (!isnothing(findlast('.', mol.name)) && in(findlast('.', mol.name), [lastindex(mol.name)-5:lastindex(mol.name);])) ? basename(mol.name[1:findlast('.', mol.name)-1]) : basename(mol.name) export_file = open(string(filelocation, mol_name, ".mol2") , "w") ### Molecule section @@ -145,9 +146,6 @@ function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) origin_atom_id = build_flush_right_string(mol.bonds.a1[i], 6) target_atom_id = build_flush_right_string(mol.bonds.a2[i], 6) bond_type = string(" ", build_flush_left_string(Int(mol.bonds.order[i]), 4)) - if haskey(mol.bonds.properties[i], "TRIPOS_tag") - bond_type = string(" ", build_flush_left_string(mol.bonds.properties[i]["TRIPOS_tag"], 4)) - end # status_bits never set by user, TYPECOL, GROUP, CAP, BACKBONE, DICT and INTERRES # are possible according to Tripos mol2 specification bond_section_line = string(bond_id, origin_atom_id, target_atom_id, bond_type, "\n") @@ -159,7 +157,7 @@ function export_mol2(mol::AbstractMolecule, filelocation::AbstractString) end -function build_Float32_string(input::AbstractFloat, length::Int, decimals::Int) +function build_Float32_string(input::AbstractFloat, length::Int64, decimals::Int64) col_string = string(input) while (lastindex(col_string)-findfirst('.', col_string)) < decimals col_string = string(col_string, "0") @@ -171,7 +169,7 @@ function build_Float32_string(input::AbstractFloat, length::Int, decimals::Int) end -function build_flush_right_string(input::Any, length::Int) +function build_flush_right_string(input::Any, length::Int64) col_string = string(input) while lastindex(col_string) < length col_string = string(" ", col_string) @@ -180,7 +178,7 @@ function build_flush_right_string(input::Any, length::Int) end -function build_flush_left_string(input::Any, length::Int) +function build_flush_left_string(input::Any, length::Int64) col_string = string(input) while lastindex(col_string) < length col_string = string(col_string, " ") @@ -209,9 +207,9 @@ function mol2_get_element(name::AbstractString) if lastindex(name) >= 2 && !isnumeric(name[2]) two_letters = string(name[1], lowercase(name[2])) end - if in(common_elements).(two_letters) + if in(two_letters, common_elements) element = two_letters - elseif in(common_elements).(first_letter) + elseif in(first_letter, common_elements) element = first_letter end return element diff --git a/src/fileformats/pubchem_json.jl b/src/fileformats/pubchem_json.jl index c3d42f65..8f93ea11 100644 --- a/src/fileformats/pubchem_json.jl +++ b/src/fileformats/pubchem_json.jl @@ -529,7 +529,9 @@ function parse_atoms!(mol::Molecule, compound::PCCompound, T=Float32) has_velocity = false, has_force = false, frame_id = j, - properties = Properties() + properties = (!isnothing(compound.atoms.charge) && isInPcAtomAid(i, compound.atoms.charge)) + ? Properties("Charge" => getPcAtomCharge(i, compound.atoms.charge)) + : Properties() ) push!(mol, atom) @@ -598,7 +600,11 @@ function load_pubchem_json(fname::String, T=Float32) for compound in pb.PC_Compounds # for now, use the file name as the name for the molecule - mol = Molecule(fname * "_" * string(compound.id.id.cid)) + mol = Molecule(contains(fname, string(compound.id.id.cid)) + ? fname + : (!isnothing(findlast('.', fname)) + ? string(fname[1:findlast('.', fname)-1], "_CID_", string(compound.id.id.cid), fname[findlast('.', fname):lastindex(fname)]) + : string(fname, "_CID_", string(compound.id.id.cid)))) parse_atoms!(mol, compound, T) parse_bonds!(mol, compound, T) parse_props!(mol, compound) @@ -608,3 +614,23 @@ function load_pubchem_json(fname::String, T=Float32) molecules end + + +function isInPcAtomAid(atmNum::Int, PcAtomInt_vec::Vector{PCAtomInt}) + for pcAtomInt in PcAtomInt_vec + if atmNum == pcAtomInt.aid + return true + end + end + return false +end + + +function getPcAtomCharge(atmNum::Int, PcAtomInt_vec::Vector{PCAtomInt}) + for pcAtomInt in PcAtomInt_vec + if atmNum == pcAtomInt.aid + return pcAtomInt.value + end + end + return 0 +end \ No newline at end of file diff --git a/test/test_fileformats.jl b/test/test_fileformats.jl index d03a565f..3c0a0789 100644 --- a/test/test_fileformats.jl +++ b/test/test_fileformats.jl @@ -24,7 +24,7 @@ end mol = mols[1] @test mol isa Molecule - @test mol.name == "data/aspirin_pug.json_2244" + @test mol.name == "data/aspirin_pug_CID_2244.json" @test length(mol.properties) == 3 @test count_atoms(mol) == 21 @@ -68,12 +68,13 @@ end end @testset "mol2_export" begin - export_mol2(load_pubchem_json("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.json"), "data/") + for mol in load_pubchem_json("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.json") + export_mol2(mol, "data/") - @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.mol2")[1] == "@MOLECULE" - @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.mol2")[8] == "@ATOM" - @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.mol2")[39] == "@BOND" + @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.mol2")[1] == "@MOLECULE" + @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.mol2")[8] == "@ATOM" + @test readlines("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.mol2")[39] == "@BOND" - rm("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.mol2") - -end \ No newline at end of file + rm("data/Export_test_molecule_Sustiva_Efavirenz_Conformer3D_CID_64139.mol2") + end +end From 6c1c5e3e4dbd10aa3beabb7cfed69829194b0de8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20H=C3=BCttel?= Date: Fri, 27 Jan 2023 11:43:20 +0100 Subject: [PATCH 15/15] mol2 file cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Hüttel --- src/fileformats/mol2.jl | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/fileformats/mol2.jl b/src/fileformats/mol2.jl index 8bfa5977..482f2c96 100644 --- a/src/fileformats/mol2.jl +++ b/src/fileformats/mol2.jl @@ -1,4 +1,3 @@ -using BiochemicalAlgorithms export load_mol2, export_mol2 @@ -45,7 +44,6 @@ function load_mol2(fname::AbstractString, T = Float32) properties_dict = Dict{String, Union{T, String}}() if order_ == BondOrder.Unknown && line_elements[4] == "ar" || order_ == BondOrder.Single && line_elements[4] == "am" - println(line_elements[4]) properties_dict["TRIPOS_tag"] = string(line_elements[4]) end new_bond = (a1 = parse(Int64, line_elements[2]),