/// <summary> /// Get the total number of atoms inside an IChemFile. /// </summary> /// <param name="file">The IChemFile object.</param> /// <returns>The number of Atom object inside.</returns> public static int GetAtomCount(IChemFile file) { int count = 0; for (int i = 0; i < file.Count; i++) { count += ChemSequenceManipulator.GetAtomCount(file[i]); } return(count); }
public void TestGetAtomCount_IChemSequence() { int count = ChemSequenceManipulator.GetAtomCount(chemSequence); Assert.AreEqual(6, count); }