|
The crystal structure of human deoxyhaemoglobin PDB ID 4HHB (image source: RCSB) |
-DPDB_DIR=/wherever/you/want/## Memory Consumption Talking about startup properties, it is also good to mention the fact that many PDB entries are large molecules and the default 64k memory allowance for Java applications is not sufficient in many cases. BioJava contains several built-in caches which automatically adjust to the available memory. As such, the more memory you grant your Java applicaiton, the better it can utilize the caches and the better the performance will be. Change the maximum heap space of your Java VM with this startup parameter:
-Xmx1G## A Quick 3D View If you have the *biojava-structure-gui* module installed, you can quickly visualise a [Structure](http://www.biojava.org/docs/api/org/biojava/nbio/structure/Structure.html) via this: ```java public static void main(String[] args) throws Exception { Structure struc = StructureIO.getStructure("4hhb"); StructureAlignmentJmol jmolPanel = new StructureAlignmentJmol(); jmolPanel.setStructure(struc); // send some commands to Jmol jmolPanel.evalString("select * ; color chain;"); jmolPanel.evalString("select *; spacefill off; wireframe off; cartoon on; "); jmolPanel.evalString("select ligands; cartoon off; wireframe 0.3; spacefill 0.5; color cpk;"); } ``` This will result in the following view:
|
The StructureAlignmentJmol class provides a wrapper for the Jmol viewer and provides a bridge to BioJava, so Structure objects can be sent to Jmol for visualisation. |