001/*
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 */
021package demo;
022
023import org.biojava.nbio.structure.align.util.AtomCache;
024import org.biojava.nbio.structure.scop.ScopDatabase;
025import org.biojava.nbio.structure.scop.ScopFactory;
026
027/** A demo for how to use the Berkeley version of SCOP instead of the default UK-SCOP
028 *
029 * @author andreas
030 * @since 3.0.4
031 *
032 */
033public class DemoBerkeleyScop {
034
035        public static void main(String[]args){
036
037
038                //ScopDatabase berkeley = new BerkeleyScopInstallation();
039
040                //ScopFactory.setScopDatabase(berkeley);
041
042                AtomCache cache = new AtomCache();
043                // whenever you want to get access to SCOP now request it like this:
044                ScopDatabase scop = ScopFactory.getSCOP("1.75");
045                ScopFactory.setScopDatabase(scop);
046
047
048                System.out.println(cache.getPath());
049                System.out.println(cache.getCachePath());
050                // ... and do something with it
051
052
053                // eg. you can run all the demos that work for the UK - SCOP (currently at version 1.75)
054                // this demo no automatically picks up the Berkeley version (currently 1.75A)
055                DemoSCOP scopDemo = new DemoSCOP();
056
057                scopDemo.getCategories();
058                scopDemo.printDomainsForPDB();
059                scopDemo.traverseHierarchy();
060                scopDemo.alignSuperfamily();
061
062
063        }
064}