public void setStructure ( Structure s ) { if ( jmolPanel == null ) { logger . error ( "please install Jmol first" ) ; return ; } setTitle ( s . getPDBCode ( ) ) ; jmolPanel . setStructure ( s ) ; // actually this is very simple // just convert the structure to a PDB file //String pdb = s.toPDB(); //System.out.println(s.isNmr()); //System.out.println(pdb); // Jmol could also read the file directly from your file system //viewer.openFile("/Path/To/PDB/1tim.pdb"); //System.out.println(pdb); //jmolPanel.openStringInline(pdb); // send the PDB file to Jmol. // there are also other ways to interact with Jmol, // e.g make it directly // access the biojava structure object, but they require more // code. See the SPICE code repository for how to do this. structure = s ; }
Set a new Structure to visualize in the AlignmentJmol window .