msg-byu / enumlib

Derivative structure enumeration library
MIT License
59 stars 34 forks source link

Exit gracefully when index is out of range #69

Closed afonari closed 6 years ago

afonari commented 6 years ago

Related to: https://github.com/msg-byu/enumlib/issues/67

Example from the #67 now exits as:

~/enumlib/src/enum.x enumerate_periodic.in
---------------------------------------------------------------------------------------------
Calculating derivative structures for index n= 1 to  1
Including only structures of which the concentration of each atom is in the range:
Type: 1: 4/76--4/76
Type: 2: 16/76--16/76
Type: 3: 25/76--25/76
Type: 4: 3/76--3/76
Type: 5: 20/76--20/76
Type: 6: 8/76--8/76
Volume       CPU        #HNFs  #SNFs    #reduced    % dups      volTot      RunTot
Original d-set member was not inside the unit cell. It has been remapped.
Original:  9.396   5.593   6.760
Remapped: -0.034   5.593   6.760
Original d-set member was not inside the unit cell. It has been remapped.
Original:  9.396   8.319   6.760
Remapped: -0.034   8.319   6.760
Index is too large (integer cannot fit it)
glwhart commented 6 years ago

I made the changes myself and then pushed them. See #67