def __getattribute__(self, attr):
    "Prevent 'private' attribute access"
    if (attr in ('make_rdm1s', 'spin_square', 'contract_2e', 'absorb_h1e')):
        raise AttributeError
    else:
        return object.__getattribute__(self, attr)
Prevent 'private' attribute access
def __getattribute__(self, attr):
    
    if (attr in ('make_rdm1s', 'spin_square', 'contract_2e', 'absorb_h1e')):
        raise AttributeError
    else:
        return object.__getattribute__(self, attr)