/usr/share/viewmol/readpqs is in viewmol 2.4.1-24+b1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | #!/bin/sh
#*******************************************************************************
# *
# Viewmol *
# *
# R E A D P Q S *
# *
# Copyright (c) Gabor Magyarfalvi, 1998 *
# *
#*******************************************************************************
#
# $Id: readpqs,v 1.1 2003/11/07 12:58:24 jrh Exp $
# $Log: readpqs,v $
# Revision 1.1 2003/11/07 12:58:24 jrh
# Initial revision
#
#
# readpqs is a script to read the output of PQS into viewmol
# Copyright © 1998 Gabor Magyarfalvi
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
if [ ! -f "$1" ]
then
echo "\$error noFile 1 \"$1\""
echo "\$end"
exit 1
fi
export LANG="C"
awk 'BEGIN {cycle=0;
readcoo=0;
readgra=0;
readfrq=0;
prevcoo=0;
nfreq=0;
i=0;
l=0;
na=0
}
/Coordinates \(Angstroms\)/ {readcoo=1;i=0;prevcoo=1}
/^ [1-9]|^ [1-9]|^ [1-9]/ {if (readcoo == 1)
{
coord[i,1]=$3;
coord[i,2]=$4;
coord[i,3]=$5;
coord[i++,4]=$2;
# printf("%d %d %10.6f %10.6f %10.6f \n",cycle,i,\
# coord[i-1,1],coord[i-1,2],coord[i-1,3]);
}
}
/^ Point Group/ {na=i;readcoo=0;i=0}
/force-x/{readgra=1; k=0}
/^ [1-9]|^ [1-9]|^[1-9]/ {if (readgra == 1 && prevcoo == 1 && k<na)
{
grad[k,1]=$3;
grad[k,2]=$4;
grad[k++,3]=$5;
# printf("%d %d %10.6f %10.6f %10.6f \n",cycle,k,\
# grad[k-1,1],grad[k-1,2],grad[k-1,3]);
gnorm+=$3*$3+$4*$4+$5*$5;
}
}
/^ Maximum Cartesian force/{readgra=0;norm=gnorm;gnorm=0.0;k=0;prevcoo=0}
/^ Energy is/ {energy=$3;
cycle++;
if (cycle == 1) printf("$grad\n");
printf(" cycle = %d energy =%18.10f |dE/dxyz| =%10.6f\n", cycle, energy, sqrt(norm));
for (j=0; j<na; j++)
{
printf("%22.14f%22.14f%22.14f %s\n", coord[j,1], coord[j,2], coord[j,3], coord[j,4]);
}
for (j=0; j<na; j++)
{
printf("%22.14f%22.14f%22.14f\n", grad[j,1], grad[j,2], grad[j,3]);
}
gnorm=0.0;
}
/^ \*\* VIBRATIONAL FREQUENCIES/ {printf("$vibrational spectrum\n")}
/^ Symmetry:/ {readfreq = 0;
l++;
ii=0;
for (m=1; m<NF; m++)
{
sym[m]=$(m+1);
if (sym[m]=="???") sym[m]="A1";
}
getline;
for (m=1; m<NF; m++)
{
freq[m]=$(m+1);
}
nfreq+=m-1;
}
/^ IR Intens:/ {for (m=1; m<NF; m++)
{
iri[m]=$(m+2)
}
}
/^ Raman Active:/ {for (m=1; m<NF-1; m++)
{
if ($(m+2)=="YES")
{ri[m]=1.0}
else {ri[m]=0.0}
printf("%s %10.1f %10.5f %10.5f\n", sym[m], freq[m], iri[m], ri[m]);
}
readfreq = 1;
}
/^[ A-z][A-z][ A-z] / {if (readfreq == 1)
{
for (j=0; (j+1)*3+1<=NF; j++)
{
for (m=0; m<3; m++)
{nm[3*(l-1)+j,ii+m]=$(3*j+m+2)}
}
ii=ii+3;
}
}
/^ Zero point vibrational energy/ {readfreq=0;
printf("$vibrational normal modes\n");
for (j=0; j<3*na; j++)
{
for (k=0; k<nfreq; k++)
{
if (k % 5 == 0)
{
if (k != 0) printf("\n");
printf("%d %d", j+1, j+1);
}
printf(" %10.6f", nm[k,j]);
}
printf("\n");
}
}
END {printf("$coord\n");
for (j=0; j<na; j++)
{
printf("%22.14f%22.14f%22.14f %s\n", coord[j,1], coord[j,2], coord[j,3], coord[j,4]);
}
printf("$end\n");}' "$1"
|