postgres btree index on large text column
You can use an exclusion constraint instead of a unique constraint:

alter table protein_seq add exclude using hash (sequence with =)


An exclusion constraint is much more general than a unique constraint, and allows you to exclude on things like overlapping ranges.  When you exclude "with =", it reduces to basically the same thing as a unique constraint, except it retains the flexibility to use a hash index.