CCL:G: Gausian 09 Easiest way to subtract structures/coordinates



Dear Anjan,
 Here is a perl script I wrote some time ago to do that.
 Cheers,
 René
 #! /usr/bin/perl
 ###############################################
 # script to take a gaussian log file output and generate structure
 # information (cartesian) for a new structure with a displacement
 # along a frequency coordinate in the direction along the '-v' vibration
 # for a displacement of '-d' times the vibrational vector
 #
 # command line arguments:
 #
 # -h        : prints help and quits.
 # -d float  : displacement along vibrational mode default 0.1
 # -v int    : vibration number to use default 1
 # required : filename (only sees last one)
 ################################################
 #
 $test = 0;  # for debugging purposes (prints out extra stuff)
 # set up the defaults
 $vibration = 1;
 $displacement = 0.1;
 $file = "";
 # 'constants' not using the 'use constant NAME => value;' method.
 $C_STRUCTURE = "Standard orientation:";
 $C_ENDSTRUCTURE = "---------";
 $C_FREQUENCY = "Frequencies --";
 while ($#ARGV >= 0) {
   if ($ARGV[0] eq "-d")    { $displacement = $ARGV[1]; shift /a\ARGV;
 }
   elsif ($ARGV[0] eq "-v") { $vibration = $ARGV[1]; shift /a\ARGV; }
   elsif ($ARGV[0] eq "-h") { &usage(); exit;}
   else { $file = $ARGV[0];}
   shift /a\ARGV;
 }
 if ($file eq "") { &usage(); exit;}
 open(IN,$file) || die "Could not open file '$file'.\n";
 while (1) {
   # read until I get a structure (should happen first) or a frequency
   until ($_ = <IN>, $_ =~ /$C_STRUCTURE/ or $_ =~ /$C_FREQUENCY/ or eof) {
 }
   if ($_ =~ /$C_STRUCTURE/) {  # READ THE STRUCTURE
     $nat = -1;   # reset the atom index counter : only need last structure
     $at = ();    # clear out the arrays of atomnumber, x, y and z
     $x = ();
     $y = ();
     $z = ();
     skiplines(4); # position read line to first atom in the list
     while ($_ = <IN> and not $_ =~ /$C_ENDSTRUCTURE/ ) {
       /a\tokens = split(' ', $_);
       $nat++;
       $at[$nat] = $tokens[1];
       $xind = $#tokens - 2; # needed if the atomic type is missing (happens
 sometimes).
       $x[$nat] = $tokens[$xind];
       $y[$nat] = $tokens[$xind+1];
       $z[$nat] = $tokens[$xind+2];
     }
   } elsif ($_ =~ /$C_FREQUENCY/) { # READ THE FREQUENCY INFORMATION
     # since there are three vibrations per line, I can determine how
     # many of these I need to skip before I can read the frequency I need.
     $skipsize = 4 + ($nat+1) + 3;  # skip rest header, vibrations and start
 header
     for ($i=0; $i<int($vibration/3); $i++) { skiplines($skipsize); }
     skiplines(4);
     $xind = 2 + (($vibration-1) % 3) * 3; # position in the tokens of vib vector
     if ($test eq 1) { print "vibration = $vibration, xind = $xind\n";
 }
     for ($i=0;$i<=$nat;$i++) {
       $_ = <IN>;
       /a\tokens = split(' ',$_);
       if ($test eq 1 ) {
         print "input $_";
         print "($x[$i],$y[$i],$z[$i]) + $displacement x
 ($tokens[$xind],$tokens[$xind+1],$tokens[$xind+2])\n";
       }
       printf "%4d  % .6f  % .6f  % .6f\n",$at[$i],
 $x[$i]+$displacement*$tokens[$xind], $y[$i]+$displacement*$tokens[$xind+1],
 $z[$i]+$displacement*$tokens[$xind+2];
     }
     exit; # AND WE ARE DONE!!!!
   } elsif (eof) { close IN; exit; }
 }
 ##################################################
 # skiplines : argument n: number of lines to skip
 ##################################################
 sub skiplines {
   local $n, $i;
   $n = shift(/a\_);
   for ($i=0;$i<$n;$i++) { <IN> || die "skiplines encountered
 EOF."; }
 }
 ##################################################
 # usage prints a message about how to use sp2g03
 ##################################################
 sub usage {
 print <<ENDUSAGE;
 Usage: nfreq [-h] [-d displacement] [-v vibrationnnumber] filename
 -d : displacement step along vibrational mode default 0.1
 -v : index of vibrational mode to follow default 1
 -h : prints this help
 Will create the structure '-d' along the '-v'th vibrational mode of the
 stucture.
 ENDUSAGE
 }
 On May 8, 2013, at 3:58 PM, Anjan Roy aroy6|,|uic.edu wrote:
 Sent to CCL by: "Anjan  Roy" [aroy6!^!uic.edu]
 Hello,
 My Gaussian 09 opimization returns a negative frequency, one solution suggested
 was to distort the molecule in the direction if the negative freq motion. Could
 someone kindly suggest how I can do this by subtracting structures in the
 command line or by way of a GUI.
 thank you
 Anjan
 -= This is automatically added to each message by the mailing script =-E-mail to
 subscribers: CHEMISTRY/a\ccl.net<mailto:CHEMISTRY/a\ccl.net> or use:E-mail to administrators:
 CHEMISTRY-REQUEST/a\ccl.net<mailto:CHEMISTRY-REQUEST/a\ccl.net> or usehttp://www.ccl.net/chemistry/sub_unsub.shtmlhttp-:-//www.ccl.net/spammers.txt--_000_A526E77202134A69BCAE22C6E72F66BDrichmondedu_
 Content-Type: text/html; charset="iso-8859-1"
 Content-ID: <277B10532EB38B4F9EA0BEACC3051E88/a\exchange.richmond.edu>
 Content-Transfer-Encoding: quoted-printable
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;
 charset=iso-8859-1">
 </head>
 <body style="word-wrap: break-word; -webkit-nbsp-mode: space;
 -webkit-line-break: after-white-space; ">
 Dear Anjan,
 <div><br>
 </div>
 <div>Here is a perl script I wrote some time ago to do that.</div>
 <div><br>
 </div>
 <div>Cheers,</div>
 <div>René</div>
 <div><br>
 <div><span class="Apple-style-span" style="orphans: 2;
 text-indent: 0px; widows: 2; -webkit-text-decorations-in-effect: none;
 "><span class="Apple-style-span" style="orphans: 2;
 text-indent: 0px; widows: 2; -webkit-text-decorations-in-effect: none;
 ">
 <div style="word-wrap: break-word; -webkit-nbsp-mode: space;
 -webkit-line-break: after-white-space; ">
 <div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <div style="border-collapse: separate; color: rgb(0, 0, 0); font-family:
 Helvetica; font-size: 12px; font-style: normal; font-variant: normal;
 font-weight: normal; letter-spacing: normal; line-height: normal;
 text-transform: none; white-space: normal; word-spacing: 0px;
 -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px;
 -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; margin-top: 0px;
 margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">
 <br>
 </div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">#! /usr/bin/perl</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">###############################################</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"># script to take a gaussian log file output and generate
 structure</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"># information (cartesian) for a new structure with a
 displacement</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"># along a frequency coordinate in the direction along the
 '-v' vibration</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"># for a displacement of '-d' times the vibrational
 vector</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">#</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"># command line arguments:</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">#</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"># -h &nbsp; &nbsp; &nbsp; &nbsp;: prints
 help and quits.</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"># -d float &nbsp;: displacement along vibrational mode
 default 0.1</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"># -v int &nbsp; &nbsp;: vibration number to use
 default 1</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"># required : filename (only sees last
 one)</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">################################################</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"><br>
 </font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">#</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">$test = 0; &nbsp;# for debugging purposes (prints out
 extra stuff)</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"><br>
 </font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"># set up the defaults</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">$vibration = 1;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">$displacement = 0.1;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">$file = &quot;&quot;;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"><br>
 </font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"># 'constants' not using the 'use constant NAME =&gt;
 value;' method.</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">$C_STRUCTURE = &quot;Standard
 orientation:&quot;;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">$C_ENDSTRUCTURE =
 &quot;---------&quot;;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">$C_FREQUENCY = &quot;Frequencies
 --&quot;;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"><br>
 </font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">while ($#ARGV &gt;= 0) {</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; if ($ARGV[0] eq &quot;-d&quot;)
 &nbsp; &nbsp;{ $displacement = $ARGV[1]; shift /a\ARGV;
 }</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; elsif ($ARGV[0] eq &quot;-v&quot;) {
 $vibration = $ARGV[1]; shift /a\ARGV; }</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; elsif ($ARGV[0] eq &quot;-h&quot;) {
 &amp;usage(); exit;}</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; else { $file =
 $ARGV[0];}</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; shift /a\ARGV;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">}</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"><br>
 </font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">if ($file eq &quot;&quot;) { &amp;usage();
 exit;}</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"><br>
 </font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">open(IN,$file) || die &quot;Could not open file
 '$file'.\n&quot;;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"><br>
 </font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">while (1) {</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; # read until I get a structure (should happen
 first) or a frequency</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; until ($_ = &lt;IN&gt;, $_ =~
 /$C_STRUCTURE/ or $_ =~ /$C_FREQUENCY/ or eof) { }</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; if ($_ =~ /$C_STRUCTURE/) { &nbsp;# READ
 THE STRUCTURE</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; $nat = -1; &nbsp; # reset the
 atom index counter : only need last structure</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; $at = (); &nbsp; &nbsp;#
 clear out the arrays of atomnumber, x, y and z</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; $x = ();</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; $y = ();</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; $z = ();</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; skiplines(4); # position read line
 to first atom in the list</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; while ($_ = &lt;IN&gt; and
 not $_ =~ /$C_ENDSTRUCTURE/ ) {</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp; /a\tokens = split(' ',
 $_);</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp;
 $nat&#43;&#43;;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp; $at[$nat] =
 $tokens[1];</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp; $xind = $#tokens - 2; #
 needed if the atomic type is missing (happens
 sometimes).</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp; $x[$nat] =
 $tokens[$xind];</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp; $y[$nat] =
 $tokens[$xind&#43;1];</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp; $z[$nat] =
 $tokens[$xind&#43;2];</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; }</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; } elsif ($_ =~ /$C_FREQUENCY/) { # READ THE
 FREQUENCY INFORMATION</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; # since there are three vibrations
 per line, I can determine how</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; # many of these I need to skip
 before I can read the frequency I need.</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; $skipsize = 4 &#43;
 ($nat&#43;1) &#43; 3; &nbsp;# skip rest header, vibrations and start
 header</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; for ($i=0;
 $i&lt;int($vibration/3); $i&#43;&#43;) { skiplines($skipsize);
 }</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp;&nbsp;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp;
 skiplines(4);</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; $xind = 2 &#43; (($vibration-1)
 % 3) * 3; # position in the tokens of vib vector</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; if ($test eq 1) { print
 &quot;vibration = $vibration, xind = $xind\n&quot;;
 }</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; for
 ($i=0;$i&lt;=$nat;$i&#43;&#43;) {</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp; $_ =
 &lt;IN&gt;;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp; /a\tokens = split('
 ',$_);</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp; if ($test eq 1 )
 {</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp; &nbsp; print
 &quot;input $_&quot;;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp; &nbsp; print
 &quot;($x[$i],$y[$i],$z[$i]) &#43; $displacement x
 ($tokens[$xind],$tokens[$xind&#43;1],$tokens[$xind&#43;2])\n&quot;;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp;
 }</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; &nbsp; printf &quot;%4d
 &nbsp;% .6f &nbsp;% .6f &nbsp;% .6f\n&quot;,$at[$i],
 $x[$i]&#43;$displacement*$tokens[$xind],
 $y[$i]&#43;$displacement*$tokens[$xind&#43;1],
 $z[$i]&#43;$displacement*$tokens[$xind&#43;2];</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; }</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; &nbsp; exit; # AND WE ARE
 DONE!!!!</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; } elsif (eof) { close IN; exit;
 }</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">}</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"><br>
 </font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">##################################################</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"># skiplines : argument n: number of lines to
 skip</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">##################################################</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">sub skiplines {</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; local $n, $i;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; $n = shift(/a\_);</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">&nbsp; for ($i=0;$i&lt;$n;$i&#43;&#43;) {
 &lt;IN&gt; || die &quot;skiplines encountered EOF.&quot;;
 }</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">}</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"><br>
 </font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"><br>
 </font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">##################################################</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"># usage prints a message about how to use
 sp2g03</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">##################################################</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">sub usage {</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">print &lt;&lt;ENDUSAGE;</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">Usage: nfreq [-h] [-d displacement] [-v vibrationnnumber]
 filename</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"><br>
 </font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">-d : displacement step along vibrational mode default
 0.1</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">-v : index of vibrational mode to follow default
 1</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">-h : prints this help</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2"><br>
 </font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">Will create the structure '-d' along the '-v'th
 vibrational mode of the stucture.</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">ENDUSAGE</font></div>
 <div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
 margin-left: 0px; ">
 <font class="Apple-style-span" face="Monaco"
 size="2">}</font></div>
 <div style="border-collapse: separate; color: rgb(0, 0, 0); font-family:
 Helvetica; font-size: 12px; font-style: normal; font-variant: normal;
 font-weight: normal; letter-spacing: normal; line-height: normal;
 text-transform: none; white-space: normal; word-spacing: 0px;
 -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px;
 -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">
 <br>
 </div>
 </div>
 <div style="border-collapse: separate; color: rgb(0, 0, 0); font-family:
 Helvetica; font-size: 12px; font-style: normal; font-variant: normal;
 font-weight: normal; letter-spacing: normal; line-height: normal;
 text-transform: none; white-space: normal; word-spacing: 0px;
 -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px;
 -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; margin-top: 0px;
 margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">
 <br>
 </div>
 </div>
 </div>
 </div>
 </span></span></div>
 <div>
 <div>On May 8, 2013, at 3:58 PM, Anjan Roy aroy6|,|uic.edu
 wrote:</div>
 <br class="Apple-interchange-newline">
 <blockquote type="cite">
 <div><br>
 Sent to CCL by: &quot;Anjan &nbsp;Roy&quot;
 [aroy6!^!uic.edu]<br>
 Hello, <br>
 <br>
 My Gaussian 09 opimization returns a negative frequency, one solution suggested
 <br>
 was to distort the molecule in the direction if the negative freq motion. Could
 <br>
 someone kindly suggest how I can do this by subtracting structures in the
 <br>
 command line or by way of a GUI.<br>
 <br>
 thank you<br>
 <br>
 Anjan<br>
 <br>
 <br>
 <br>
 -= This is automatically added to each message by the mailing script
 =-<br<br=<br<br>
 <br>
 E-mail to subscribers: <a href="mailto:CHEMISTRY/a\ccl.net";>CHEMISTRY/a\ccl.net</a> or
 use:<br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.ccl.net/cgi-bin/ccl/send_ccl_message";>http://www.ccl.net/cgi-bin/ccl/send_ccl_message</a><br>
 <br>
 E-mail to administrators: <a href="mailto:CHEMISTRY-REQUEST/a\ccl.net";>CHEMISTRY-REQUEST/a\ccl.net</a>
 or use<br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.ccl.net/cgi-bin/ccl/send_ccl_message";>http://www.ccl.net/cgi-bin/ccl/send_ccl_message</a><br>
 <br<br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.ccl.net/chemistry/sub_unsub.shtml";>http://www.ccl.net/chemistry/sub_unsub.shtml</a><br>
 <br>
 Before posting, check wait time at: <a href="http://www.ccl.net";>http://www.ccl.net</a><br>
 <br>
 Job: <a href="http://www.ccl.net/jobs";>http://www.ccl.net/jobs</a> <br>
 Conferences: <a href="http://server.ccl.net/chemistry/announcements/conferences/";>
 http://server.ccl.net/chemistry/announcements/conferences/</a><br>
 <br>
 Search Messages: <a href="http://www.ccl.net/chemistry/searchccl/index.shtml";>http://www.ccl.net/chemistry/searchccl/index.shtml</a><br>
 <br<br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.ccl.net/spammers.txt";>http://www.ccl.net/spammers.txt</a><br>
 <br>
 RTFI: <a href="http://www.ccl.net/chemistry/aboutccl/instructions/";>http://www.ccl.net/chemistry/aboutccl/instructions/</a><br>
 <br>
 <br>
 </div>
 </blockquote>
 </div>
 <br>
 </div>
 </body>
 </html>