public SimpleMMcifConsumer(){ params = new FileParsingParameters(); documentStart(); }
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); }
/** * Creates an instance of an AtomCache that is pointed to the a particular path in the file system. * * @param pdbFilePath * a directory in the file system to use as a location to cache files. * @param cachePath */ public AtomCache(String pdbFilePath, String cachePath) { logger.debug("Initialising AtomCache with pdbFilePath={}, cachePath={}",pdbFilePath, cachePath); if (!pdbFilePath.endsWith(FILE_SEPARATOR)) { pdbFilePath += FILE_SEPARATOR; } // we are caching the binary files that contain the PDBs gzipped // that is the most memory efficient way of caching... // set the input stream provider to caching mode System.setProperty(InputStreamProvider.CACHE_PROPERTY, "true"); setPath(pdbFilePath); this.cachePath = cachePath; fetchBehavior = FetchBehavior.DEFAULT; obsoleteBehavior = ObsoleteBehavior.DEFAULT; currentlyLoading.clear(); params = new FileParsingParameters(); setUseMmCif(false); setUseMmtf(true); }
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()); }
public PDBFileParser() { params = new FileParsingParameters();
public SandboxStyleStructureProvider() { params = new FileParsingParameters(); UserConfiguration config = new UserConfiguration(); setPath(config.getPdbFilePath()); }
/** * Subclasses should provide default and single-string constructors. * They should use {@link #addExtension(String)} to add one or more extensions. * * <p>If path is null, initialize using the system property/environment variable * {@link UserConfiguration#PDB_DIR}. * @param path Path to the PDB file directory */ public LocalPDBDirectory(String path) { extensions = new ArrayList<String>(); params = new FileParsingParameters(); if( path == null) { UserConfiguration config = new UserConfiguration(); path = config.getPdbFilePath(); logger.debug("Initialising from system property/environment variable to path: {}", path); } else { path = FileDownloadUtils.expandUserHome(path); logger.debug("Initialising with path {}", path); } this.path = new File(path); this.serverName = getServerName(); // Initialize splitDirURL,obsoleteDirURL,splitDirPath,obsoleteDirPath initPaths(); fetchBehavior = FetchBehavior.DEFAULT; obsoleteBehavior = ObsoleteBehavior.DEFAULT; }