You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: structure/mmcif.md
+11-8Lines changed: 11 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -12,22 +12,23 @@ The mmCIF file format has been around for some time (see [Westbrook 2000][] and
12
12
13
13
## The Basics
14
14
15
-
BioJava provides you with both a mmCIF parser and a data model that reads PDB and mmCIF files into a biological and chemically meaningful data model (BioJava supports the [Chemical Components Dictionary](mmcif.md)). If you don't want to use that data model, you can still use BioJava's file parsers, and more on that later, let's start first with the most basic way of loading a protein structure.
15
+
BioJava uses the [CIFTools-java](https://github.com/rcsb/ciftools-java) library to parse mmCIF. BioJava then has its own data model that reads PDB and mmCIF files
16
+
into a biological and chemically meaningful data model (BioJava supports the [Chemical Components Dictionary](mmcif.md)).
17
+
If you don't want to use that data model, you can still use the CIFTools-java parser, please refer to its documentation.
18
+
Let's start first with the most basic way of loading a protein structure.
16
19
17
20
18
21
## First Steps
19
22
20
-
The simplest way to load a PDB file is by using the [StructureIO](http://www.biojava.org/docs/api/org/biojava/nbio/structure/StructureIO.html) class.
23
+
The simplest way to load a PDBx/mmCIF file is by using the [StructureIO](http://www.biojava.org/docs/api/org/biojava/nbio/structure/StructureIO.html) class.
BioJava automatically downloaded the PDB file for hemoglobin [4HHB](http://www.rcsb.org/pdb/explore.do?structureId=4HHB) and copied it into a temporary location. This demonstrates two things:
31
+
BioJava automatically downloaded the PDB file for hemoglobin [4HHB](http://www.rcsb.org/pdb/explore.do?structureId=4HHB) and copied it into a temporary location. This demonstrates two things:
31
32
32
33
+ BioJava can automatically download and install files locally
33
34
+ BioJava by default writes those files into a temporary location (The system temp directory "java.io.tempdir").
@@ -38,9 +39,11 @@ If you already have a local PDB installation, you can configure where BioJava sh
38
39
-DPDB_DIR=/wherever/you/want/
39
40
</pre>
40
41
41
-
## From PDB to mmCIF
42
+
## Switching AtomCache to use different file types
42
43
43
-
By default BioJava is using the PDB file format for parsing data. In order to switch it to use mmCIF, we can take control over the underlying [AtomCache](http://www.biojava.org/docs/api/org/biojava/nbio/structure/align/util/AtomCache.html) which manages your PDB ([and btw. also SCOP, CATH](externaldb.md)) installations.
44
+
By default BioJava is using the BCIF file format for parsing data. In order to switch it to use mmCIF, we can take control over
45
+
the underlying [AtomCache](http://www.biojava.org/docs/api/org/biojava/nbio/structure/align/util/AtomCache.html) which
46
+
manages your PDB ([and btw. also SCOP, CATH](externaldb.md)) installations.
44
47
45
48
```java
46
49
AtomCache cache =newAtomCache();
@@ -59,7 +62,7 @@ By default BioJava is using the PDB file format for parsing data. In order to sw
59
62
System.out.println(structure.getChains().size());
60
63
```
61
64
62
-
As you can see, the AtomCache will again download the missing mmCIF file for 4HHB in the background.
65
+
See other supported file types in the `StructureFileType` enum.
0 commit comments