Skip to content

Commit 9fdf547

Browse files
authored
Merge pull request #32 from wsmorgan/master
Update to revision 1.0.6.
2 parents 21b04b7 + e476f43 commit 9fdf547

3,157 files changed

Lines changed: 28592 additions & 37 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.*~
33
\#*#
44
\#*
5+
.#*
56

67
# Unit Testing
78
staging/

HISTORY.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
# Revision History for `enumlib`
22

3+
## Revision 1.0.6
4+
5+
- The maximum allowed binomial, max_binomial in
6+
src/derivative_structure_generator.f90, had been set to
7+
2.63E14. This number was to large and allowed the code to enter the
8+
generate_permutation_labelings algorithm when it should have been
9+
entering the recursively_stabilized_enum algorithm. The max_binomial
10+
is now 1E10 to force the correct behavior.
11+
12+
- Updated the EXAMPLES to include an example of potential overflow
13+
issues with the calculation of large multinomials.
14+
15+
- Added unit tests for recursively_stabilized_enum in labeling_related.f90.
16+
17+
- Fixed a typo in labeling_related.f90, changed staus to status on line 361.
18+
319
## Revision 1.0.5
420

5-
-Fixed bug in makeStr.py, the lattice vectors in struct_enum.out were
6-
being treated as column and not row vectors.
21+
- Fixed bug in makeStr.py, the lattice vectors in struct_enum.out were
22+
being treated as column and not row vectors.
723

824
## Revision 1.0.4
925

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,3 @@ random distribution of the maximum fraction of the displacement
125125
specified by the `displace` flag.
126126

127127
If you have questions, email or call: gus.hart@gmail.com, 801-422-7444
128-
-2.31 KB
Binary file not shown.

src/__pycache__/msg.cpython-34.pyc

-4.83 KB
Binary file not shown.

