Created
October 17, 2016 09:21
-
-
Save jhjensen2/45d1702a0039ba18d2369577bb074ffb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!GAMESS input file for DFTB3/SMD optimization | |
$contrl runtyp=optimize icharg=1 nprint=-5 nzvar=1 $end | |
$system mwords=20 $end | |
$zmat dlc=.t. auto=.t. $end | |
$scf npunch=0 $end | |
$statpt nstep=200 opttol=0.0005 $end | |
$pcm solvnt=water smd=.t. $end | |
$system modio=31 $end | |
$basis gbasis=dftb $end | |
$dftb ndftb=3 dampxh=.t. dampex=4.0 $end | |
$DATA | |
C1 | |
C 6.0 -1.8063000000 -1.2924000000 -0.0445000000 | |
C 6.0 -1.0780000000 -0.2254000000 0.7506000000 | |
N 7.0 -0.2377000000 0.6550000000 -0.1511000000 | |
C 6.0 0.2631000000 1.8719000000 0.5865000000 | |
C 6.0 0.8545000000 -0.0410000000 -0.9379000000 | |
C 6.0 1.8742000000 -0.7334000000 -0.0533000000 | |
H 1.0 -2.5075000000 -1.8263000000 0.6051000000 | |
H 1.0 -2.3775000000 -0.8550000000 -0.8696000000 | |
H 1.0 -1.1151000000 -2.0341000000 -0.4553000000 | |
H 1.0 -0.4290000000 -0.6539000000 1.5200000000 | |
H 1.0 -1.8108000000 0.4301000000 1.2341000000 | |
H 1.0 -0.8844000000 1.0236000000 -0.8618000000 | |
H 1.0 0.8360000000 2.4862000000 -0.1130000000 | |
H 1.0 0.8805000000 1.5476000000 1.4275000000 | |
H 1.0 -0.6071000000 2.4313000000 0.9406000000 | |
H 1.0 1.3342000000 0.7244000000 -1.5579000000 | |
H 1.0 0.3685000000 -0.7516000000 -1.6131000000 | |
H 1.0 2.6558000000 -1.1818000000 -0.6757000000 | |
H 1.0 1.4244000000 -1.5399000000 0.5326000000 | |
H 1.0 2.3623000000 -0.0355000000 0.6327000000 | |
$END | |
$dftb hubder(1)=-0.1492,-0.1535,-0.1857, $END | |
$dftbsk | |
C C "/home/andersx/dftb/3ob-3-1/C-C.skf" | |
C N "/home/andersx/dftb/3ob-3-1/C-N.skf" | |
C H "/home/andersx/dftb/3ob-3-1/C-H.skf" | |
N C "/home/andersx/dftb/3ob-3-1/N-C.skf" | |
N N "/home/andersx/dftb/3ob-3-1/N-N.skf" | |
N H "/home/andersx/dftb/3ob-3-1/N-H.skf" | |
H C "/home/andersx/dftb/3ob-3-1/H-C.skf" | |
H N "/home/andersx/dftb/3ob-3-1/H-N.skf" | |
H H "/home/andersx/dftb/3ob-3-1/H-H.skf" | |
$end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#reads GAMESS input file and appends hubder parameters and $DFTBSK group | |
import sys | |
hub = { | |
"Br": -0.0573, | |
"C": -0.1492, | |
"Ca": -0.0340, | |
"Cl": -0.0697, | |
"F": -0.1623, | |
"H": -0.1857, | |
"I": -0.0433, | |
"K": -0.0339, | |
"Mg": -0.02, | |
"N": -0.1535, | |
"Na": -0.0454, | |
"O": -0.1575, | |
"P": -0.14, | |
"S": -0.11, | |
"Zn": -0.03 } | |
for filename in sys.argv[1:]: | |
isav = 10000 | |
read = "off" | |
atoms = [] | |
searchlines = open(filename,'r').readlines() | |
for i,line in enumerate(searchlines): | |
words = line.split() # split line into words | |
if len(words) < 1: | |
continue | |
if "$DATA" in line: | |
isav = i + 2 | |
if i > isav: | |
if words[0] not in atoms and words[0] != "$END": | |
atoms.append(words[0]) | |
if words[0] == "$END": | |
break | |
line = " $dftb hubder(1)=" | |
for atom in atoms: | |
line = line+str(hub[atom])+"," | |
line = line + " $END\n" | |
out = open(filename,"a") | |
out.write(line) | |
out.write(" $dftbsk\n") | |
dir = '"/home/andersx/dftb/3ob-3-1/' | |
for atom1 in atoms: | |
for atom2 in atoms: | |
line = atom1+" "+atom2+" "+dir+atom1+"-"+atom2+'.skf"\n' | |
out.write(line) | |
#C C "/home/andersx/dftb/3ob-3-1/C-C.skf" | |
out.write(" $end") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment