X Tutup
Skip to content

Commit eacd1b1

Browse files
committed
Update caching.md
1 parent 4ff0be2 commit eacd1b1

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

structure/caching.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Local PDB Installations
22
=======================
33

4-
BioJava can automatically download and install most of the data files required. Those downloads
4+
BioJava can automatically download and install most of the data files that it needs. Those downloads
55
will happen only once. Future requests for the data file will re-use the local copy.
66

77
The main class that provides this functionality is the [AtomCache](http://www.biojava.org/docs/api/org/biojava/bio/structure/align/util/AtomCache.html).
@@ -39,3 +39,32 @@ An alternative is to hard-code the path in this way:
3939
cache.setPath("/path/to/pdb/files/");
4040
</pre>
4141

42+
## File Parsing Parameters
43+
44+
The AtomCache also provides access to configuring various options that are available during the
45+
parsing of files. The [FileParsingParameters](http://www.biojava.org/docs/api/org/biojava/bio/structure/io/FileParsingParameters.html)
46+
class is the main place to influence the level of detail and as a consequence the speed with which files can be loaded.
47+
48+
This example turns on the use of chemical components when loading a structure. (See also the [next chapter](chemcomp.md))
49+
50+
<pre>
51+
AtomCache cache = new AtomCache();
52+
53+
cache.setPath("/tmp/");
54+
55+
FileParsingParameters params = cache.getFileParsingParams();
56+
57+
params.setLoadChemCompInfo(true);
58+
59+
StructureIO.setAtomCache(cache);
60+
61+
Structure structure = StructureIO.getStructure("4hhb");
62+
63+
</pre>
64+
65+
66+
67+
68+
69+
70+

0 commit comments

Comments
 (0)
X Tutup