# Load the monomers into memory
ethylenediamine = nlread('Ethylene_Glycol.hdf5', class_type=MoleculeConfiguration)[-1]
terephthalic_acid = nlread('Terephthalic_Acid.hdf5', class_type=MoleculeConfiguration)[-1]

# Create the polymer sequence with alternating monomers
# This is done by setting the diagonal elements of monomer_additions to zero,
# and the off-diagonal elements to 1.
sequence = PolymerSequence(
    [ethylenediamine, terephthalic_acid],
    number_of_monomers=40,
    number_of_chains=20,
    monomer_additions=[[0, 1], [1, 0]]
)