src/derivative_structure_generator.f90

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ SUBROUTINE get_rotation_perms_lists(A,HNF,L,SNF,Op,RPlist,dperms,eps,aperms,use_
669669
tg = modulo(tg,spread(diag,2,n)) ! mod by the SNF entries to
670670
! bring it back to the "primitive" representation
671671
call find_permutation_of_group(g,tg,perm)
672-
tperms%perm(ig,:) = reshape(transpose(ident(:,perm)),(/n*nD/))
672+
tperms%perm(ig,:) = reshape(transpose(ident(:,perm)),(/n*nD/))
673673
enddo
674674

675675
RPlist(iH)%nL = size(rperms%perm,1)*n
@@ -1055,7 +1055,7 @@ SUBROUTINE get_sLV_fixing_operations(HNF,pLV,nD,rot,shift,dPerm,fixOp,rotPerm,de
10551055
real(dp), allocatable :: tv(:,:,:), degen_lattices(:,:,:)
10561056
integer, allocatable :: tIndex(:)
10571057
logical :: inList
1058-
1058+
10591059
nRot = size(rot,3)
10601060
allocate(tv(3,nD,nRot),tIndex(nRot),STAT=status); if(status/=0) stop "tv didn't allocate"
10611061
allocate(tmpOp%rot(3,3,nRot),tmpOp%shift(3,nRot))
@@ -1277,7 +1277,7 @@ SUBROUTINE gen_multilattice_derivatives(title, parLV, nDFull, dFull, k, nMin, nM
12771277
type(RotPermList), pointer :: aperms(:), rdaperms(:)
12781278
real(dp) :: max_binomial
12791279

1280-
max_binomial = 2.63E14
1280+
max_binomial = 1E10
12811281

12821282
! Divide the dset into members that are enumerated and those that are not
12831283
nD = count( (/(i,i=1,nDFull)/)==equivalencies)

src/labeling_related.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ SUBROUTINE generate_permutation_labelings(k,n,nD,perm,lab,iConc,parLabel,parDigi
361361
write(22,'(i4,8x,i3,10x,10(i2,1x))') iD,(iD-1)/n+1,E(iD,:)
362362
end do; write(22,*); close(22)
363363

364-
allocate(degeneracy_list(nL),STAT=staus )
364+
allocate(degeneracy_list(nL),STAT=status)
365365
if(status/=0) then
366366
write(*,*) "Allocation of 'degeneracy list' failed in generate_permutation_labelings"
367367
write(*,*) "This typically happens when the enumeration problem attempted"

src/labeling_related.xml

Lines changed: 180 additions & 30 deletions
Large diffs are not rendered by default.

support/EXAMPLES

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,3 +471,29 @@ Volume CPU #HNFs #SNFs #reduced % dups volTot RunT
471471
3 0.0048 13 1 3 0.7692 56 56
472472
---------------------------------------------------------------------------------------------
473473
**********************************************************************
474+
475+
**********************************************************************
476+
Ex. 7: Multinomial overflow.
477+
478+
In this example a common issue with the code is demonstrated. The
479+
issue is caused by the size restrictions on an integer within enumlib,
480+
the largest allowed integer is 1E18. If the user attempts to enumerate
481+
a system whose number of possible arrangements exceeds 1E18 it can
482+
cause the code to fail. An exmple system con be found in
483+
'overflow_struct_enum.in'.
484+
485+
**********************************************************************
486+
~/codes/enumlib/support/input> ../../src/enum.x overflow_struct_enum.in
487+
---------------------------------------------------------------------------------------------
488+
Calculating derivative structures for index n= 1 to 1
489+
Including only structures of which the concentration of each atom is in the range:
490+
Type: 1: 1/10--1/10
491+
Type: 2: 1/5--1/5
492+
Type: 3: 1/10--1/10
493+
Type: 4: 1/2--1/2
494+
Type: 5: 1/10--1/10
495+
Volume CPU #HNFs #SNFs #reduced % dups volTot RunTot
496+
At line 416 of file labeling_related.f90
497+
Fortran runtime error: Index '1' of dimension 1 of array 'lab' above upper bound of -7061685723885593328
498+
---------------------------------------------------------------------------------------------
499+
**********************************************************************
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
new
2+
bulk
3+
7.7402262688 0.0000000000 0.0000000000
4+
0.2415176718 7.7364573227 0.0000000000
5+
0.0000000000 0.0000000000 7.6185002327
6+
5
7+
40
8+
2.153688328 5.763660742 5.713875175 0
9+
5.903042627 1.895432081 5.713875175 0
10+
5.948814448 5.841025242 5.713875175 0
11+
1.957942478 1.972796580 5.713875175 0
12+
0.000000000 0.000000000 0.000000000 1
13+
3.990871970 3.868228661 0.000000000 1
14+
0.000000000 0.000000000 3.809250116 1
15+
3.990871970 3.868228661 3.809250116 1
16+
3.870113134 0.000000000 3.809250116 1
17+
0.120758836 3.868228661 3.809250116 1
18+
3.870113134 0.000000000 0.000000000 1
19+
0.120758836 3.868228661 0.000000000 1
20+
2.078701314 5.841025242 1.904625058 2
21+
5.828055612 1.972796580 1.904625058 2
22+
2.032929492 1.895432081 1.904625058 2
23+
6.023801463 5.763660742 1.904625058 2
24+
3.654554951 4.215208709 1.904625058 3/4
25+
7.403909250 0.346980047 1.904625058 3/4
26+
0.577834749 7.389477275 5.713875175 3/4
27+
4.327188989 3.521248614 5.713875175 3/4
28+
3.533796115 0.346980047 5.713875175 3/4
29+
7.524668086 4.215208709 5.713875175 3/4
30+
4.447947825 7.389477275 1.904625058 3/4
31+
0.457075855 3.521248614 1.904625058 3/4
32+
5.805169702 0.000000000 7.276429572 3/4
33+
2.055815403 3.868228661 7.276429572 3/4
34+
3.930492552 1.934114331 3.467179455 3/4
35+
0.181138254 5.802342992 3.467179455 3/4
36+
4.051251388 5.802342992 4.151320778 3/4
37+
0.060379418 1.934114331 4.151320778 3/4
38+
5.805169702 0.000000000 4.151320778 3/4
39+
2.055815403 3.868228661 4.151320778 3/4
40+
4.051251388 5.802342992 7.276429572 3/4
41+
0.060379418 1.934114331 7.276429572 3/4
42+
3.930492552 1.934114331 0.342070661 3/4
43+
0.181138254 5.802342992 0.342070661 3/4
44+
1.935056567 0.000000000 0.342070661 3/4
45+
5.925928537 3.868228661 0.342070661 3/4
46+
1.935056567 0.000000000 3.467179455 3/4
47+
5.925928537 3.868228661 3.467179455 3/4
48+
1 1
49+
0.01
50+
full
51+
#comment
52+
1 1 10
53+
1 1 5
54+
1 1 10
55+
1 1 2
56+
1 1 10

0 commit comments

Comments
 (0)