File tree Expand file tree Collapse file tree
biojava-structure/src/test/java/org/biojava/nbio/structure/redmine Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525import org .biojava .nbio .structure .*;
2626import org .biojava .nbio .structure .align .util .AtomCache ;
2727import org .biojava .nbio .structure .io .FileParsingParameters ;
28+ import org .biojava .nbio .structure .io .mmcif .ChemCompGroupFactory ;
29+ import org .biojava .nbio .structure .io .mmcif .ChemCompProvider ;
30+ import org .biojava .nbio .structure .io .mmcif .DownloadChemCompProvider ;
31+ import org .biojava .nbio .structure .io .mmcif .ReducedChemCompProvider ;
2832
2933/** test for https://redmine.open-bio.org/issues/3282
3034 *
@@ -41,7 +45,16 @@ public void test1DAR(){
4145 params .setLoadChemCompInfo (true );
4246
4347 cache .setFileParsingParams (params );
44-
48+
49+ boolean usingReducedChemCompProvider = false ;
50+
51+ ChemCompProvider ccp =ChemCompGroupFactory .getChemCompProvider ();
52+ if (ccp .getClass ().getName ().contains ("ReducedChemCompProvider" ) ) {
53+ usingReducedChemCompProvider = true ;
54+
55+ ChemCompGroupFactory .setChemCompProvider (new DownloadChemCompProvider ());
56+ }
57+
4558
4659 try {
4760 Structure struc = cache .getStructure ("1DAR" );
@@ -75,7 +88,8 @@ public void test1DAR(){
7588 }
7689
7790
78-
91+ if (usingReducedChemCompProvider )
92+ ChemCompGroupFactory .setChemCompProvider (ccp );
7993
8094 cache .setFileParsingParams (orig );
8195 }
You can’t perform that action at this time.
0 commit comments