Subject: SUMMARY: MAXSHK in CHARMM

From: "Xiang(Simon) Wang" <[email-masked]>
Date: Fri, 29 Jun 2001 16:28:07 -0400 (EDT)

Dear CCLers:

I asked a question about SHAKE BONH within CHARMM several days ago. Thanks
for all the answers I've got. My original question is:

> 
> Dear CCLers:
> 
> I met the following ERROR message when running SHAKE BONH within a
> TIP3 droplet model:
> 
> CHARMM> SHAKE BONH
> SHKSET: *** ERROR *** NO. OF CONSTRAINTS 45091 IS LARGER THAN MAXSHK 45090
> *** LEVEL -2 WARNING *** BOMLEV IS -2
> 
> My version of Charmm is c25b2, compiled w/ large and FULL.

According to the answers, I modified the default setup of SHKSET by
reassigning MAXSHK number. Then I recompiled CHARMM after deleting the
lib files at /lib/sgi/. The problem is fixed. Following are the answers I
received. Thanks again.

------------------------------------------------------------------------
Rick Venable:

Either of the quick fixes below should work.

NOTE: MACH_TYPE is e.g. gnu sgi hpux etc.

        Quick Fix #1 
(1) change value for MAXSHK in PARAMETER statment in source/fcm/dimens.fcm 
(2) delete any existing libs in lib/MACH_TYPE 
(3) rerun install.com

        Quick Fix #2 
(1) edit pref.dat in build/MACH_TYPE, change LARGE to XLARGE 
(2) delete any existing libs in lib/MACH_TYPE 
(3) rerun install.com

------------------------------------------------------------------------
Dr. Rebecca Rone:

If the RTF for the TIP3 is does not have all of the required terms it will
cause this kind of error. Check on this.

------------------------------------------------------------------------
Guillaume Lamoureux:

It is probably exactly what the error message says: 

1. In file "source/fcm/dimens.fcm", change the value of the MAXSHK
   parameter to meet your needs. 
2. Recompile.
3. It should work.

------------------------------------------------------------------------
Marcin Krol:

The problem is that the number of shake constraints the program is able to
handle is MAXSHK=3/4*SIZE (SIZE=no. of atoms and is 60120 in your case if
you use LARGE version). That's why your CHARMM can handle 60120*0.75=45090
Go to ~/source/fcm/dimens.fcm and edit appropriate parameters (eg write
MAXSHK=SIZE). Unfortunately you must then recompile your CHARMM.

------------------------------------------------------------------------
Dr Tru Huynh:

You just need to recompile a bigger CHARMM version.

1)make a XLARGE version 
or 
2)modify line 26 of source/fcm/dimens.fcm
> from
      PARAMETER (LARGE=60120, MEDIUM=25140, SMALL=6120)
to
      PARAMETER (LARGE=100000, MEDIUM=25140, SMALL=6120)

----- extract of dimens.fcm ---- 
CHARMM Element source/fcm/dimens.fcm 1.1
C 
C This common file contains all useful dimensioning information. 
C
C----------------------------------------------------------------------- 
C    Standard Size parameters 
C 
C    XLARGE version - ~240,000 atoms 
C    LARGE  version -  ~60,000 atoms 
C    MEDIUM version -  ~25,000 atoms 
C    SMALL  version -   ~6,000 atoms 
C    XSMALL version -   ~2,000 atoms 
C    REDUCE version - A special version for non-virtual memory machines. 
C                     There is an attempt to greatly limit static memory.
C 
C    The actual size varies by machine type. 
C    It is listed in the header of the CHARMM output file. 
C
      INTEGER LARGE,MEDIUM,SMALL,REDUCE 
##IF QUANTA
      PARAMETER (LARGE=60000, MEDIUM=30000, SMALL=15000) 
##ELIF T3D
      PARAMETER (LARGE=30120, MEDIUM=20160, SMALL=6120) 
##ELSE
      PARAMETER (LARGE=60120, MEDIUM=25140, SMALL=6120) 
##ENDIF
      PARAMETER (REDUCE=15000)
      INTEGER SIZE 
##IF XLARGE
      PARAMETER (SIZE=LARGE*4) 
##ELIF LARGE
      PARAMETER (SIZE=LARGE) 
##ELIF MEDIUM
      PARAMETER (SIZE=MEDIUM) 
##ELIF REDUCE
      PARAMETER (SIZE=REDUCE) 
##ELIF SMALL
      PARAMETER (SIZE=SMALL) 
##ELIF XSMALL
      PARAMETER (SIZE=SMALL/3) 
##ENDIF 

<...>
C-----------------------------------------------------------
C  FROM:  shake.fcm 
C 
C  MAXSHK - The maximum number of SHAKE constraints. 
C
      INTEGER MAXSHK 
##IF XSMALL
      PARAMETER (MAXSHK = 20) 
##ELIF REDUCE
      PARAMETER (MAXSHK = 5120) 
##ELSE
      PARAMETER (MAXSHK = SIZE*3/4) 
##ENDIF 
C

-----------------------------------------------------------------------