@@ -61,7 +61,7 @@ public class PDBReaderTest extends SimpleChemObjectReaderTest {
61
61
62
62
@ BeforeClass
63
63
public static void setup () throws Exception {
64
- setSimpleChemObjectReader (new PDBReader (), "data/pdb /coffeine.pdb" );
64
+ setSimpleChemObjectReader (new PDBReader (), "org/openscience/cdk/io /coffeine.pdb" );
65
65
}
66
66
67
67
/**
@@ -129,8 +129,8 @@ public void testAccepts() {
129
129
130
130
@ Test
131
131
public void testPDBFileCoffein () throws Exception {
132
- String filename = "data/pdb/ coffeine.pdb" ;
133
- InputStream ins = this .getClass ().getClassLoader (). getResourceAsStream (filename );
132
+ String filename = "coffeine.pdb" ;
133
+ InputStream ins = this .getClass ().getResourceAsStream (filename );
134
134
135
135
ISimpleChemObjectReader oReader = new PDBReader (ins );
136
136
Assert .assertNotNull (oReader );
@@ -196,8 +196,8 @@ public void testPDBFileCoffein() throws Exception {
196
196
*/
197
197
@ Test
198
198
public void testProtein () throws Exception {
199
- String filename = "data/pdb/ Test-1crn.pdb" ;
200
- InputStream ins = this .getClass ().getClassLoader (). getResourceAsStream (filename );
199
+ String filename = "Test-1crn.pdb" ;
200
+ InputStream ins = this .getClass ().getResourceAsStream (filename );
201
201
202
202
ISimpleChemObjectReader reader = new PDBReader (ins );
203
203
Assert .assertNotNull (reader );
@@ -255,7 +255,7 @@ public IChemFile getChemFile(ISimpleChemObjectReader reader) throws Exception {
255
255
}
256
256
257
257
public IChemFile getChemFile (String filename , boolean useRebond ) throws Exception {
258
- InputStream ins = this .getClass ().getClassLoader (). getResourceAsStream (filename );
258
+ InputStream ins = this .getClass ().getResourceAsStream (filename );
259
259
return getChemFile (new PDBReader (ins ), useRebond );
260
260
}
261
261
@@ -304,8 +304,8 @@ public void testObjectCountsChemFile(IChemFile chemFile, int chemSequenceCount,
304
304
305
305
@ Test
306
306
public void test114D () throws Exception {
307
- String filename = "data/pdb/ 114D.pdb" ;
308
- InputStream ins = this .getClass ().getClassLoader (). getResourceAsStream (filename );
307
+ String filename = "114D.pdb" ;
308
+ InputStream ins = this .getClass ().getResourceAsStream (filename );
309
309
310
310
ISimpleChemObjectReader reader = new PDBReader (ins );
311
311
Assert .assertNotNull (reader );
@@ -363,7 +363,7 @@ public void test114D() throws Exception {
363
363
364
364
@ Test
365
365
public void testUnk () throws Exception {
366
- String filename = "data/pdb/ unk.pdb" ;
366
+ String filename = "unk.pdb" ;
367
367
IChemFile chemFile = getChemFile (filename );
368
368
IAtomContainer atomContainer = getFirstAtomContainer (chemFile , 1 , 1 , 1 );
369
369
Assert .assertEquals (5 , atomContainer .getAtomCount ());
@@ -374,7 +374,7 @@ public void testUnk() throws Exception {
374
374
375
375
@ Test
376
376
public void testHetatmOnly () throws Exception {
377
- String filename = "data/pdb/ hetatm_only.pdb" ;
377
+ String filename = "hetatm_only.pdb" ;
378
378
IChemFile chemFile = getChemFile (filename , true );
379
379
IAtomContainer atomContainer = getFirstAtomContainer (chemFile , 1 , 1 , 1 );
380
380
Assert .assertTrue (atomContainer instanceof IAtomContainer );
@@ -384,51 +384,51 @@ public void testHetatmOnly() throws Exception {
384
384
385
385
@ Test
386
386
public void test1SPX () throws Exception {
387
- String filename = "data/pdb/ 1SPX.pdb" ;
387
+ String filename = "1SPX.pdb" ;
388
388
IChemFile chemFile = getChemFile (filename );
389
389
testObjectCountsChemFile (chemFile , 1 , 1 , 1 , 1904 , 1 , 237 , 19 );
390
390
}
391
391
392
392
@ Test
393
393
public void test1XKQ () throws Exception {
394
- String filename = "data/pdb/ 1XKQ.pdb" ;
394
+ String filename = "1XKQ.pdb" ;
395
395
IChemFile chemFile = getChemFile (filename );
396
396
testObjectCountsChemFile (chemFile , 1 , 1 , 1 , 8955 , 4 , 1085 , 90 );
397
397
}
398
398
399
399
@ Test
400
400
public void test1A00 () throws Exception {
401
- String filename = "data/pdb/ 1A00.pdb" ;
401
+ String filename = "1A00.pdb" ;
402
402
IChemFile chemFile = getChemFile (filename );
403
403
testObjectCountsChemFile (chemFile , 1 , 1 , 1 , 4770 , 4 , 574 , 35 );
404
404
}
405
405
406
406
@ Test
407
407
public void test1BOQ () throws Exception {
408
- String filename = "data/pdb/ 1BOQ.pdb" ;
408
+ String filename = "1BOQ.pdb" ;
409
409
IChemFile chemFile = getChemFile (filename );
410
410
testObjectCountsChemFile (chemFile , 1 , 1 , 1 , 1538 , 1 , 198 , 21 );
411
411
}
412
412
413
413
@ Test
414
414
public void test1TOH () throws Exception {
415
- String filename = "data/pdb/ 1TOH.pdb" ;
415
+ String filename = "1TOH.pdb" ;
416
416
IChemFile chemFile = getChemFile (filename );
417
417
testObjectCountsChemFile (chemFile , 1 , 1 , 1 , 2804 , 1 , 325 , 23 );
418
418
}
419
419
420
420
@ Category (SlowTest .class )
421
421
@ Test
422
422
public void test1CKV () throws Exception {
423
- String filename = "data/pdb/ 1CKV.pdb" ;
423
+ String filename = "1CKV.pdb" ;
424
424
IChemFile chemFile = getChemFile (filename );
425
425
testObjectCountsChemFile (chemFile , 1 , 14 , 1 , 31066 , 1 , 141 , 9 );
426
426
}
427
427
428
428
@ Test
429
429
public void test1D66 () throws Exception {
430
- String filename = "data/pdb/ 1D66.pdb" ;
431
- InputStream ins = this .getClass ().getClassLoader (). getResourceAsStream (filename );
430
+ String filename = "1D66.pdb" ;
431
+ InputStream ins = this .getClass ().getResourceAsStream (filename );
432
432
433
433
ISimpleChemObjectReader reader = new PDBReader (ins );
434
434
Assert .assertNotNull (reader );
0 commit comments