public static void main(String[] args){ String file = "/Users/andreas/WORK/PDB/mmCif/a9/1a9n.cif.gz"; //String file = "/Users/andreas/WORK/PDB/MMCIF/1gav.mmcif"; //String file = "/Users/andreas/WORK/PDB/MMCIF/100d.cif"; //String file = "/Users/andreas/WORK/PDB/MMCIF/1a4a.mmcif"; System.out.println("parsing " + file); StructureIOFile pdbreader = new MMCIFFileReader(); try { Structure s = pdbreader.getStructure(file); System.out.println(s); // convert it to a PDB file... System.out.println(s.toPDB()); } catch (IOException e) { e.printStackTrace(); } }
public static void main(String[] args) throws Exception { MMCIFFileReader reader = new MMCIFFileReader(); FileParsingParameters params = new FileParsingParameters(); reader.setFileParsingParameters(params); Structure struc = reader.getStructureById("1m4x"); System.out.println(struc); System.out.println(struc.toPDB()); }
reader = new PDBFileReader(); } else if ( fileFormat.equals(UserConfiguration.MMCIF_FORMAT)){ reader = new MMCIFFileReader(); } else { throw new StructureException("Unkown file format " + fileFormat);
protected Structure loadStructureFromCifByPdbId(String pdbId) throws IOException, StructureException { logger.debug("Loading structure {} from mmCIF file {}.", pdbId, path); Structure s; flagLoading(pdbId); try { MMCIFFileReader reader = new MMCIFFileReader(path); reader.setFetchBehavior(fetchBehavior); reader.setObsoleteBehavior(obsoleteBehavior); reader.setFileParsingParameters(params); s = reader.getStructureById(pdbId.toLowerCase()); } finally { flagLoadingFinished(pdbId); } return s; }