コード例 #1
0
  @SuppressWarnings("unused")
  private static void demoStructureIO() {

    try {
      Structure s1 = StructureIO.getStructure("4hhb");

      Structure bioAssembly = StructureIO.getBiologicalAssembly("1stp", 1);

      // do something with them...
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #2
0
  public void loadStructureIO() {
    try {
      Structure s1 = StructureIO.getStructure("1gav");
      System.out.println(s1.getPDBCode() + " asym unit has nr atoms:");
      System.out.println(StructureTools.getNrAtoms(s1));

      Structure s2 = StructureIO.getBiologicalAssembly("1gav");
      System.out.println(s2.getPDBCode() + " biological assembly has nr atoms:");
      System.out.println(StructureTools.getNrAtoms(s2));

    } catch (Exception e) {
      e.printStackTrace();
    }
  }