Skip to content

Commit dc4d2da

Browse files
committed
now also with StructureIO example
1 parent 12db1db commit dc4d2da

2 files changed

Lines changed: 27 additions & 3 deletions

File tree

_wikis/BioJava:CookBook:PDB:read3.0.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: BioJava:CookBook:PDB:read3.0
44

55
### How do I read a PDB file?
66

7-
The easiest way - AtomCache
8-
---------------------------
7+
The easiest way - AtomCache and StructureIO
8+
-------------------------------------------
99

1010
The easiest way is to use the AtomCache class for accessing PDB files:
1111
<java>
@@ -28,6 +28,18 @@ The easiest way is to use the AtomCache class for accessing PDB files:
2828

2929
</java>
3030

31+
As of BioJava 3.0.5 there is also a new StructureIO utility class.
32+
<java> import org.biojava3.structure.StructureIO;
33+
34+
`           Structure s1 = StructureIO.getStructure("4hhb");`
35+
36+
`           Structure bioAssembly = StructureIO.getBiologicalAssembly("1stp",1);`
37+
38+
`           // set the PDB path in StructureIO`
39+
`           StructureIO.setPdbPath("/tmp/");`
40+
41+
</java>
42+
3143
Getting more control
3244
--------------------
3345

_wikis/BioJava:CookBook:PDB:read3.0.mediawiki

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
=== How do I read a PDB file? ===
22

3-
== The easiest way - AtomCache ==
3+
== The easiest way - AtomCache and StructureIO ==
44

55
The easiest way is to use the AtomCache class for accessing PDB files:
66
<java>
@@ -21,6 +21,18 @@ The easiest way is to use the AtomCache class for accessing PDB files:
2121
}
2222
</java>
2323

24+
As of BioJava 3.0.5 there is also a new StructureIO utility class.
25+
<java>
26+
import org.biojava3.structure.StructureIO;
27+
28+
Structure s1 = StructureIO.getStructure("4hhb");
29+
30+
Structure bioAssembly = StructureIO.getBiologicalAssembly("1stp",1);
31+
32+
// set the PDB path in StructureIO
33+
StructureIO.setPdbPath("/tmp/");
34+
</java>
35+
2436
== Getting more control ==
2537

2638
BioJava provides a PDB file parser, that reads the content of a PDB file into a flexible data model for managing protein structural data. It is possible to

0 commit comments

Comments
 (0)