Skip to content

Commit cee111c

Browse files
committed
Update mmcif.md
1 parent 2f83759 commit cee111c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

structure/mmcif.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,29 @@ By default BioJava is using the PDB file format for parsing data. In order to sw
6161

6262
As you can see, the AtomCache will again download the missing mmCIF file for 4HHB in the background.
6363

64+
## URL based parsing of files
65+
66+
StructureIO can also access files via URLs and fetch the data dynamically. E.g. the following code shows how to load a file from a remote server.
67+
68+
```java
69+
String u = "http://ftp.wwpdb.org/pub/pdb/data/biounit/mmCIF/divided/nw/4nwr-assembly1.cif.gz";
70+
try {
71+
Structure s = StructureIO.getStructure(u);
72+
73+
System.out.println(s);
74+
} catch (Exception e) {
75+
e.printStackTrace();
76+
}
77+
```
78+
79+
### Local URLs
80+
BioJava can also access local files, by specifying the URL as
81+
82+
<pre>
83+
file:///path/to/local/file
84+
</pre>
85+
86+
6487
## Low Level Access
6588

6689
If you want to learn how to use the BioJava mmCIF parser to populate your own data structure, let's first take a look this lower-level code:

0 commit comments

Comments
 (0)