def get_peptide_elements(templates_peptide, js):
    """
    The function return a list with compounds of core peptide chain.

    Parameters
    ----------
    templates_peptide : list
        List of atoms of peptide bonds
    js : dict
        Opend rBAN peptideGraph.json.
    Returns
    -------
    core_peptide_elements : list
        List of core peptide elements.
    """
    core_peptide_elements = []
    
    for tp in templates_peptide:
        for atom in js['atomicGraph']['atomicGraph']['atoms']:
            if atom['cdk_idx'] in tp:
                if atom['matchIdx'] in core_peptide_elements:
                    continue
                    
                core_peptide_elements.append(atom['matchIdx']) #Adding aminoacids
    return core_peptide_elements