def reindexstruct(structobj, startidx):
    """
    Reindexes residues per chain per model,
    directly modifies structobj

    Parameters
    ----------
    structobj: Bio.PDB.Structure.Structure
    startidx: int

    Returns
    -------
    structobj: Bio.PDB.Structure.Structure
    """
    for model in structobj: 
        for chain in model:
            count = startidx
            for resi in chain.get_residues():
                if resi.id[0] == ' ': 
                    resi._id = (' ', count, ' ')
                    count += 1
    return structobj