コード例 #1
0
ファイル: IDCreator.cs プロジェクト: roddickchen/NCDK
        private static void CreateIDsForChemFile(IChemFile file, List <string> tabuList)
        {
            if (tabuList == null)
            {
                tabuList = ChemFileManipulator.GetAllIDs(file).ToList();
            }

            if (null == file.Id)
            {
                chemFileCount = SetId(CHEMFILE_PREFIX, chemFileCount, file, tabuList);
            }

            if (policy == UniquePolicy.Object)
            {
                // start indices within a chem file always from 1
                chemSequenceCount = 0;
            }

            foreach (var chemSequence in file)
            {
                CreateIDsForChemSequence(chemSequence, tabuList);
            }
        }