Пример #1
0
  public static void main(String[] args) {

    String file = "/Users/ap3/tmp/4hhb.ce";

    try {
      BufferedReader in = new BufferedReader(new FileReader(file));
      StringBuffer xml = new StringBuffer();
      String str;
      while ((str = in.readLine()) != null) {
        xml.append(str);
      }
      in.close();

      AFPChain[] afps = AFPChainXMLParser.parseMultiXML(xml.toString());
      AFPChain afpChain = afps[0];

      UserConfiguration config = WebStartMain.getWebStartConfig();
      AtomCache cache = new AtomCache(config.getPdbFilePath(), config.isSplit());

      Atom[] ca1 = cache.getAtoms(afpChain.getName1());
      Atom[] ca2 = cache.getAtoms(afpChain.getName2());

      AFPChainXMLParser.rebuildAFPChain(afpChain, ca1, ca2);

      // StructureAlignment algorithm =
      // StructureAlignmentFactory.getAlgorithm(afpChain.getAlgorithmName());
      StructureAlignmentJmol jmol = StructureAlignmentDisplay.display(afpChain, ca1, ca2);

      DisplayAFP.showAlignmentImage(afpChain, ca1, ca2, jmol);

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Пример #2
0
  /** make sure all paths are initialized correctly */
  public static void checkPath() {

    UserConfiguration config = new UserConfiguration();
    path = config.getCacheFilePath();
  }