/** * Set up the configuration parameters for BioJava. */ public static AtomCache setUpBioJava() { // Set up the atom cache etc AtomCache cache = new AtomCache(); cache.setUseMmCif(true); FileParsingParameters params = cache.getFileParsingParams(); params.setCreateAtomBonds(true); params.setAlignSeqRes(true); params.setParseBioAssembly(true); DownloadChemCompProvider cc = new DownloadChemCompProvider(); ChemCompGroupFactory.setChemCompProvider(cc); cc.checkDoFirstInstall(); cache.setFileParsingParams(params); StructureIO.setAtomCache(cache); return cache; }
/** * Set up the configuration parameters for BioJava. * @param extraUrl the string describing the URL (or file path) from which * to get missing CCD entries. */ public static AtomCache setUpBioJava(String extraUrl) { // Set up the atom cache etc AtomCache cache = new AtomCache(); cache.setUseMmCif(true); FileParsingParameters params = cache.getFileParsingParams(); params.setCreateAtomBonds(true); params.setAlignSeqRes(true); params.setParseBioAssembly(true); DownloadChemCompProvider.serverBaseUrl = extraUrl; DownloadChemCompProvider.useDefaultUrlLayout = false; DownloadChemCompProvider cc = new DownloadChemCompProvider(); ChemCompGroupFactory.setChemCompProvider(cc); cc.checkDoFirstInstall(); cache.setFileParsingParams(params); StructureIO.setAtomCache(cache); return cache; }