July 1st, 2010 ********************* Ante_R.E.D.-1.4 ********************* Waiting for the first bug report... ********************* R.E.D.-III.4 ********************* July 14th, 2010 Problem: The scratch path defined in the "rungms" script of the GAMESS-US program is not found by R.E.D.-III.4 if an environment variable such as $USER is used in the path. For instance the /tmp/$USER path is not found even if the corresponding directory does exist (environment $USER variable points to "bill"), while /tmp/bill is found. This leads to the following error message: rungms [ OK ] gamess.01.x [ OK ] ddikick.x [ OK ] resp [ OK ] The Scratch directory defined for GAMESS is /tmp/$USER Scratch directory for GAMESS [ NOT FOUND ] Bug correction: Replace line 556 chomp($scrpath); chomp($punchfile); by chomp($scrpath=`ls -d $scrpath`); chomp($punchfile); Thanks to Karl N. Kirschner for reporting this problem. ------------------ October 16th, 2010 Problem: This is not a bug, but rather a new feature... When executing GAMESS-US using a PBS script on a UNIX cluster, one needs to generate multiple copies of the "rungms" script. Indeed, each PBS job requires a specific GAMESS scratch directory, which is is defined in the GAMESS "rungms" script. So far, R.E.D.-III.4 is not able to handle multiple copies of the "rungms" script. Correction: 1) First let's write a PBS script able to generate rungms$X scripts from a defined template (rungms.template): # This is a section of a PBS script (csh script) one could use # # Define where GAMESS-US is installed set GAMESSINSTALL = "/usr/local/gamess" # Define the GAMESS scratch directory - $PBS_JOBID is a PBS variable automatically incremented setenv GAMESS_SCRDIR /tmp/R.E.D.-$PBS_JOBID # Define the path to the GAMESS-US and resp binaries set path = ($path $GAMESSINSTALL /usr/local/resp) # Create a specific GAMESS "rungms$X" script for each PBS job set X = 1; set filegamess = "$GAMESSINSTALL/rungms"; while (-e $filegamess$X) @ X++; end # copy the rungms template into the effective "rungms$X" script cp -f $GAMESSINSTALL/rungms.template $GAMESSINSTALL/rungms$X # Save the name of this "rungms$X" file so that we can give this information to R.E.D. echo rungms$X > $GAMESSINSTALL/rungms.info # scr = /tmp/ZZZZZZ/ is defined in the rungms template; "ZZZZZZ" is just a set of characters found only once... perl -pi -e "s/ZZZZZZ/R.E.D.-$PBS_JOBID/g" $GAMESSINSTALL/rungms$X mkdir $GAMESS_SCRDIR perl RED-vIII.4.pl > R.E.D.-$PBS_JOBID.log rm -rf $GAMESS_SCRDIR 2) Then, R.E.D.-III.4 needs to read the "rungms.info" generated by the PBS script (to get information about the "rungms$X" script to use; i. e. the lastest rungms script generated) This is only implemented for UNIX operating systems (and not for Windows/Cygwin). Replace lines 359-382: if($CHR_TYP ne "DEBUG"){ open(STDERR,">/dev/null"); } if($CHR_TYP ne "DEBUG"){ open(OLDSTDOUT,">&STDOUT"); } # To change stdout if($CHR_TYP ne "DEBUG"){ open(STDOUT,">/dev/null"); } chomp($rungms=`which rungms`); #--- rungms --- if($CHR_TYP ne "DEBUG"){ open(STDOUT,">&OLDSTDOUT"); } # print "variable rungms = $rungms\n"; # Debugging... # Add "($rungms =~ m/printed message/ig)" if(($rungms =~ m/Command not found/ig)||($rungms =~ m/not in/ig)||($rungms =~ m/no rungms in/ig)||($rungms eq "")){ print "\t rungms \t\t\t\t\t\t\t[ NOT FOUND ]\n"; $verif=0; }else{ print "\t rungms \t\t\t\t\t\t\t[ OK ]\n"; } $gx=$hear=0; # If several GAMESS binaries are available, the smallest number is used (gamess.0$n.x) while(($gx<10) && ($hear==0)){ if($CHR_TYP ne "DEBUG"){ open(STDERR,">/dev/null"); } if($CHR_TYP ne "DEBUG"){ open(OLDSTDOUT,">&STDOUT"); } if($CHR_TYP ne "DEBUG"){ open(STDOUT,">/dev/null"); } chomp($gamessx=`which gamess.0$gx.x`); if($CHR_TYP ne "DEBUG"){ open(STDOUT,">&OLDSTDOUT"); } if(($gamessx =~ m/Command not found/ig)||($gamessx =~ m/not in/ig)||($gamessx =~ m/no gamess.0/ig)||($gamessx eq "")){ }else{ print"\t gamess.0$gx.x \t\t\t\t\t\t\t[ OK ]\n"; $hear=1; } $gx++; } $gx--; $gx="0".$gx; if($hear == 0){ print"\t gamess.0n.x (n = 0->9)\t\t\t\t\t[ NOT FOUND ]\n"; print"\t Rename \"gamess.version-nb.x\" into \"gamess.00.x\" ?\n"; $verif=0;} by (we need to reorder the code to first determine where GAMESS is installed) $gx=$hear=0; # If several GAMESS binaries are available, the smallest number is used (gamess.0$n.x) while(($gx<10) && ($hear==0)){ if($CHR_TYP ne "DEBUG"){ open(STDERR,">/dev/null"); } if($CHR_TYP ne "DEBUG"){ open(OLDSTDOUT,">&STDOUT"); } if($CHR_TYP ne "DEBUG"){ open(STDOUT,">/dev/null"); } chomp($gamessx=`which gamess.0$gx.x`); if($CHR_TYP ne "DEBUG"){ open(STDOUT,">&OLDSTDOUT"); } if(($gamessx =~ m/Command not found/ig)||($gamessx =~ m/not in/ig)||($gamessx =~ m/no gamess.0/ig)||($gamessx eq "")){} else{ print"\t gamess.0$gx.x \t\t\t\t\t\t\t[ OK ]\n"; $pathgamessus=dirname($gamessx); chomp($pathgamessus); $hear=1; } $gx++; } $gx--; $gx="0".$gx; if($hear == 0){ print"\t gamess.0n.x (n = 0->9)\t\t\t\t\t[ NOT FOUND ]\n"; print"\t Rename \"gamess.version-nb.x\" into \"gamess.00.x\" ?\n"; $verif=0; $pathgamessus="unknown"; } if($CHR_TYP ne "DEBUG"){ open(STDERR,">/dev/null"); } if($CHR_TYP ne "DEBUG"){ open(OLDSTDOUT,">&STDOUT"); } # To change stdout if($CHR_TYP ne "DEBUG"){ open(STDOUT,">/dev/null"); } # To use R.E.D./GAMESS on a UNIX cluster using a PBS script to handle multiple copies of the rungms$X script if (-e "$pathgamessus/rungms.info"){ open(INFO,"< $pathgamessus/rungms.info"); foreach(){ $temprungms=$_; } close(INFO); chomp($temprungms); chomp($rungms=`which $temprungms`); } else { chomp($rungms=`which rungms`); } if($CHR_TYP ne "DEBUG"){ open(STDOUT,">&OLDSTDOUT"); } # print "variable rungms = $rungms\n"; # Debugging... # Add "($rungms =~ m/printed message/ig)" if(($rungms =~ m/Command not found/ig)||($rungms =~ m/not in/ig)||($rungms =~ m/no rungms in/ig)||($rungms eq "")){ print "\t rungms \t\t\t\t\t\t\t[ NOT FOUND ]\n"; $verif=0; }else{ print "\t rungms \t\t\t\t\t\t\t[ OK ]\n"; } Thanks to Mike Schmidt for discussing about the use of GAMESS-US on a cluster... ------------------ November 3rd, 2010 Problem: With R.E.D.-III.4 charge reproducibility has been reinforced. We found out that if three linear atoms are involved in the rigid-body reorientation algorithm the corresponding molecular orientation is not fully controlled. This leads to RESP or ESP charge values, which are correct but not reproducible. This problem can be encountered for instance in Acetonitrile, Toluene or Benzene. See http://upjv.q4md-forcefieldtools.org/REDDB/error.php Consequently, a new routine has been incoporated in R.E.D.-III.4 to detect if the atoms involved in the rigid-body reorientation algorithm are aligned. Unfortunately, this code (lines 1718-1735) is not satisfying because it does not correctly detect the different cases when three atoms are aligned. Correction: The "verif_align" routine is replaced by a new code where the angle value is directly calculated. Replace lines 1718-1735 sub verif_align{ my ($atom1, $atom2, $atom3) = @_; $vect1[0]=($coord[0][$atom1][$NC][$NM]-$coord[0][$atom2][$NC][$NM]); #x $vect1[1]=($coord[1][$atom1][$NC][$NM]-$coord[1][$atom2][$NC][$NM]); #y $vect1[2]=($coord[2][$atom1][$NC][$NM]-$coord[2][$atom2][$NC][$NM]); #z $vect2[0]=($coord[0][$atom2][$NC][$NM]-$coord[0][$atom3][$NC][$NM]); #x $vect2[1]=($coord[1][$atom2][$NC][$NM]-$coord[1][$atom3][$NC][$NM]); #y $vect2[2]=($coord[2][$atom2][$NC][$NM]-$coord[2][$atom3][$NC][$NM]); #z if($vect1[0]==0) { $vect1[0]=0.000001; } if($vect1[1]==0) { $vect1[1]=0.000001; } if($vect1[2]==0) { $vect1[2]=0.000001; } $coef1=sprintf("%0.1f",$vect2[0]/$vect1[0]); $coef2=sprintf("%0.1f",$vect2[1]/$vect1[1]); $coef3=sprintf("%0.1f",$vect2[2]/$vect1[2]); if(($coef1==$coef2)&&($coef2==$coef3)) { $res=0; } else{ $res=1; } return $res; } by sub verif_align{ my ($atom1, $atom2, $atom3) = @_; $d12[0]= sqrt(($coord[0][$atom1][$NC][$NM]-$coord[0][$atom2][$NC][$NM])**2 + ($coord[1][$atom1][$NC][$NM]-$coord[1][$atom2][$NC][$NM])**2 + ($coord[2][$atom1][$NC][$NM]-$coord[2][$atom2][$NC][$NM])**2); $d23[0]= sqrt(($coord[0][$atom2][$NC][$NM]-$coord[0][$atom3][$NC][$NM])**2 + ($coord[1][$atom2][$NC][$NM]-$coord[1][$atom3][$NC][$NM])**2 + ($coord[2][$atom2][$NC][$NM]-$coord[2][$atom3][$NC][$NM])**2); $d13[0]= sqrt(($coord[0][$atom1][$NC][$NM]-$coord[0][$atom3][$NC][$NM])**2 + ($coord[1][$atom1][$NC][$NM]-$coord[1][$atom3][$NC][$NM])**2 + ($coord[2][$atom1][$NC][$NM]-$coord[2][$atom3][$NC][$NM])**2); $x[0]=int(rad2deg(acos(($d12[0]**2 + $d23[0]**2 - $d13[0]**2)/(2 * $d12[0] * $d23[0])))); if($d12[0]==0) { $d12[0]=0.000001; } if($d23[0]==0) { $d23[0]=0.000001; } if($d13[0]==0) { $d13[0]=0.000001; } $threshold=5; if (($x[0]>(0-$threshold) && $x[0]<(0+$threshold)) || ($x[0]>(180-$threshold) && $x[0]<(180+$threshold))) { $res=0; } else { $res=1; } return $res; } Thus, when three linear atoms are detected in the rigid-body reorientation algorithm the following warning is printed: MEP(s) is/are being computed for molecule 1 ... WARNING: In REMARK REORIENT atoms 2 7 1 are linear WARNING: In REMARK REORIENT atoms 1 7 2 are linear [ OK ] See the file(s) "JOB2-gau_m1-1-(X).log" The user has to modify the atoms involved in the rigid-body reorientation algorithm, and re-run the R.E.D. job if she/he wants to derive reproducible charge values. ********************* X_R.E.D.-III.4 ********************* Waiting for the first bug report... ********************* Tutorial ********************* Waiting for the first bug report... ********************* Scripts ********************* Waiting for the first bug report...