@@ -44,13 +44,7 @@ protected void setUp() throws IOException
4444 InputStream inStream = this .getClass ().getResourceAsStream ("/5pti.pdb" );
4545 assertNotNull (inStream );
4646
47-
4847 PDBFileParser pdbpars = new PDBFileParser ();
49- FileParsingParameters params = new FileParsingParameters ();
50- params .setAlignSeqRes (false );
51- params .setLoadChemCompInfo (false );
52-
53- pdbpars .setFileParsingParameters (params );
5448
5549 structure = pdbpars .parsePDBFile (inStream ) ;
5650
@@ -96,6 +90,10 @@ public void testGetCAAtoms(){
9690
9791 public void testGetAtomsConsistency () throws IOException , StructureException {
9892 AtomCache cache = new AtomCache ();
93+ FileParsingParameters params = new FileParsingParameters ();
94+ params .setLoadChemCompInfo (true );
95+ cache .setFileParsingParams (params );
96+
9997 Structure hivA = cache .getStructure ("1hiv.A" );
10098 Atom [] caSa = StructureTools .getRepresentativeAtomArray (hivA );
10199 Atom [] caCa = StructureTools .getRepresentativeAtomArray (hivA .getChain (0 ));
@@ -110,6 +108,7 @@ public void testGetAtomsConsistency() throws IOException, StructureException{
110108 assertEquals (caSa .length ,99 );
111109 assertEquals ("did not find the same number of Atoms in both chains..." ,
112110 caSa .length ,caCb .length );
111+ assertEquals (caSa .length , 99 );
113112 }
114113
115114 public void testGetNrAtoms (){
@@ -430,8 +429,16 @@ public void testCAmmCIF() throws StructureException {
430429 //mmCIF files left justify their atom names (eg "CA "), so can have different behavior
431430 AtomCache pdbCache = new AtomCache ();
432431 pdbCache .setUseMmCif (false );
432+ FileParsingParameters params = new FileParsingParameters ();
433+ params .setLoadChemCompInfo (true );
434+ pdbCache .setFileParsingParams (params );
435+
433436 AtomCache mmcifCache = new AtomCache ();
434437 mmcifCache .setUseMmCif (true );
438+ FileParsingParameters params2 = new FileParsingParameters ();
439+ params2 .setLoadChemCompInfo (true );
440+ mmcifCache .setFileParsingParams (params2 );
441+
435442
436443 Structure pdb =null , mmcif =null ;
437444
0 commit comments