Merge commit 'c4c7b7113' into rc187-restraints
# Conflicts: # docs/RUGNUX_MODEL_AND_REFERENCE.md # image_analysis/structure_refinement/monomers/update_monomers.py
This commit is contained in:
commit
6451242f29
10 files changed
+1910
-16
No files matched your search
@@ -151,15 +151,19 @@ disk, and `$CLIBD` is never consulted): the 20 standard amino acids and MSE; the
|
||||
(H2U), N2-methyl- and N2,N2-dimethylguanosine (2MG, M2G), 7-methylguanosine (7MG) and ribothymidine (5MU), polymer
|
||||
residues joined by the same backbone link; ATP, ADP, AMP, GTP, GDP and GMP; the cofactors NAD⁺ (NAD), NADH (NAI),
|
||||
NADP⁺ (NAP), NADPH (NDP), FAD, FMN, heme (HEM), heme C (HEC), S-adenosylmethionine (SAM) and
|
||||
S-adenosylhomocysteine (SAH), and dioxygen (OXY); DMSO; the PEG fragments PEG, PGE, PG4 and 1PE; glycerol,
|
||||
S-adenosylhomocysteine (SAH), and dioxygen (OXY); N-acetyl-D-glucosamine, β and α (NAG, NDG), alone or as
|
||||
chitobiose/chitotriose; the photoreceptor chromophores retinal (RET), p-coumaric acid (HC4), the GFP-type CRO,
|
||||
GYS, CR2 and NRQ, and the bilins BLA, LBV and CYC; DMSO; the PEG fragments PEG, PGE, PG4 and 1PE; glycerol,
|
||||
ethylene glycol, MPD, acetate, sulfate and phosphate; water; and the ions Na, K, Mg, Ca, Mn, Fe²⁺, Fe³⁺, Co, Ni,
|
||||
Cu, Zn, Cd, Cl, Br and I - 84 compounds - with the library's links and modifications that apply to them (among
|
||||
Cu, Zn, Cd, Cl, Br and I - 95 compounds - with the library's links and modifications that apply to them (among
|
||||
them heme C's two thioethers to its cysteines, HEC-CYS1 and HEC-CYS2, and the covalent links of heme and FAD to
|
||||
the protein) and the energy types those compounds use.
|
||||
the protein, and the glycosidic links of the pyranoses and theirs to Asn, Ser and Thr) and the energy types those
|
||||
compounds use.
|
||||
|
||||
The model's topology is built from it by GEMMI (`prepare_topology`): the links between residues (the peptide
|
||||
and cis-peptide, the nucleic-acid backbone, disulfides, and the model's LINK records where the library
|
||||
describes them), the modifications those links imply, and per residue the bonds, angles, torsions, chiral
|
||||
describes them; a sugar atom within 2 Å of an atom a library link joins it to is linked even without a LINK
|
||||
record, so a glycan built without them keeps its glycosidic bonds), the modifications those links imply, and per residue the bonds, angles, torsions, chiral
|
||||
volumes and planes. Torsions are restrained where the dictionary gives them an esd, except the main-chain
|
||||
φ/ψ and the sugar puckers it lists as alternatives. The dictionary's **hydrogens** are added to every
|
||||
residue it describes (waters excepted), placed by GEMMI from the dictionary's geometry and moved with their
|
||||
@@ -664,9 +668,9 @@ other `REFINE_` key, `REFINE_R_FREE_START` and the `REFINE_SCORE_` terms include
|
||||
|
||||
What the refinement does not do yet - each a known gap, not a design choice:
|
||||
|
||||
- **Custom ligands and other monomer libraries.** Only the 84 compounds of §15.4 are restrained. Any other
|
||||
residue is held fixed (it stays in $F_\mathrm{calc}$, the mask and the repulsions); no restraints are
|
||||
generated for a new ligand, and neither a user's restraint CIF nor an external monomer library can be given.
|
||||
- **Restraints for a new ligand from its chemistry.** Beyond the 95 compounds of §15.4 a ligand is restrained only
|
||||
by a restraint CIF the user gives (`--restraints`; a PDB CCD entry only to its ideal coordinates' bonds, angles
|
||||
and planes); any other residue is held fixed (it stays in $F_\mathrm{calc}$, the mask and the repulsions).
|
||||
- **TLS restraints**: a TLS group's T and L are not held positive semi-definite (only every atom's total U is kept
|
||||
positive definite); the TLS groups are contiguous segments of one chain, never a domain made of several.
|
||||
- **Global NCS and NCS of B factors**: copies are restrained locally, on their interatomic distances (§15.5),
|
||||
|
||||
@@ -256,7 +256,7 @@ in the same way (see [Rugnux live mode](JFJOCH_BROKER.md#rugnux-live-mode)).
|
||||
The built-in dictionary is a subset of the CCP4 Monomer Library compiled into rugnux: the 20 standard amino
|
||||
acids and MSE, the DNA/RNA nucleotides and the common modified RNA nucleotides (PSU, 5MC, 1MA, OMG, OMC, OMU,
|
||||
H2U, 2MG, M2G, 7MG, 5MU), ATP/ADP/AMP/GTP/GDP/GMP, the cofactors NAD, NAI, NAP, NDP, FAD, FMN, HEM, HEC, SAM and
|
||||
SAH, dioxygen (OXY), the photoreceptor chromophores retinal (RET, with its Schiff base to a lysine), p-coumaric
|
||||
SAH, dioxygen (OXY), N-acetyl-D-glucosamine (NAG, NDG, with the glycosidic links), the photoreceptor chromophores retinal (RET, with its Schiff base to a lysine), p-coumaric
|
||||
acid (HC4; its thioester to the cysteine is not restrained), the GFP-type chromophores CRO, GYS, CR2 and NRQ and
|
||||
the bilins BLA, LBV and CYC (phycocyanobilin, with its thioether to a cysteine), DMSO, PEG fragments (PEG, PGE,
|
||||
PG4, 1PE), glycerol, ethylene glycol, sulfate, phosphate, acetate, MPD, water and common ions. Carbon monoxide
|
||||
|
||||
@@ -2619,11 +2619,11 @@ RefinementResult RefineOnce(const gemmi::Structure &placed, const std::vector<Me
|
||||
refinable.push_back(static_cast<int>(i));
|
||||
result.refined_atoms = static_cast<int>(refinable.size());
|
||||
logger.Info("Refinement: {} residues restrained, {} held fixed{}; {} bonds, {} metal bonds ({} links made, {} records "
|
||||
"beyond the inner shell left as contacts), {} "
|
||||
"beyond the inner shell left as contacts), {} sugar links made, {} "
|
||||
"angles, {} torsions, {} chiral volumes, {} planes",
|
||||
result.restrained_residues, topo.fixed_residues,
|
||||
topo.fixed_names.empty() ? std::string() : " (" + Joined(topo.fixed_names) + ")",
|
||||
topo.bonds, topo.metal_bonds.records.size(), topo.metal_links, topo.metal_links_refused, topo.angles, topo.torsions, topo.chirals, topo.planes);
|
||||
topo.bonds, topo.metal_bonds.records.size(), topo.metal_links, topo.metal_links_refused, topo.sugar_links, topo.angles, topo.torsions, topo.chirals, topo.planes);
|
||||
|
||||
if (ncs_p != nullptr) {
|
||||
result.ncs_groups = ncs.groups;
|
||||
|
||||
@@ -221,6 +221,48 @@ int AddMetalLinks(gemmi::Structure &st, gemmi::MonLib &monlib, int &refused) {
|
||||
return made;
|
||||
}
|
||||
|
||||
// A sugar bonded to its neighbour with no LINK record for it (a chitotriose built without them): a record made for
|
||||
// each atom of a pyranose within SUGAR_BOND_MAX of an atom of another residue that a link of the library joins it
|
||||
// to (the glycosidic links, the one to Asn, ...). Without it the bond would be restrained by nothing and repelled
|
||||
// as a contact. Pairs within one asymmetric unit only. Returns the number of records made.
|
||||
int AddSugarLinks(gemmi::Structure &st, const gemmi::MonLib &monlib) {
|
||||
constexpr double SUGAR_BOND_MAX = 2.0; // A; a C-O glycosidic bond is 1.44 A
|
||||
gemmi::Model &model = st.models.at(0);
|
||||
std::set<std::pair<const gemmi::Atom *, const gemmi::Atom *>> recorded;
|
||||
for (const gemmi::Connection &conn : st.connections) {
|
||||
const gemmi::CRA a = model.find_cra(conn.partner1, true), b = model.find_cra(conn.partner2, true);
|
||||
recorded.insert({a.atom, b.atom});
|
||||
recorded.insert({b.atom, a.atom});
|
||||
}
|
||||
int made = 0;
|
||||
for (gemmi::Chain &ch1 : model.chains)
|
||||
for (gemmi::Residue &r1 : ch1.residues) {
|
||||
const auto cc = monlib.monomers.find(r1.name);
|
||||
if (cc == monlib.monomers.end() || cc->second.group != gemmi::ChemComp::Group::Pyranose)
|
||||
continue;
|
||||
for (gemmi::Atom &a1 : r1.atoms)
|
||||
for (gemmi::Chain &ch2 : model.chains)
|
||||
for (gemmi::Residue &r2 : ch2.residues)
|
||||
for (gemmi::Atom &a2 : r2.atoms) {
|
||||
if (&r1 == &r2 || a1.is_hydrogen() || a2.is_hydrogen() || recorded.count({&a1, &a2}) ||
|
||||
a1.pos.dist(a2.pos) > SUGAR_BOND_MAX ||
|
||||
std::get<0>(monlib.match_link(r1, a1.name, a1.altloc, r2, a2.name, a2.altloc)) == nullptr)
|
||||
continue;
|
||||
gemmi::Connection c;
|
||||
c.name = "sugar" + std::to_string(++made);
|
||||
c.type = gemmi::Connection::Covale;
|
||||
c.asu = gemmi::Asu::Same;
|
||||
c.partner1 = gemmi::AtomAddress(ch1.name, r1.seqid, r1.name, a1.name, a1.altloc);
|
||||
c.partner2 = gemmi::AtomAddress(ch2.name, r2.seqid, r2.name, a2.name, a2.altloc);
|
||||
c.reported_distance = a1.pos.dist(a2.pos);
|
||||
st.connections.push_back(c);
|
||||
recorded.insert({&a1, &a2});
|
||||
recorded.insert({&a2, &a1});
|
||||
}
|
||||
}
|
||||
return made;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void RetypeAtom(RefinementTopology &topo, const gemmi::Residue &res, const gemmi::Atom &a, int i,
|
||||
@@ -504,12 +546,13 @@ RefinementTopology BuildRefinementTopology(gemmi::Structure &st, bool hydrogens,
|
||||
for (const gemmi::Connection &conn : st.connections)
|
||||
link_ids.push_back(conn.link_id);
|
||||
out.metal_links = AddMetalLinks(st, monlib, out.metal_links_refused);
|
||||
out.sugar_links = AddSugarLinks(st, monlib);
|
||||
gemmi::Logger quiet; // missing atoms and unknown residues are what the fixed residues report
|
||||
quiet.threshold = 0;
|
||||
out.topo = gemmi::prepare_topology(st, monlib, 0,
|
||||
hydrogens ? gemmi::HydrogenChange::ReAddButWater : gemmi::HydrogenChange::NoChange,
|
||||
/*reorder=*/false, quiet, /*ignore_unknown_links=*/true, /*use_cispeps=*/true);
|
||||
for (size_t i = 0; i < st.connections.size(); i++)
|
||||
for (size_t i = 0; i < link_ids.size(); i++)
|
||||
st.connections[i].link_id = link_ids[i];
|
||||
gemmi::Topo *topo = out.topo.get();
|
||||
|
||||
|
||||
@@ -103,6 +103,7 @@ struct RefinementTopology {
|
||||
int bonds = 0, angles = 0, torsions = 0, chirals = 0, planes = 0;
|
||||
int metal_links = 0; // metal-donor bonds made from the model's LINK records (AddMetalLinks)
|
||||
int metal_links_refused = 0; // LINK records at an outer-sphere distance, left as contacts
|
||||
int sugar_links = 0; // sugar bonds the model had no LINK record for (AddSugarLinks)
|
||||
// The atoms on special positions (FindSpecialPositions), placed exactly on them; per atom its entry, -1 none.
|
||||
std::vector<SpecialPosition> special;
|
||||
std::vector<int> special_index;
|
||||
|
||||
@@ -0,0 +1,261 @@
|
||||
# /home/mihaela/Downloads/acedrg243/NAG_unimodal.cif
|
||||
# modified by Privateer
|
||||
data_comp_list
|
||||
loop_
|
||||
_chem_comp.id
|
||||
_chem_comp.three_letter_code
|
||||
_chem_comp.name
|
||||
_chem_comp.group
|
||||
_chem_comp.number_atoms_all
|
||||
_chem_comp.number_atoms_nh
|
||||
_chem_comp.desc_level
|
||||
NAG NAG 'N-ACETYL-D-GLUCOSAMINE ' pyranose 30 15 .
|
||||
|
||||
data_comp_NAG
|
||||
loop_
|
||||
_chem_comp_atom.comp_id
|
||||
_chem_comp_atom.atom_id
|
||||
_chem_comp_atom.type_symbol
|
||||
_chem_comp_atom.type_energy
|
||||
_chem_comp_atom.charge
|
||||
_chem_comp_atom.x
|
||||
_chem_comp_atom.y
|
||||
_chem_comp_atom.z
|
||||
NAG C1 C CH1 0 7.444 28.102 26.638
|
||||
NAG C2 C CH1 0 6.937 29.190 27.588
|
||||
NAG C3 C CH1 0 7.568 29.017 28.968
|
||||
NAG C4 C CH1 0 7.383 27.593 29.481
|
||||
NAG C5 C CH1 0 7.918 26.601 28.449
|
||||
NAG C6 C CH2 0 7.696 25.154 28.833
|
||||
NAG C7 C C 0 6.278 31.392 26.637
|
||||
NAG C8 C CH3 0 6.775 32.729 26.170
|
||||
NAG N2 N NH1 0 7.202 30.526 27.086
|
||||
NAG O1 O OH1 0 6.767 28.201 25.423
|
||||
NAG O3 O OH1 0 6.996 29.956 29.868
|
||||
NAG O4 O OH1 0 8.089 27.436 30.710
|
||||
NAG O5 O O2 0 7.247 26.807 27.188
|
||||
NAG O6 O OH1 0 6.309 24.848 28.971
|
||||
NAG O7 O O 0 5.081 31.118 26.604
|
||||
NAG H1 H H 0 8.406 28.243 26.479
|
||||
NAG H2 H H 0 5.965 29.058 27.696
|
||||
NAG H3 H H 0 8.539 29.201 28.886
|
||||
NAG H4 H H 0 6.420 27.420 29.634
|
||||
NAG H5 H H 0 8.886 26.758 28.327
|
||||
NAG H61 H H 0 8.153 24.968 29.680
|
||||
NAG H62 H H 0 8.086 24.574 28.146
|
||||
NAG H81 H H 0 7.739 32.708 26.057
|
||||
NAG H82 H H 0 6.543 33.407 26.825
|
||||
NAG H83 H H 0 6.359 32.949 25.321
|
||||
NAG HN2 H H 0 8.038 30.787 27.080
|
||||
NAG HO1 H H 0 7.193 27.768 24.833
|
||||
NAG HO3 H H 0 7.458 29.959 30.570
|
||||
NAG HO4 H H 0 8.913 27.566 30.596
|
||||
NAG HO6 H H 0 5.920 24.953 28.225
|
||||
|
||||
loop_
|
||||
_chem_comp_bond.comp_id
|
||||
_chem_comp_bond.atom_id_1
|
||||
_chem_comp_bond.atom_id_2
|
||||
_chem_comp_bond.type
|
||||
_chem_comp_bond.aromatic
|
||||
_chem_comp_bond.value_dist_nucleus
|
||||
_chem_comp_bond.value_dist_nucleus_esd
|
||||
_chem_comp_bond.value_dist
|
||||
_chem_comp_bond.value_dist_esd
|
||||
NAG C1 C2 SINGLE n 1.530 0.0100 1.530 0.0100
|
||||
NAG C1 O1 SINGLE n 1.394 0.0100 1.394 0.0100
|
||||
NAG C1 O5 SINGLE n 1.419 0.0100 1.419 0.0100
|
||||
NAG C2 C3 SINGLE n 1.526 0.0102 1.526 0.0102
|
||||
NAG C2 N2 SINGLE n 1.448 0.0100 1.448 0.0100
|
||||
NAG C3 C4 SINGLE n 1.523 0.0100 1.523 0.0100
|
||||
NAG C3 O3 SINGLE n 1.421 0.0106 1.421 0.0106
|
||||
NAG C4 C5 SINGLE n 1.525 0.0100 1.525 0.0100
|
||||
NAG C4 O4 SINGLE n 1.425 0.0100 1.425 0.0100
|
||||
NAG C5 C6 SINGLE n 1.511 0.0142 1.511 0.0142
|
||||
NAG C5 O5 SINGLE n 1.441 0.0100 1.441 0.0100
|
||||
NAG C6 O6 SINGLE n 1.426 0.0200 1.426 0.0200
|
||||
NAG C7 C8 SINGLE n 1.498 0.0100 1.498 0.0100
|
||||
NAG C7 N2 SINGLE n 1.334 0.0119 1.334 0.0119
|
||||
NAG C7 O7 DOUBLE n 1.227 0.0100 1.227 0.0100
|
||||
NAG C1 H1 SINGLE n 1.089 0.0100 0.985 0.0100
|
||||
NAG C2 H2 SINGLE n 1.089 0.0100 0.987 0.0166
|
||||
NAG C3 H3 SINGLE n 1.089 0.0100 0.992 0.0104
|
||||
NAG C4 H4 SINGLE n 1.089 0.0100 0.991 0.0105
|
||||
NAG C5 H5 SINGLE n 1.089 0.0100 0.988 0.0182
|
||||
NAG C6 H61 SINGLE n 1.089 0.0100 0.980 0.0184
|
||||
NAG C6 H62 SINGLE n 1.089 0.0100 0.980 0.0184
|
||||
NAG C8 H81 SINGLE n 1.089 0.0100 0.971 0.0140
|
||||
NAG C8 H82 SINGLE n 1.089 0.0100 0.971 0.0140
|
||||
NAG C8 H83 SINGLE n 1.089 0.0100 0.971 0.0140
|
||||
NAG N2 HN2 SINGLE n 1.016 0.0100 0.876 0.0200
|
||||
NAG O1 HO1 SINGLE n 0.970 0.0120 0.846 0.0200
|
||||
NAG O3 HO3 SINGLE n 0.970 0.0120 0.841 0.0200
|
||||
NAG O4 HO4 SINGLE n 0.970 0.0120 0.841 0.0200
|
||||
NAG O6 HO6 SINGLE n 0.970 0.0120 0.848 0.0200
|
||||
|
||||
loop_
|
||||
_chem_comp_angle.comp_id
|
||||
_chem_comp_angle.atom_id_1
|
||||
_chem_comp_angle.atom_id_2
|
||||
_chem_comp_angle.atom_id_3
|
||||
_chem_comp_angle.value_angle
|
||||
_chem_comp_angle.value_angle_esd
|
||||
NAG C2 C1 O1 109.247 2.43
|
||||
NAG C2 C1 O5 111.350 3.00
|
||||
NAG C2 C1 H1 108.848 1.50
|
||||
NAG O1 C1 O5 109.600 2.81
|
||||
NAG O1 C1 H1 108.913 1.50
|
||||
NAG O5 C1 H1 109.272 1.61
|
||||
NAG C1 C2 C3 110.235 1.50
|
||||
NAG C1 C2 N2 111.780 3.00
|
||||
NAG C1 C2 H2 107.511 1.55
|
||||
NAG C3 C2 N2 110.454 2.38
|
||||
NAG C3 C2 H2 107.579 2.24
|
||||
NAG N2 C2 H2 107.121 2.62
|
||||
NAG C2 C3 C4 110.882 1.54
|
||||
NAG C2 C3 O3 109.400 2.63
|
||||
NAG C2 C3 H3 108.177 2.01
|
||||
NAG C4 C3 O3 110.984 1.55
|
||||
NAG C4 C3 H3 108.714 1.50
|
||||
NAG O3 C3 H3 108.954 1.50
|
||||
NAG C3 C4 C5 109.454 1.50
|
||||
NAG C3 C4 O4 109.301 2.14
|
||||
NAG C3 C4 H4 109.514 1.50
|
||||
NAG C5 C4 O4 109.072 2.07
|
||||
NAG C5 C4 H4 109.223 1.50
|
||||
NAG O4 C4 H4 109.194 1.50
|
||||
NAG C4 C5 C6 112.996 1.59
|
||||
NAG C4 C5 O5 109.140 1.86
|
||||
NAG C4 C5 H5 108.960 1.50
|
||||
NAG C6 C5 O5 106.879 1.50
|
||||
NAG C6 C5 H5 109.269 1.50
|
||||
NAG O5 C5 H5 109.134 1.50
|
||||
NAG C5 C6 O6 111.299 2.09
|
||||
NAG C5 C6 H61 109.363 1.50
|
||||
NAG C5 C6 H62 109.363 1.50
|
||||
NAG O6 C6 H61 109.265 1.50
|
||||
NAG O6 C6 H62 109.265 1.50
|
||||
NAG H61 C6 H62 108.155 1.50
|
||||
NAG C8 C7 N2 115.988 1.50
|
||||
NAG C8 C7 O7 122.067 1.50
|
||||
NAG N2 C7 O7 121.945 1.50
|
||||
NAG C7 C8 H81 109.527 1.50
|
||||
NAG C7 C8 H82 109.527 1.50
|
||||
NAG C7 C8 H83 109.527 1.50
|
||||
NAG H81 C8 H82 109.365 1.50
|
||||
NAG H81 C8 H83 109.365 1.50
|
||||
NAG H82 C8 H83 109.365 1.50
|
||||
NAG C2 N2 C7 123.083 2.48
|
||||
NAG C2 N2 HN2 118.300 1.53
|
||||
NAG C7 N2 HN2 118.617 2.66
|
||||
NAG C1 O1 HO1 109.112 2.54
|
||||
NAG C3 O3 HO3 108.064 2.53
|
||||
NAG C4 O4 HO4 109.564 3.00
|
||||
NAG C1 O5 C5 113.152 1.70
|
||||
NAG C6 O6 HO6 109.472 2.41
|
||||
|
||||
loop_
|
||||
_chem_comp_tor.comp_id
|
||||
_chem_comp_tor.id
|
||||
_chem_comp_tor.atom_id_1
|
||||
_chem_comp_tor.atom_id_2
|
||||
_chem_comp_tor.atom_id_3
|
||||
_chem_comp_tor.atom_id_4
|
||||
_chem_comp_tor.value_angle
|
||||
_chem_comp_tor.value_angle_esd
|
||||
_chem_comp_tor.period
|
||||
NAG tors_37 C2 C1 O1 HO1 163.320923 10.0 3
|
||||
NAG tors_36 O5 C1 O1 HO1 -74.640495 10.0 3
|
||||
NAG tors_35 H1 C1 O1 HO1 44.671757 10.0 3
|
||||
NAG tors_34 C7 N2 C2 C1 110.024467 10.0 6
|
||||
NAG tors_33 C7 N2 C2 C3 -127.048935 10.0 6
|
||||
NAG tors_32 C7 N2 C2 H2 -9.463453 10.0 6
|
||||
NAG tors_31 HN2 N2 C2 C1 -70.219978 10.0 6
|
||||
NAG tors_30 HN2 N2 C2 C3 52.706615 10.0 6
|
||||
NAG tors_29 HN2 N2 C2 H2 170.292099 10.0 6
|
||||
NAG tors_28 C2 C3 O3 HO3 -168.426712 10.0 3
|
||||
NAG tors_27 C4 C3 O3 HO3 68.814270 10.0 3
|
||||
NAG tors_26 H3 C3 O3 HO3 -50.645489 10.0 3
|
||||
NAG tors_25 C3 C4 O4 HO4 -61.216846 10.0 3
|
||||
NAG tors_24 C5 C4 O4 HO4 59.143990 10.0 3
|
||||
NAG tors_23 H4 C4 O4 HO4 178.982925 10.0 3
|
||||
NAG tors_22 C4 C5 C6 O6 60.874496 10.0 3
|
||||
NAG tors_21 C4 C5 C6 H61 -60.250813 10.0 3
|
||||
NAG tors_20 C4 C5 C6 H62 -178.203568 10.0 3
|
||||
NAG tors_19 O5 C5 C6 O6 -59.959736 10.0 3
|
||||
NAG tors_18 O5 C5 C6 H61 178.914948 10.0 3
|
||||
NAG tors_17 O5 C5 C6 H62 60.962193 10.0 3
|
||||
NAG tors_16 H5 C5 C6 O6 -177.606018 10.0 3
|
||||
NAG tors_15 H5 C5 C6 H61 61.268669 10.0 3
|
||||
NAG tors_14 H5 C5 C6 H62 -56.684093 10.0 3
|
||||
NAG tors_13 C5 C6 O6 HO6 62.882580 10.0 3
|
||||
NAG tors_12 H61 C6 O6 HO6 -175.873230 10.0 3
|
||||
NAG tors_11 H62 C6 O6 HO6 -58.107323 10.0 3
|
||||
NAG tors_10 N2 C7 C8 H81 13.785210 10.0 6
|
||||
NAG tors_9 N2 C7 C8 H82 -106.491890 10.0 6
|
||||
NAG tors_8 N2 C7 C8 H83 133.855774 10.0 6
|
||||
NAG tors_7 O7 C7 C8 H81 -166.218933 10.0 6
|
||||
NAG tors_6 O7 C7 C8 H82 73.503967 10.0 6
|
||||
NAG tors_5 O7 C7 C8 H83 -46.148369 10.0 6
|
||||
NAG tors_4 C8 C7 N2 C2 179.635376 5.0 2
|
||||
NAG tors_3 C8 C7 N2 HN2 -0.118592 5.0 2
|
||||
NAG tors_2 O7 C7 N2 C2 -0.360416 5.0 2
|
||||
NAG tors_1 O7 C7 N2 HN2 179.885620 5.0 2
|
||||
NAG ring_1 C5 O5 C1 C2 -59.497253 3.0 1
|
||||
NAG ring_2 O5 C1 C2 C3 53.568623 3.0 1
|
||||
NAG ring_3 C1 C2 C3 C4 -52.103630 3.0 1
|
||||
NAG ring_4 C2 C3 C4 C5 54.273392 3.0 1
|
||||
NAG ring_5 C3 C4 C5 O5 -56.987598 3.0 1
|
||||
NAG ring_6 C4 C5 O5 C1 61.079514 3.0 1
|
||||
|
||||
loop_
|
||||
_chem_comp_chir.comp_id
|
||||
_chem_comp_chir.id
|
||||
_chem_comp_chir.atom_id_centre
|
||||
_chem_comp_chir.atom_id_1
|
||||
_chem_comp_chir.atom_id_2
|
||||
_chem_comp_chir.atom_id_3
|
||||
_chem_comp_chir.volume_sign
|
||||
NAG chir_1 C1 O5 O1 C2 negative
|
||||
NAG chir_2 C2 N2 C1 C3 negative
|
||||
NAG chir_3 C3 O3 C4 C2 negative
|
||||
NAG chir_4 C4 O4 C5 C3 positive
|
||||
NAG chir_5 C5 O5 C4 C6 negative
|
||||
|
||||
loop_
|
||||
_chem_comp_plane_atom.comp_id
|
||||
_chem_comp_plane_atom.plane_id
|
||||
_chem_comp_plane_atom.atom_id
|
||||
_chem_comp_plane_atom.dist_esd
|
||||
NAG plan-1 C7 0.020
|
||||
NAG plan-1 C8 0.020
|
||||
NAG plan-1 N2 0.020
|
||||
NAG plan-1 O7 0.020
|
||||
NAG plan-2 C2 0.020
|
||||
NAG plan-2 C7 0.020
|
||||
NAG plan-2 HN2 0.020
|
||||
NAG plan-2 N2 0.020
|
||||
|
||||
loop_
|
||||
_pdbx_chem_comp_descriptor.comp_id
|
||||
_pdbx_chem_comp_descriptor.type
|
||||
_pdbx_chem_comp_descriptor.program
|
||||
_pdbx_chem_comp_descriptor.program_version
|
||||
_pdbx_chem_comp_descriptor.descriptor
|
||||
NAG SMILES ACDLabs 12.01 O=C(NC1C(O)C(O)C(OC1O)CO)C
|
||||
NAG InChI InChI 1.03 InChI=1S/C8H15NO6/c1-3(11)9-5-7(13)6(12)4(2-10)15-8(5)14/h4-8,10,12-14H,2H2,1H3,(H,9,11)/t4-,5-,6-,7-,8-/m1/s1
|
||||
NAG InChIKey InChI 1.03 OVRNDRQMDRJTHS-FMDGEEDCSA-N
|
||||
NAG SMILES_CANONICAL CACTVS 3.370 CC(=O)N[C@H]1[C@H](O)O[C@H](CO)[C@@H](O)[C@@H]1O
|
||||
NAG SMILES CACTVS 3.370 CC(=O)N[CH]1[CH](O)O[CH](CO)[CH](O)[CH]1O
|
||||
NAG SMILES_CANONICAL "OpenEye OEToolkits" 1.7.6 CC(=O)N[C@@H]1[C@H]([C@@H]([C@H](O[C@H]1O)CO)O)O
|
||||
NAG SMILES "OpenEye OEToolkits" 1.7.6 CC(=O)NC1C(C(C(OC1O)CO)O)O
|
||||
|
||||
loop_
|
||||
_pdbx_chem_comp_description_generator.comp_id
|
||||
_pdbx_chem_comp_description_generator.program_name
|
||||
_pdbx_chem_comp_description_generator.program_version
|
||||
_pdbx_chem_comp_description_generator.descriptor
|
||||
NAG acedrg 243 "dictionary generator"
|
||||
NAG acedrg_database 11 "data source"
|
||||
NAG rdkit 2017.03.2 "Chemoinformatics tool"
|
||||
NAG refmac5 5.8.0238 "optimization tool"
|
||||
@@ -0,0 +1,232 @@
|
||||
# /home/mihaela/Downloads/cifs/NDG_unimodal.cif
|
||||
# modified by Privateer
|
||||
data_comp_list
|
||||
loop_
|
||||
_chem_comp.id
|
||||
_chem_comp.three_letter_code
|
||||
_chem_comp.name
|
||||
_chem_comp.group
|
||||
_chem_comp.number_atoms_all
|
||||
_chem_comp.number_atoms_nh
|
||||
_chem_comp.desc_level
|
||||
NDG NDG 2-acetamido-2-deoxy-alpha-D-glucopyranose pyranose 30 15 .
|
||||
|
||||
data_comp_NDG
|
||||
loop_
|
||||
_chem_comp_atom.comp_id
|
||||
_chem_comp_atom.atom_id
|
||||
_chem_comp_atom.type_symbol
|
||||
_chem_comp_atom.type_energy
|
||||
_chem_comp_atom.charge
|
||||
_chem_comp_atom.x
|
||||
_chem_comp_atom.y
|
||||
_chem_comp_atom.z
|
||||
NDG C8 C CH3 0 -4.383 -0.218 0.978
|
||||
NDG C7 C C 0 -2.973 0.243 1.199
|
||||
NDG O7 O O 0 -2.625 0.742 2.265
|
||||
NDG N2 N NH1 0 -2.128 0.092 0.170
|
||||
NDG C2 C CH1 0 -0.696 0.317 0.249
|
||||
NDG C3 C CH1 0 -0.067 0.332 -1.144
|
||||
NDG C4 C CH1 0 1.442 0.526 -1.060
|
||||
NDG C5 C CH1 0 2.048 -0.563 -0.177
|
||||
NDG O5 O O2 0 1.434 -0.533 1.130
|
||||
NDG C1 C CH1 0 0.021 -0.700 1.145
|
||||
NDG O1 O OH1 0 -0.314 -1.990 0.734
|
||||
NDG C6 C CH2 0 3.537 -0.400 0.040
|
||||
NDG O6 O OH1 0 3.848 0.831 0.690
|
||||
NDG O4 O OH1 0 2.003 0.453 -2.369
|
||||
NDG O3 O OH1 0 -0.667 1.359 -1.922
|
||||
NDG H81 H H 0 -4.397 -0.937 0.325
|
||||
NDG H82 H H 0 -4.920 0.523 0.653
|
||||
NDG H83 H H 0 -4.753 -0.540 1.816
|
||||
NDG HN2 H H 0 -2.461 -0.151 -0.605
|
||||
NDG H2 H H 0 -0.558 1.211 0.643
|
||||
NDG H3 H H 0 -0.251 -0.544 -1.573
|
||||
NDG H4 H H 0 1.639 1.415 -0.669
|
||||
NDG H5 H H 0 1.880 -1.442 -0.595
|
||||
NDG H1 H H 0 -0.298 -0.577 2.069
|
||||
NDG HO1 H H 0 -0.012 -2.546 1.295
|
||||
NDG H61 H H 0 3.997 -0.433 -0.825
|
||||
NDG H62 H H 0 3.867 -1.144 0.586
|
||||
NDG HO6 H H 0 4.690 0.932 0.718
|
||||
NDG HO4 H H 0 1.852 -0.300 -2.713
|
||||
NDG HO3 H H 0 -0.432 1.251 -2.722
|
||||
|
||||
loop_
|
||||
_chem_comp_bond.comp_id
|
||||
_chem_comp_bond.atom_id_1
|
||||
_chem_comp_bond.atom_id_2
|
||||
_chem_comp_bond.type
|
||||
_chem_comp_bond.aromatic
|
||||
_chem_comp_bond.value_dist_nucleus
|
||||
_chem_comp_bond.value_dist_nucleus_esd
|
||||
_chem_comp_bond.value_dist
|
||||
_chem_comp_bond.value_dist_esd
|
||||
NDG C8 C7 SINGLE n 1.498 0.0100 1.498 0.0100
|
||||
NDG C7 O7 DOUBLE n 1.227 0.0100 1.227 0.0100
|
||||
NDG C7 N2 SINGLE n 1.334 0.0119 1.334 0.0119
|
||||
NDG N2 C2 SINGLE n 1.448 0.0100 1.448 0.0100
|
||||
NDG C2 C3 SINGLE n 1.526 0.0102 1.526 0.0102
|
||||
NDG C3 C4 SINGLE n 1.523 0.0100 1.523 0.0100
|
||||
NDG C4 C5 SINGLE n 1.525 0.0100 1.525 0.0100
|
||||
NDG C5 O5 SINGLE n 1.441 0.0100 1.441 0.0100
|
||||
NDG O5 C1 SINGLE n 1.419 0.0100 1.419 0.0100
|
||||
NDG C1 O1 SINGLE n 1.394 0.0100 1.394 0.0100
|
||||
NDG C5 C6 SINGLE n 1.511 0.0142 1.511 0.0142
|
||||
NDG C6 O6 SINGLE n 1.426 0.0200 1.426 0.0200
|
||||
NDG C4 O4 SINGLE n 1.425 0.0100 1.425 0.0100
|
||||
NDG C3 O3 SINGLE n 1.421 0.0106 1.421 0.0106
|
||||
NDG C2 C1 SINGLE n 1.530 0.0100 1.530 0.0100
|
||||
NDG C8 H81 SINGLE n 1.089 0.0100 0.971 0.0140
|
||||
NDG C8 H82 SINGLE n 1.089 0.0100 0.971 0.0140
|
||||
NDG C8 H83 SINGLE n 1.089 0.0100 0.971 0.0140
|
||||
NDG N2 HN2 SINGLE n 1.016 0.0100 0.876 0.0200
|
||||
NDG C2 H2 SINGLE n 1.089 0.0100 0.987 0.0166
|
||||
NDG C3 H3 SINGLE n 1.089 0.0100 0.992 0.0104
|
||||
NDG C4 H4 SINGLE n 1.089 0.0100 0.991 0.0105
|
||||
NDG C5 H5 SINGLE n 1.089 0.0100 0.988 0.0182
|
||||
NDG C1 H1 SINGLE n 1.089 0.0100 0.985 0.0100
|
||||
NDG O1 HO1 SINGLE n 0.970 0.0120 0.846 0.0200
|
||||
NDG C6 H61 SINGLE n 1.089 0.0100 0.980 0.0184
|
||||
NDG C6 H62 SINGLE n 1.089 0.0100 0.980 0.0184
|
||||
NDG O6 HO6 SINGLE n 0.970 0.0120 0.848 0.0200
|
||||
NDG O4 HO4 SINGLE n 0.970 0.0120 0.841 0.0200
|
||||
NDG O3 HO3 SINGLE n 0.970 0.0120 0.841 0.0200
|
||||
|
||||
loop_
|
||||
_chem_comp_angle.comp_id
|
||||
_chem_comp_angle.atom_id_1
|
||||
_chem_comp_angle.atom_id_2
|
||||
_chem_comp_angle.atom_id_3
|
||||
_chem_comp_angle.value_angle
|
||||
_chem_comp_angle.value_angle_esd
|
||||
NDG C7 C8 H81 109.527 1.50
|
||||
NDG C7 C8 H82 109.527 1.50
|
||||
NDG C7 C8 H83 109.527 1.50
|
||||
NDG H81 C8 H82 109.365 1.50
|
||||
NDG H81 C8 H83 109.365 1.50
|
||||
NDG H82 C8 H83 109.365 1.50
|
||||
NDG C8 C7 O7 122.067 1.50
|
||||
NDG C8 C7 N2 115.988 1.50
|
||||
NDG O7 C7 N2 121.945 1.50
|
||||
NDG C7 N2 C2 123.083 2.48
|
||||
NDG C7 N2 HN2 118.617 2.66
|
||||
NDG C2 N2 HN2 118.300 1.53
|
||||
NDG N2 C2 C3 110.454 2.38
|
||||
NDG N2 C2 C1 111.780 3.00
|
||||
NDG N2 C2 H2 107.121 2.62
|
||||
NDG C3 C2 C1 110.235 1.50
|
||||
NDG C3 C2 H2 107.579 2.24
|
||||
NDG C1 C2 H2 107.511 1.55
|
||||
NDG C2 C3 C4 110.882 1.54
|
||||
NDG C2 C3 O3 109.400 2.63
|
||||
NDG C2 C3 H3 108.177 2.01
|
||||
NDG C4 C3 O3 110.984 1.55
|
||||
NDG C4 C3 H3 108.714 1.50
|
||||
NDG O3 C3 H3 108.954 1.50
|
||||
NDG C3 C4 C5 109.454 1.50
|
||||
NDG C3 C4 O4 109.301 2.14
|
||||
NDG C3 C4 H4 109.514 1.50
|
||||
NDG C5 C4 O4 109.072 2.07
|
||||
NDG C5 C4 H4 109.223 1.50
|
||||
NDG O4 C4 H4 109.194 1.50
|
||||
NDG C4 C5 O5 109.140 1.86
|
||||
NDG C4 C5 C6 112.996 1.59
|
||||
NDG C4 C5 H5 108.960 1.50
|
||||
NDG O5 C5 C6 106.879 1.50
|
||||
NDG O5 C5 H5 109.134 1.50
|
||||
NDG C6 C5 H5 109.269 1.50
|
||||
NDG C5 O5 C1 113.152 1.70
|
||||
NDG O5 C1 O1 109.600 2.81
|
||||
NDG O5 C1 C2 111.350 3.00
|
||||
NDG O5 C1 H1 109.272 1.61
|
||||
NDG O1 C1 C2 109.247 2.43
|
||||
NDG O1 C1 H1 108.913 1.50
|
||||
NDG C2 C1 H1 108.848 1.50
|
||||
NDG C1 O1 HO1 109.112 2.54
|
||||
NDG C5 C6 O6 111.299 2.09
|
||||
NDG C5 C6 H61 109.363 1.50
|
||||
NDG C5 C6 H62 109.363 1.50
|
||||
NDG O6 C6 H61 109.265 1.50
|
||||
NDG O6 C6 H62 109.265 1.50
|
||||
NDG H61 C6 H62 108.155 1.50
|
||||
NDG C6 O6 HO6 109.472 2.41
|
||||
NDG C4 O4 HO4 109.564 3.00
|
||||
NDG C3 O3 HO3 108.064 2.53
|
||||
|
||||
loop_
|
||||
_chem_comp_tor.comp_id
|
||||
_chem_comp_tor.id
|
||||
_chem_comp_tor.atom_id_1
|
||||
_chem_comp_tor.atom_id_2
|
||||
_chem_comp_tor.atom_id_3
|
||||
_chem_comp_tor.atom_id_4
|
||||
_chem_comp_tor.value_angle
|
||||
_chem_comp_tor.value_angle_esd
|
||||
_chem_comp_tor.period
|
||||
NDG tors_14 O7 C7 C8 H81 -152.413528 10.00 6
|
||||
NDG tors_13 C5 C6 O6 HO6 -173.666153 10.00 3
|
||||
NDG tors_12 C8 C7 N2 C2 -171.730637 10.00 2
|
||||
NDG tors_11 C7 N2 C2 C3 -168.666641 10.00 6
|
||||
NDG tors_10 N2 C2 C3 O3 59.038174 10.00 3
|
||||
NDG tors_9 O1 C1 C2 N2 52.882263 10.00 3
|
||||
NDG tors_8 C2 C3 O3 HO3 -168.245789 10.00 3
|
||||
NDG tors_7 O3 C3 C4 O4 -61.694687 10.00 3
|
||||
NDG tors_6 C3 C4 O4 HO4 -60.817944 10.00 3
|
||||
NDG tors_5 O4 C4 C5 C6 63.617004 10.00 3
|
||||
NDG tors_4 C4 C5 C6 O6 60.988659 10.00 3
|
||||
NDG tors_3 C6 C5 O5 C1 -178.774002 10.00 3
|
||||
NDG tors_2 O1 C1 O5 C5 66.997154 10.00 3
|
||||
NDG tors_1 O5 C1 O1 HO1 64.437210 10.00 3
|
||||
NDG ring_1 C5 O5 C1 C2 -54.969864 3.0 1
|
||||
NDG ring_2 O5 C1 C2 C3 50.548309 3.0 1
|
||||
NDG ring_3 C1 C2 C3 C4 -52.329090 3.0 1
|
||||
NDG ring_4 C2 C3 C4 C5 56.131844 3.0 1
|
||||
NDG ring_5 C3 C4 C5 O5 -57.070698 3.0 1
|
||||
NDG ring_6 C4 C5 O5 C1 58.010880 3.0 1
|
||||
|
||||
loop_
|
||||
_chem_comp_chir.comp_id
|
||||
_chem_comp_chir.id
|
||||
_chem_comp_chir.atom_id_centre
|
||||
_chem_comp_chir.atom_id_1
|
||||
_chem_comp_chir.atom_id_2
|
||||
_chem_comp_chir.atom_id_3
|
||||
_chem_comp_chir.volume_sign
|
||||
NDG chir_1 C2 N2 C1 C3 negative
|
||||
NDG chir_2 C3 O3 C4 C2 negative
|
||||
NDG chir_3 C4 O4 C5 C3 positive
|
||||
NDG chir_4 C5 O5 C4 C6 negative
|
||||
NDG chir_5 C1 O5 O1 C2 positive
|
||||
|
||||
loop_
|
||||
_chem_comp_plane_atom.comp_id
|
||||
_chem_comp_plane_atom.plane_id
|
||||
_chem_comp_plane_atom.atom_id
|
||||
_chem_comp_plane_atom.dist_esd
|
||||
NDG plan-1 C7 0.020
|
||||
NDG plan-1 C8 0.020
|
||||
NDG plan-1 N2 0.020
|
||||
NDG plan-1 O7 0.020
|
||||
NDG plan-2 C2 0.020
|
||||
NDG plan-2 C7 0.020
|
||||
NDG plan-2 HN2 0.020
|
||||
NDG plan-2 N2 0.020
|
||||
|
||||
loop_
|
||||
_pdbx_chem_comp_descriptor.comp_id
|
||||
_pdbx_chem_comp_descriptor.type
|
||||
_pdbx_chem_comp_descriptor.program
|
||||
_pdbx_chem_comp_descriptor.program_version
|
||||
_pdbx_chem_comp_descriptor.descriptor
|
||||
NDG SMILES ACDLabs 10.04 O=C(NC1C(O)C(O)C(OC1O)CO)C
|
||||
NDG SMILES_CANONICAL CACTVS 3.341 CC(=O)N[C@H]1[C@@H](O)O[C@H](CO)[C@@H](O)[C@@H]1O
|
||||
NDG SMILES CACTVS 3.341 CC(=O)N[CH]1[CH](O)O[CH](CO)[CH](O)[CH]1O
|
||||
NDG SMILES_CANONICAL "OpenEye OEToolkits" 1.5.0 CC(=O)N[C@@H]1[C@H]([C@@H]([C@H](O[C@@H]1O)CO)O)O
|
||||
NDG SMILES "OpenEye OEToolkits" 1.5.0 CC(=O)NC1C(C(C(OC1O)CO)O)O
|
||||
NDG InChI InChI 1.03 InChI=1S/C8H15NO6/c1-3(11)9-5-7(13)6(12)4(2-10)15-8(5)14/h4-8,10,12-14H,2H2,1H3,(H,9,11)/t4-,5-,6-,7-,8+/m1/s1
|
||||
NDG InChIKey InChI 1.03 OVRNDRQMDRJTHS-PVFLNQBWSA-N
|
||||
NDG ? acedrg 231 "dictionary generator"
|
||||
NDG ? acedrg_database 11 "data source"
|
||||
NDG ? rdkit 2017.03.2 "Chemoinformatics tool"
|
||||
NDG ? refmac5 5.8.0238 "optimization tool"
|
||||
File diff suppressed because it is too large.
Load diff
@@ -40,16 +40,19 @@ COFACTORS = ["NAD", "NAI", "NAP", "NDP", "FAD", "FMN", "HEM", "HEC", "SAM", "SAH
|
||||
# (CRO-pept), and the bilins of the phytochromes (phycocyanobilin's thioether to a cysteine, CYS-CYC). The flavins of
|
||||
# the LOV domains and photolyases are among the COFACTORS.
|
||||
CHROMOPHORES = ["RET", "HC4", "CRO", "GYS", "CR2", "NRQ", "BLA", "LBV", "CYC"]
|
||||
# N-acetyl-D-glucosamine, beta (NAG) and alpha (NDG): the lysozyme ligand, alone or as chitobiose/chitotriose.
|
||||
SUGARS = ["NAG", "NDG"]
|
||||
ADDITIVES = ["DMS", "PEG", "PGE", "PG4", "1PE", "GOL", "EDO", "SO4", "PO4", "ACT", "MPD"]
|
||||
WATER_AND_IONS = ["HOH", "NA", "K", "MG", "CA", "ZN", "MN", "FE", "FE2", "NI", "CU", "CO", "CD",
|
||||
"CL", "BR", "IOD"]
|
||||
COMPOUNDS = (AMINO_ACIDS + NUCLEOTIDES + MODIFIED_NUCLEOTIDES + NUCLEOTIDE_LIGANDS + COFACTORS + CHROMOPHORES +
|
||||
ADDITIVES + WATER_AND_IONS)
|
||||
SUGARS + ADDITIVES + WATER_AND_IONS)
|
||||
# The donor elements of metal sites whose distances metals.cif carries.
|
||||
METAL_LIGANDS = ["O", "N", "S"]
|
||||
|
||||
# Groups of the polymers above; links and modifications of other groups (sugars) are left out.
|
||||
GROUPS = {".", "peptide", "P-peptide", "M-peptide", "DNA/RNA", "NON-POLYMER"}
|
||||
# Groups of the compounds above: the polymers, and the pyranoses for the glycosidic links (and that of a sugar to
|
||||
# Asn, Ser or Thr); links and modifications of other groups are left out.
|
||||
GROUPS = {".", "peptide", "P-peptide", "M-peptide", "DNA/RNA", "NON-POLYMER", "pyranose"}
|
||||
|
||||
|
||||
def compound_path(lib, code):
|
||||
|
||||
@@ -235,10 +235,10 @@ TEST_CASE("RefinementLikelihood_derivative", "[Refinement]") {
|
||||
|
||||
TEST_CASE("RefinementMonomerLibrary_embedded", "[Refinement]") {
|
||||
const gemmi::MonLib &monlib = EmbeddedMonomerLibrary();
|
||||
for (const char *code : {"ALA", "PRO", "MSE", "DA", "U", "ATP", "GOL", "SO4", "HOH", "ZN"})
|
||||
for (const char *code : {"ALA", "PRO", "MSE", "DA", "U", "ATP", "GOL", "SO4", "HOH", "ZN", "NAG", "NDG"})
|
||||
CHECK(InEmbeddedMonomerLibrary(code));
|
||||
CHECK_FALSE(InEmbeddedMonomerLibrary("XYZ"));
|
||||
for (const char *link : {"TRANS", "CIS", "PTRANS", "p", "SS"})
|
||||
for (const char *link : {"TRANS", "CIS", "PTRANS", "p", "SS", "BETA1-4", "ALPHA1-4", "pyr-ASN"})
|
||||
CHECK(monlib.links.count(link) == 1);
|
||||
CHECK(monlib.modifications.count("NH3") == 1);
|
||||
CHECK(monlib.ener_lib.atoms.count("CH1") == 1);
|
||||
@@ -486,6 +486,47 @@ TEST_CASE("RefinementRestraints_ideal_residues", "[Refinement]") {
|
||||
CHECK(g.rmsd_chirals < 0.2);
|
||||
}
|
||||
|
||||
// N-acetylglucosamine, beta and alpha, restrained at its dictionary geometry; and two of them joined beta-1,4
|
||||
// (chitobiose) with no LINK record: the glycosidic bond is found and restrained by the library's link.
|
||||
TEST_CASE("RefinementRestraints_glcnac", "[Refinement]") {
|
||||
const gemmi::UnitCell cell(50, 55, 60, 90, 90, 90);
|
||||
{
|
||||
gemmi::Structure st = residue_crystal({"NAG", "NDG"}, cell, "P 21 21 21", 7);
|
||||
const RefinementTopology topo = BuildRefinementTopology(st);
|
||||
CHECK(topo.restrained_residues == 2);
|
||||
CHECK(topo.fixed_residues == 0);
|
||||
CHECK(topo.bonds == 30);
|
||||
CHECK(topo.chirals == 10); // C1-C5 of each ring
|
||||
std::vector<std::array<double, 4>> xyzb;
|
||||
for (gemmi::Atom *a : atoms_of(st.models[0]))
|
||||
xyzb.push_back({a->pos.x, a->pos.y, a->pos.z, a->b_iso});
|
||||
const GeometryStatistics g = MeasureGeometry(topo.geometry, {}, xyzb);
|
||||
CHECK(g.rmsd_bonds < 0.02);
|
||||
CHECK(g.rmsd_chirals < 0.2);
|
||||
}
|
||||
gemmi::Structure st = residue_crystal({"NAG", "NAG"}, cell, "P 1", 3);
|
||||
std::vector<gemmi::Residue> &res = st.models[0].chains[0].residues;
|
||||
// the second ring moved for its O1 to be on the first's O4, and its O1 removed: C1-O4 at 1.39 A
|
||||
const gemmi::Position shift = res[0].find_atom("O4", '*')->pos - res[1].find_atom("O1", '*')->pos;
|
||||
for (gemmi::Atom &a : res[1].atoms)
|
||||
a.pos += shift;
|
||||
std::erase_if(res[1].atoms, [](const gemmi::Atom &a) { return a.name == "O1"; });
|
||||
const RefinementTopology topo = BuildRefinementTopology(st);
|
||||
CHECK(topo.sugar_links == 1);
|
||||
CHECK(topo.restrained_residues == 2);
|
||||
std::vector<gemmi::Atom *> atoms = atoms_of(st.models[0]);
|
||||
auto index = [&](const gemmi::Atom *a) { return static_cast<int>(std::find(atoms.begin(), atoms.end(), a) - atoms.begin()); };
|
||||
const int o4 = index(res[0].find_atom("O4", '*')), c1 = index(res[1].find_atom("C1", '*'));
|
||||
int glycosidic = 0;
|
||||
for (const RestraintRecord &r : topo.geometry.records)
|
||||
if (r.kind == static_cast<int>(RestraintKind::Bond) &&
|
||||
((r.atom[0] == o4 && r.atom[1] == c1) || (r.atom[0] == c1 && r.atom[1] == o4))) {
|
||||
glycosidic++;
|
||||
CHECK(r.ideal == Catch::Approx(1.393).margin(0.01)); // the library's BETA1-4
|
||||
}
|
||||
CHECK(glycosidic == 1);
|
||||
}
|
||||
|
||||
// A zinc bound by four cysteines (the dictionary's own ZN-CYS link) and a magnesium by six waters (links made from
|
||||
// the library's metal-site statistics), both from LINK records: the bonds come out at the expected distances,
|
||||
// and a metal set off its site returns there under them alone.
|
||||
|
||||
Reference in new issue
Block a user