/*
 *                    BioJava development code
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  If you do not have a copy,
 * see:
 *
 *      http://www.gnu.org/copyleft/lesser.html
 *
 * Copyright for this code is held jointly by the individual
 * authors.  These should be listed in @author doc comments.
 *
 * For more information on the BioJava project and its aims,
 * or to join the biojava-l mailing list, visit the home page
 * at:
 *
 *      http://www.biojava.org/
 *
 */
package demo;

import org.biojava.nbio.structure.Chain;
import org.biojava.nbio.structure.Group;
import org.biojava.nbio.structure.Structure;
import org.biojava.nbio.structure.align.util.AtomCache;
import org.biojava.nbio.structure.io.FileParsingParameters;
import org.biojava.nbio.structure.secstruc.SecStrucInfo;

public class DemoLoadSecStruc {
	
    public static void main(String[] args){

        try {
            FileParsingParameters params = new FileParsingParameters();
            params.setParseSecStruc(true);

            AtomCache cache = new AtomCache();
            cache.setFileParsingParams(params);
            cache.setUseMmCif(false);

            Structure s = cache.getStructure("4pti");

            for ( Chain c : s.getChains()) {
                for (Group g: c.getAtomGroups()){

                    if ( g.hasAminoAtoms() ){

                        SecStrucInfo ss = 
                        		(SecStrucInfo) g.getProperty(Group.SEC_STRUC);

                        System.out.println(c.getChainID() + 
                        		" " + g.getResidueNumber() + " " 
                        		+ g.getPDBName() + " " + ss);
                    }
                }
            }

        } catch (Exception e) {

            e.printStackTrace();
        }        
    }
}
@@ -607,16 +607,45 @@
  demo;%0A%0A
+import java.io.IOException;%0A%0A
 import o
@@ -763,16 +763,70 @@
 ucture;%0A
+import org.biojava.nbio.structure.StructureException;%0A
 import o
@@ -933,16 +933,71 @@
 meters;%0A
+import org.biojava.nbio.structure.secstruc.DSSPParser;%0A
 import o
@@ -1126,29 +1126,97 @@
 rgs)
+ %0A    %09%09throws IOException, StructureException 
 %7B
-%0A
 %0A    
+%09%0A
     
-try %7B
+%09String pdbID = %225pti%22;
 %0A    
+%09%0A
     
@@ -1275,32 +1275,89 @@
 rameters();%0A    
+    //Only change needed to the normal Structure loading%0A
         params.s
@@ -1378,22 +1378,45 @@
 c(true);
-%0A%0A    
+ //this is false as DEFAULT%0A%0A
         
@@ -1446,28 +1446,24 @@
 tomCache();%0A
-    
         cach
@@ -1498,28 +1498,24 @@
 s);%0A        
-    
 cache.setUse
@@ -1541,73 +1541,249 @@
     
-    Structure s = cache.getStructure(%224pti%22);%0A%0A            for ( 
+//The loaded Structure contains the SS assigned by Author%0A        Structure s = cache.getStructure(pdbID);%0A        %0A        //If the more detailed DSSP prediction is required call this%0A        DSSPParser.fetch(pdbID, s, true);%0A%0A        for (
 Chai
@@ -1813,28 +1813,24 @@
             
-    
 for (Group g
@@ -1848,28 +1848,24 @@
 Groups())%7B%0A%0A
-    
             
@@ -1872,17 +1872,16 @@
     if (
- 
 g.hasAmi
@@ -1893,17 +1893,12 @@
 ms()
- 
 )%7B%0A%0A
-    
     
@@ -1952,20 +1952,16 @@
         
- 
-   
 %09%09(SecSt
@@ -2022,20 +2022,16 @@
         
-    
 System.o
@@ -2079,20 +2079,16 @@
         
- 
-   
 %09%09%22 %22 + 
@@ -2135,20 +2135,16 @@
         
-    
 %09%09+ g.ge
@@ -2161,15 +2161,26 @@
  + %22
+:
  %22 + ss
+.getType()
 );%0A 
@@ -2186,36 +2186,32 @@
                 
-    
 %7D%0A              
@@ -2200,36 +2200,32 @@
   %7D%0A            
- 
-   
 %7D%0A            %7D%0A
@@ -2222,98 +2222,9 @@
     
-    %7D%0A%0A        %7D catch (Exception e) %7B%0A%0A            e.printStackTrace();%0A        %7D        
+%7D
 %0A   

Update DemoLoadSecStruc with new features