GLYCAM-Web / gmml

Glycam Molecular Modeling Library
GNU Lesser General Public License v3.0
4 stars 10 forks source link

Long sequences cause negative numbers for number of rotamers #142

Closed gitoliver closed 1 year ago

gitoliver commented 1 year ago

At gmml test level when I replace the sequence in test 010 std::string condensed_sequence = "DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-6DManpa1-OH"; I get: Number of likely shapes for this sequence is 0 Number of possible shapes for this sequence is -501334399 It's an overrun of whatever type we are using due to the 3(rotamers)^32(linkages).

Will first push a fix that converts this to an unsigned long long int type. But if possible I'll switch to passing up a string so I can check if number of linkages is >32 (arbitrary) then we can just report to user:

2^32.

gitoliver commented 1 year ago

Pushed a fix with unsigned long long int to gmml-test. May switch to string as more permanent solution if I get a green light

gitoliver commented 1 year ago

Fixed. Now displays >2^32 as a max.