Patch to allow internal coordinates for icosahedral clusters


Click here for full thread
Just Got Here
Using NWChem for calculations on derivatives of polyhedral boron hydrides I found that the program always failed to construct redundant internal coordinates for icosahedral clusters. It complained about the number of the internal coordinates generated being absurdly large. The limit in geom/geom_hnd.F seems arbitrary to me, when I changed it arbitrarily two times up, NWChem started to generate internal coordinates for my molecules well (and now allows me, for example, to choose an internal coordinate to fix in geometry optimisation).


--- nwchem.orig/src/geom/geom_hnd.F     2014-09-10 18:11:03.000000000 +0000
+++ nwchem/src/geom/geom_hnd.F  2015-01-28 16:14:38.249027101 +0000
@@ -1644,7 +1644,7 @@ c
          nlnba=3*mxlnba
          if (.not. zdone) goto 55555 ! attempt to recover
 c
-         if (nzvar .gt. 10*(max(6,3*nat-6))) then
+         if (nzvar .gt. 20*(max(6,3*nat-6))) then
 c
 c     Made a z-matrix but it is asburdly big.  Nothing yet to fix this
 c


After a cursory look into the geometry of the icosahedron to understand why was the original NWChem limit on the number of internal coordinates too small for my species and how many of them I may actually need, I did not arrive to a definetive conclusion, let alone a limit less arbitrary, but I was tempted to simplify the patch a bit:

--- nwchem.orig/src/geom/geom_hnd.F     2014-09-10 18:11:03.000000000 +0000
+++ nwchem/src/geom/geom_hnd.F  2015-01-28 16:14:38.249027101 +0000
@@ -1644,7 +1644,7 @@ c
          nlnba=3*mxlnba
          if (.not. zdone) goto 55555 ! attempt to recover
 c
-         if (nzvar .gt. 10*(max(6,3*nat-6))) then
+         if (nzvar .gt. 42*nat) then
 c
 c     Made a z-matrix but it is asburdly big.  Nothing yet to fix this
 c