Calculate atomic composition of protein
NumberAtoms = atomiccomp(SeqAA)
Amino acid sequence. Enter a character string or vector of integers from the table Mapping Amino Acid Letter Codes to Integers. You can also enter a structure with the field Sequence.
NumberAtoms = atomiccomp(SeqAA) counts the type and number of atoms in an amino acid sequence (SeqAA) and returns the counts in a 1-by-1 structure (NumberAtoms) with fields C, H, N, O, and S.
Retrieve an amino acid sequence from the NCBI GenPept database.
rhodopsin = getgenpept('NP_000530');
Count the atoms in the sequence.
rhodopsinAC = atomiccomp(rhodopsin) rhodopsinAC = C: 1814 H: 2725 N: 423 O: 477 S: 25
Count the number of carbon atoms in the sequence.
rhodopsinAC.C ans = 1814