@Override public Structure getStructure(InputStream inStream) throws IOException { PDBFileParser pdbpars = new PDBFileParser(); pdbpars.setFileParsingParameters(getFileParsingParameters()); Structure struc = pdbpars.parsePDBFile(inStream) ; return struc ; }
private void addBonds() { BondMaker maker = new BondMaker(structure, params); maker.makeBonds(); maker.formBondsFromStructConn(structConn); }
public void setFileParsingParameters(FileParsingParameters params) { this.params= params; // set the correct max values for parsing... loadMaxAtoms = params.getMaxAtoms(); atomCAThreshold = params.getAtomCaThreshold(); }
@Override public SSBondImpl clone() { SSBondImpl nbond = new SSBondImpl(); nbond.setChainID1(chainID1); nbond.setChainID2(chainID2); nbond.setResnum1(resnum1); nbond.setResnum2(resnum2); return nbond; }
public static void main(String[] args) throws Exception { MMTFFileReader reader = new MMTFFileReader(); FileParsingParameters params = new FileParsingParameters(); reader.setFileParsingParameters(params); Structure struc = reader.getStructureById("1m4x"); System.out.println(struc); }
/** * Utility method that employs some heuristics to find the {@link EntityInfo}s * for the polymeric chains given in constructor. * To be used in case the information is missing in PDB/mmCIF file * @return */ public static List<EntityInfo> findPolyEntities(List<List<Chain>> polyModels) { TreeMap<String,EntityInfo> chainIds2entities = findEntitiesFromAlignment(polyModels); List<EntityInfo> entities = findUniqueEntities(chainIds2entities); return entities; }
/** {@inheritDoc} */ @Override public String toMMCIF() { FileConvert f = new FileConvert(this); return f.toMMCIF(); }
@Override public Structure getStructureById(String pdbId) throws IOException { InputStream inStream = getInputStream(pdbId); return getStructure(inStream); }
@Override public String toSDF() { // Function to return the SDF of a given strucutre GroupToSDF gts = new GroupToSDF(); return gts.getText(this); }
/** {@inheritDoc} */ @Override public String toPDB() { FileConvert f = new FileConvert(this) ; return f.toPDB(); }
public SandboxStyleStructureProvider() { params = new FileParsingParameters(); UserConfiguration config = new UserConfiguration(); setPath(config.getPdbFilePath()); }
@Override public String toPDB() { return FileConvert.toPDB(this); }
/** * Constructs a new {@link MMTFFileReader}, initializing the extensions member variable. * The path is initialized to the given path, both autoFetch and splitDir are initialized to false. */ public MMTFFileReader(String path) { super(path); addExtension(".mmtf"); addExtension(".mmtf.gz"); }
/** * Constructs a new PDBFileReader, initializing the extensions member variable. * The path is initialized to the given path, both autoFetch and splitDir are initialized to false. */ public MMCIFFileReader(String path){ super(path); addExtension(".cif"); addExtension(".mmcif"); addExtension(".cif.gz"); addExtension(".mmcif.gz"); }
/** * Creates disulfide bond objects and references in the corresponding Atoms objects, given * a list of {@link SSBondImpl}s parsed from a PDB/mmCIF file. * @param disulfideBonds */ public void formDisulfideBonds(List<SSBondImpl> disulfideBonds) { for (SSBondImpl disulfideBond : disulfideBonds) { formDisulfideBond(disulfideBond); } }
protected boolean checkFileExists(String pdbId){ try { File path = getLocalFile(pdbId); if ( path != null) return true; } catch(IOException e) {} return false; }
/** * Add the charges to the Structure */ private void addCharges() { ChargeAdder.addCharges(structure); }
private static void initServerName() { if (serverName==null) { serverName = LocalPDBDirectory.getServerName(); } }
@Override public String toPDB() { return FileConvert.toPDB(this); }
@Override public void toPDB(StringBuffer buf) { FileConvert.toPDB(this,buf); }