Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pdbId"></param>
        /// <returns></returns>
        public Dictionary <string, Dictionary <string, AtomInfo[]> > GetPdbBiolUnits(string pdbId, string[] nonMonomerBUs)
        {
            PdbBuGenerator pdbBuBuilder  = new PdbBuGenerator();
            string         zippedXmlFile = Path.Combine(ProtCidSettings.dirSettings.coordXmlPath, pdbId + ".xml.gz");
            string         xmlFile       = ParseHelper.UnZipFile(zippedXmlFile, ProtCidSettings.tempDir);
            //        Hashtable pdbBiolUnits = pdbBuBuilder.BuildPdbBusFromCoordFile(xmlFile, nonMonomerBUs, "ALL");
            Dictionary <string, Dictionary <string, AtomInfo[]> > pdbBiolUnits = pdbBuBuilder.BuildPdbBus(pdbId, nonMonomerBUs, false);

            if (pdbBiolUnits.Count == 0)
            {
                if (IsEntryNmrStructure(pdbId))
                {
                    Dictionary <string, Dictionary <string, AtomInfo[]> > asymUnitHash = GetAsymUnit(pdbId);
                    // the BuID is set to be 1 for NMR structure
                    // the NMR biological unit is same as asymunit
                    pdbBiolUnits.Add("1", asymUnitHash["0"]);
                }
            }
            File.Delete(xmlFile);
            return(pdbBiolUnits);
        }