Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
12c0b061
Unverified
Commit
12c0b061
authored
8 months ago
by
Xavier Robin
Browse files
Options
Downloads
Patches
Plain Diff
test: reading (or not) of BIRD (PRD) compounds
parent
51a58a0b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/conop/tests/test_complib.py
+26
-0
26 additions, 0 deletions
modules/conop/tests/test_complib.py
modules/conop/tests/testfiles/test_compounds.cif
+237
-0
237 additions, 0 deletions
modules/conop/tests/testfiles/test_compounds.cif
with
263 additions
and
0 deletions
modules/conop/tests/test_complib.py
+
26
−
0
View file @
12c0b061
...
...
@@ -118,6 +118,32 @@ class TestCompLib(unittest.TestCase):
# OX is obsolete
assert
complib_no_obsolete
.
FindCompound
(
"
OX
"
)
is
None
def
test_bird
(
self
):
"""
the test file in test_compounds.cif contains two entries from
BIRD:
- PRD_900116 is not in a compound format and should not be added
to the compound lib.
- PRDCC_900116 is in a valid format and should be read in
"""
complib
=
self
.
complib
# PRD_900116 not added
comp
=
complib
.
FindCompound
(
"
PRD_900116
"
)
self
.
assertIsNone
(
comp
)
# PRD_900116 is added
comp
=
complib
.
FindCompound
(
"
PRDCC_900116
"
)
self
.
assertIsNotNone
(
comp
)
self
.
assertEqual
(
comp
.
smiles
,
"
C1[C@H]([C@@H]([C@H]([C@@H](O1)O[C@@H]2CO[C@H]([C@@H]([C@H]2O)O)O)O)O)O
"
)
# The release flag is REF_ONLY and compound should not be marked as
# obsolete
self
.
assertFalse
(
comp
.
obsolete
)
# Contains atoms and bonds
self
.
assertEqual
(
len
(
comp
.
atom_specs
),
37
)
self
.
assertEqual
(
len
(
comp
.
bond_specs
),
38
)
if
__name__
==
"
__main__
"
:
from
ost
import
testutils
...
...
This diff is collapsed.
Click to expand it.
modules/conop/tests/testfiles/test_compounds.cif
+
237
−
0
View file @
12c0b061
...
...
@@ -2158,3 +2158,240 @@ _chem_comp.pdbx_model_coordinates_db_code ?
_chem_comp.pdbx_subcomponent_list ?
_chem_comp.pdbx_processing_site RCSB
##
# PRDCC_900116 is a BIRD entry in PRDCC format and should read in correctly in
# the compound lib
data_PRDCC_900116
#
_chem_comp.id PRDCC_900116
_chem_comp.name 4-O-beta-D-xylopyranosyl-beta-D-xylopyranose
_chem_comp.type saccharide
_chem_comp.formula "C10 H18 O9"
_chem_comp.pdbx_release_status REF_ONLY
_chem_comp.formula_weight 282.245
_chem_comp.pdbx_type ?
_chem_comp.mon_nstd_parent_comp_id ?
_chem_comp.pdbx_synonyms ?
_chem_comp.pdbx_formal_charge ?
_chem_comp.pdbx_initial_date ?
_chem_comp.pdbx_modified_date ?
_chem_comp.pdbx_ambiguous_flag ?
_chem_comp.pdbx_replaced_by ?
_chem_comp.pdbx_replaces ?
_chem_comp.one_letter_code ?
_chem_comp.three_letter_code ?
_chem_comp.pdbx_model_coordinates_details ?
_chem_comp.pdbx_model_coordinates_missing_flag ?
_chem_comp.pdbx_ideal_coordinates_details ?
_chem_comp.pdbx_ideal_coordinates_missing_flag ?
_chem_comp.pdbx_model_coordinates_db_code ?
_chem_comp.pdbx_subcomponent_list ?
_chem_comp.pdbx_processing_site ?
#
loop_
_chem_comp_atom.comp_id
_chem_comp_atom.atom_id
_chem_comp_atom.alt_atom_id
_chem_comp_atom.type_symbol
_chem_comp_atom.charge
_chem_comp_atom.pdbx_align
_chem_comp_atom.pdbx_aromatic_flag
_chem_comp_atom.pdbx_leaving_atom_flag
_chem_comp_atom.pdbx_stereo_config
_chem_comp_atom.model_Cartn_x
_chem_comp_atom.model_Cartn_y
_chem_comp_atom.model_Cartn_z
_chem_comp_atom.pdbx_model_Cartn_x_ideal
_chem_comp_atom.pdbx_model_Cartn_y_ideal
_chem_comp_atom.pdbx_model_Cartn_z_ideal
_chem_comp_atom.pdbx_component_comp_id
_chem_comp_atom.pdbx_residue_numbering
_chem_comp_atom.pdbx_component_atom_id
_chem_comp_atom.pdbx_polymer_type
_chem_comp_atom.pdbx_ref_id
_chem_comp_atom.pdbx_component_id
_chem_comp_atom.pdbx_ordinal
_chem_comp_atom.pdbx_backbone_atom_flag
_chem_comp_atom.pdbx_n_terminal_atom_flag
_chem_comp_atom.pdbx_c_terminal_atom_flag
PRD_900116 O1A O9 O 0 1 N N N 62.369 63.326 22.057 -5.145 -0.343 1.296 XYP 1 O4A polymer 1 1 1 ? ? ?
PRD_900116 C1A C9 C 0 1 N N R 62.245 64.245 21.048 -3.966 -0.610 0.535 XYP 1 C1B polymer 1 1 2 ? ? ?
PRD_900116 C2A C10 C 0 1 N N R 63.637 64.692 20.579 -3.534 0.662 -0.201 XYP 1 C2B polymer 1 1 3 ? ? ?
PRD_900116 C3A C7 C 0 1 N N R 63.577 65.572 19.393 -2.237 0.384 -0.966 XYP 1 C3B polymer 1 1 4 ? ? ?
PRD_900116 C4A C6 C 0 1 N N R 62.774 65.007 18.298 -1.171 -0.108 0.019 XYP 1 C4B polymer 1 1 5 ? ? ?
PRD_900116 C5A C8 C 0 1 N N N 61.391 64.538 18.774 -1.694 -1.350 0.746 XYP 1 C5B polymer 1 1 6 ? ? ?
PRD_900116 O2A O8 O 0 1 N N N 64.259 65.423 21.647 -4.556 1.052 -1.120 XYP 1 O2B polymer 1 1 7 ? ? ?
PRD_900116 O3A O6 O 0 1 N N N 64.944 65.808 18.894 -1.787 1.585 -1.596 XYP 1 O3B polymer 1 1 8 ? ? ?
PRD_900116 O4A O5 O 0 1 N N N 62.601 66.032 17.300 0.022 -0.440 -0.695 XYP 1 O4B polymer 1 1 9 ? ? ?
PRD_900116 O5A O7 O 0 1 N N N 61.492 63.643 19.942 -2.918 -1.031 1.411 XYP 1 O5B polymer 1 1 10 ? ? ?
PRD_900116 C1B C5 C 0 1 N N S 62.805 65.537 16.116 1.220 -0.261 0.063 XYP 2 C1B polymer 1 1 11 ? ? ?
PRD_900116 C2B C3 C 0 1 N N R 62.263 66.524 15.005 2.417 -0.761 -0.750 XYP 2 C2B polymer 1 1 12 ? ? ?
PRD_900116 C3B C2 C 0 1 N N S 62.560 66.033 13.636 3.703 -0.511 0.043 XYP 2 C3B polymer 1 1 13 ? ? ?
PRD_900116 C4B C1 C 0 1 N N R 63.947 65.755 13.420 3.806 0.981 0.372 XYP 2 C4B polymer 1 1 14 ? ? ?
PRD_900116 C5B C4 C 0 1 N N N 64.542 64.882 14.493 2.556 1.414 1.142 XYP 2 C5B polymer 1 1 15 ? ? ?
PRD_900116 O2B O3 O 0 1 N N N 60.863 66.689 15.161 2.274 -2.161 -1.000 XYP 2 O2B polymer 1 1 16 ? ? ?
PRD_900116 O3B O2 O 0 1 N N N 62.135 67.086 12.661 4.832 -0.907 -0.738 XYP 2 O3B polymer 1 1 17 ? ? ?
PRD_900116 O4B O1 O 0 1 N N N 64.114 65.051 12.120 4.965 1.215 1.174 XYP 2 O4B polymer 1 1 18 ? ? ?
PRD_900116 O5B O4 O 0 1 N N N 64.275 65.381 15.859 1.394 1.126 0.361 XYP 2 O5B polymer 1 1 19 ? ? ?
PRD_900116 HO1A H18 H 0 0 N N N 62.856 63.709 22.777 -5.476 -1.105 1.790 XYP 1 HO4A polymer 1 1 20 ? ? ?
PRD_900116 H1A1 H15 H 0 0 N N N 61.704 65.134 21.405 -4.172 -1.397 -0.191 XYP 1 H1B polymer 1 1 21 ? ? ?
PRD_900116 H2A H16 H 0 1 N N N 64.231 63.798 20.340 -3.368 1.461 0.521 XYP 1 H2B polymer 1 1 22 ? ? ?
PRD_900116 H3A H11 H 0 1 N N N 63.139 66.536 19.692 -2.415 -0.381 -1.722 XYP 1 H3B polymer 1 1 23 ? ? ?
PRD_900116 H4A H10 H 0 1 N N N 63.304 64.147 17.862 -0.956 0.675 0.745 XYP 1 H4B polymer 1 1 24 ? ? ?
PRD_900116 H5A1 H14 H 0 0 N N N 60.895 63.999 17.953 -0.958 -1.679 1.479 XYP 1 H5B1 polymer 1 1 25 ? ? ?
PRD_900116 H5A2 H13 H 0 0 N N N 60.791 65.418 19.050 -1.870 -2.147 0.023 XYP 1 H5B2 polymer 1 1 26 ? ? ?
PRD_900116 HO2A H17 H 0 0 N N N 64.308 64.874 22.421 -5.408 1.244 -0.704 XYP 1 HO2B polymer 1 1 27 ? ? ?
PRD_900116 HO3A H12 H 0 0 N N N 65.477 66.174 19.590 -2.414 1.953 -2.234 XYP 1 HO3B polymer 1 1 28 ? ? ?
PRD_900116 H1B H9 H 0 1 N N N 62.310 64.564 15.980 1.151 -0.826 0.992 XYP 2 H1B polymer 1 1 29 ? ? ?
PRD_900116 H2B H5 H 0 1 N N N 62.766 67.492 15.149 2.464 -0.225 -1.698 XYP 2 H2B polymer 1 1 30 ? ? ?
PRD_900116 H3B H3 H 0 1 N N N 61.970 65.124 13.450 3.679 -1.087 0.969 XYP 2 H3B polymer 1 1 31 ? ? ?
PRD_900116 H4B H2 H 0 1 N N N 64.510 66.699 13.386 3.882 1.553 -0.553 XYP 2 H4B polymer 1 1 32 ? ? ?
PRD_900116 H5B1 H8 H 0 0 N N N 65.631 64.836 14.343 2.603 2.484 1.341 XYP 2 H5B1 polymer 1 1 33 ? ? ?
PRD_900116 H5B2 H7 H 0 0 N N N 64.116 63.872 14.399 2.503 0.870 2.085 XYP 2 H5B2 polymer 1 1 34 ? ? ?
PRD_900116 HO2B H6 H 0 0 N N N 60.676 67.003 16.038 1.479 -2.392 -1.499 XYP 2 HO2B polymer 1 1 35 ? ? ?
PRD_900116 HO3B H4 H 0 0 N N N 61.215 67.284 12.789 5.682 -0.771 -0.299 XYP 2 HO3B polymer 1 1 36 ? ? ?
PRD_900116 HO4B H1 H 0 0 N N N 65.035 64.866 11.976 5.093 2.141 1.420 XYP 2 HO4B polymer 1 1 37 ? ? ?
#
loop_
_chem_comp_bond.comp_id
_chem_comp_bond.atom_id_1
_chem_comp_bond.atom_id_2
_chem_comp_bond.value_order
_chem_comp_bond.pdbx_aromatic_flag
_chem_comp_bond.pdbx_stereo_config
_chem_comp_bond.pdbx_ordinal
PRD_900116 O4B C4B SING N N 1
PRD_900116 O3B C3B SING N N 2
PRD_900116 C4B C3B SING N N 3
PRD_900116 C4B C5B SING N N 4
PRD_900116 C3B C2B SING N N 5
PRD_900116 C5B O5B SING N N 6
PRD_900116 C2B O2B SING N N 7
PRD_900116 C2B C1B SING N N 8
PRD_900116 O5B C1B SING N N 9
PRD_900116 C1B O4A SING N N 10
PRD_900116 O4A C4A SING N N 11
PRD_900116 C4A C5A SING N N 12
PRD_900116 C4A C3A SING N N 13
PRD_900116 C5A O5A SING N N 14
PRD_900116 O3A C3A SING N N 15
PRD_900116 C3A C2A SING N N 16
PRD_900116 O5A C1A SING N N 17
PRD_900116 C2A C1A SING N N 18
PRD_900116 C2A O2A SING N N 19
PRD_900116 C1A O1A SING N N 20
PRD_900116 O4B HO4B SING N N 21
PRD_900116 C4B H4B SING N N 22
PRD_900116 C3B H3B SING N N 23
PRD_900116 O3B HO3B SING N N 24
PRD_900116 C2B H2B SING N N 25
PRD_900116 O2B HO2B SING N N 26
PRD_900116 C5B H5B2 SING N N 27
PRD_900116 C5B H5B1 SING N N 28
PRD_900116 C1B H1B SING N N 29
PRD_900116 C4A H4A SING N N 30
PRD_900116 C3A H3A SING N N 31
PRD_900116 O3A HO3A SING N N 32
PRD_900116 C5A H5A2 SING N N 33
PRD_900116 C5A H5A1 SING N N 34
PRD_900116 C1A H1A1 SING N N 35
PRD_900116 C2A H2A SING N N 36
PRD_900116 O2A HO2A SING N N 37
PRD_900116 O1A HO1A SING N N 38
#
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
PRD_900116 SMILES ACDLabs 12.01 "OC1C(C(O)C(OC1)OC2COC(O)C(C2O)O)O"
PRD_900116 InChI InChI 1.03 "InChI=1S/C10H18O9/c11-3-1-18-10(8(15)5(3)12)19-4-2-17-9(16)7(14)6(4)13/h3-16H,1-2H2/t3-,4-,5+,6+,7-,8-,9-,10+/m1/s1"
PRD_900116 InChIKey InChI 1.03 LGQKSQQRKHFMLI-SJYYZXOBSA-N
PRD_900116 SMILES_CANONICAL CACTVS 3.385 "O[C@@H]1CO[C@@H](O[C@@H]2CO[C@@H](O)[C@H](O)[C@H]2O)[C@H](O)[C@H]1O"
PRD_900116 SMILES CACTVS 3.385 "O[CH]1CO[CH](O[CH]2CO[CH](O)[CH](O)[CH]2O)[CH](O)[CH]1O"
PRD_900116 SMILES_CANONICAL "OpenEye OEToolkits" 2.0.7 "C1[C@H]([C@@H]([C@H]([C@@H](O1)O[C@@H]2CO[C@H]([C@@H]([C@H]2O)O)O)O)O)O"
PRD_900116 SMILES "OpenEye OEToolkits" 2.0.7 "C1C(C(C(C(O1)OC2COC(C(C2O)O)O)O)O)O"
#
loop_
_pdbx_chem_comp_identifier.comp_id
_pdbx_chem_comp_identifier.type
_pdbx_chem_comp_identifier.program
_pdbx_chem_comp_identifier.program_version
_pdbx_chem_comp_identifier.identifier
PRD_900116 "SYSTEMATIC NAME" ACDLabs 12.01 4-O-beta-D-xylopyranosyl-beta-D-xylopyranose
PRD_900116 "SYSTEMATIC NAME" "OpenEye OEToolkits" 2.0.7 "(2~{S},3~{R},4~{S},5~{R})-2-[(3~{R},4~{R},5~{R},6~{R})-4,5,6-tris(oxidanyl)oxan-3-yl]oxyoxane-3,4,5-triol"
#
# PRD_900116 is a BIRD entry in PRD format. It doesn't have _chem_comp or anything useful
# and should not end up in the compound lib
data_PRD_900116
#
_pdbx_reference_molecule.prd_id PRD_900116
_pdbx_reference_molecule.name 4beta-beta-xylobiose
_pdbx_reference_molecule.represent_as branched
_pdbx_reference_molecule.type Oligosaccharide
_pdbx_reference_molecule.type_evidence_code ?
_pdbx_reference_molecule.class metabolism
_pdbx_reference_molecule.class_evidence_code ?
_pdbx_reference_molecule.formula "C10 H18 O9"
_pdbx_reference_molecule.formula_weight 282.245
_pdbx_reference_molecule.chem_comp_id ?
_pdbx_reference_molecule.release_status REL
_pdbx_reference_molecule.replaces ?
_pdbx_reference_molecule.replaced_by ?
_pdbx_reference_molecule.compound_details ?
_pdbx_reference_molecule.description oligosaccharide
_pdbx_reference_molecule.representative_PDB_id_code 6RV8
#
_pdbx_reference_entity_list.prd_id PRD_900116
_pdbx_reference_entity_list.ref_entity_id 1
_pdbx_reference_entity_list.component_id 1
_pdbx_reference_entity_list.type branched
_pdbx_reference_entity_list.details ?
#
_pdbx_reference_entity_poly.prd_id PRD_900116
_pdbx_reference_entity_poly.ref_entity_id 1
_pdbx_reference_entity_poly.type oligosaccharide
_pdbx_reference_entity_poly.db_code ?
_pdbx_reference_entity_poly.db_name ?
#
_pdbx_reference_entity_sequence.prd_id PRD_900116
_pdbx_reference_entity_sequence.ref_entity_id 1
_pdbx_reference_entity_sequence.type saccharide
_pdbx_reference_entity_sequence.NRP_flag N
#
loop_
_pdbx_reference_entity_poly_seq.prd_id
_pdbx_reference_entity_poly_seq.ref_entity_id
_pdbx_reference_entity_poly_seq.num
_pdbx_reference_entity_poly_seq.mon_id
_pdbx_reference_entity_poly_seq.parent_mon_id
_pdbx_reference_entity_poly_seq.hetero
_pdbx_reference_entity_poly_seq.observed
PRD_900116 1 1 XYP ? N Y
PRD_900116 1 2 XYP ? N Y
#
_pdbx_reference_entity_poly_link.prd_id PRD_900116
_pdbx_reference_entity_poly_link.ref_entity_id 1
_pdbx_reference_entity_poly_link.component_id 1
_pdbx_reference_entity_poly_link.link_id 1
_pdbx_reference_entity_poly_link.atom_id_1 O4
_pdbx_reference_entity_poly_link.comp_id_1 XYP
_pdbx_reference_entity_poly_link.entity_seq_num_1 1
_pdbx_reference_entity_poly_link.atom_id_2 C1
_pdbx_reference_entity_poly_link.comp_id_2 XYP
_pdbx_reference_entity_poly_link.entity_seq_num_2 2
_pdbx_reference_entity_poly_link.value_order SING
_pdbx_reference_entity_poly_link.details ?
_pdbx_reference_entity_poly_link.insert_code_1 ?
_pdbx_reference_entity_poly_link.insert_code_2 ?
#
loop_
_pdbx_prd_audit.prd_id
_pdbx_prd_audit.date
_pdbx_prd_audit.processing_site
_pdbx_prd_audit.action_type
PRD_900116 2020-05-08 RCSB "Create molecule"
PRD_900116 2020-07-29 RCSB "Initial release"
#
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment