rinikerlab / lightweight-registration

https://pubs.acs.org/doi/full/10.1021/acs.jcim.4c01133
MIT License
63 stars 14 forks source link

switch to using a SHA256 hash of the conformer string #51

Closed greglandrum closed 7 months ago

greglandrum commented 7 months ago

this is a simple one to avoid ENORMOUS conformer hashes

Provides a fix to one of the problems #50 was working around.

An existing conformer table can be modified in place to support working with this updated version of the hash:

alter table conformers add column c_hash_2 text;
update conformers set c_hash_2 = substring(sha256(conformer_hash::bytea)::text from 3);
alter table conformers drop column conformer_hash;
alter table conformers rename column c_hash_2 to conformer_hash;