-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db7c798
commit 1b88dcb
Showing
7 changed files
with
583 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
%nprocshared=12 | ||
# opt=modredundant SCF=QC b3lyp/gen PSEUDO=READ | ||
|
||
Title Card Required | ||
|
||
-1 1 | ||
Pt 5.77400000 7.75900000 3.78900000 | ||
Pt 7.75900000 5.77400000 3.78900000 | ||
Pt 9.74400000 3.78900000 3.78900000 | ||
Pt 5.77400000 9.74400000 1.80400000 | ||
Pt 7.75900000 7.75900000 1.80400000 | ||
Pt 9.74400000 5.77400000 1.80400000 | ||
Pt 11.72900000 3.78900000 1.80400000 | ||
Pt 7.75900000 9.74400000 -0.18100000 | ||
Pt 9.74400000 7.75900000 -0.18100000 | ||
Pt 11.72900000 5.77400000 -0.18100000 | ||
Pt 9.74400000 9.74400000 -2.16600000 | ||
Pt 11.72900000 7.75900000 -2.16600000 | ||
Cl 10.43200000 8.77400000 2.26800000 | ||
|
||
X 1 F | ||
X 2 F | ||
X 3 F | ||
X 4 F | ||
X 5 F | ||
X 6 F | ||
X 7 F | ||
X 8 F | ||
X 9 F | ||
X 10 F | ||
X 11 F | ||
X 12 F | ||
X 13 F | ||
|
||
Pt | ||
lanL2DZ | ||
**** | ||
Cl | ||
6-311+g(d,p) | ||
**** | ||
|
||
Pt 0 | ||
LANL2DZ | ||
|
||
|
||
|
||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
units real | ||
atom_style charge | ||
boundary p p p | ||
|
||
read_data lammps.data | ||
|
||
dump 1 all custom 1 dump.lammpstrj id type x y z vx vy vz | ||
dump_modify 1 sort id | ||
dump 101 all cfg 1 dump.*.cfg mass type xs ys zs vx vy vz fx fy fz | ||
dump_modify 101 element Li Cl S O P | ||
|
||
log rerun.log | ||
|
||
#--------Simulation-------- | ||
rerun movie.xyz dump x y z box no format xyz | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
"""cfg file | ||
""" | ||
|
||
from mytype import System, Molecule, Atom | ||
|
||
class Cfg(filename): | ||
"""cfg file | ||
""" | ||
def __init__(self, filename): | ||
self.name = "" | ||
self.pbc = [] | ||
self.a = [] | ||
self.b = [] | ||
self.c = [] | ||
self.read(filename) | ||
self.natoms = 0 | ||
|
||
def read(self, filename): | ||
""" read data from cfg file | ||
""" | ||
if filename.endswith(".cfg"): | ||
self.name = filename[:-4] | ||
else: | ||
self.name = filename | ||
|
||
f = open(filename, "r") | ||
self.natoms = int(f.readline().strip().split("=")[-1]) | ||
f.readline() # unit | ||
for i in range(3): | ||
tokens = i.strip().split("=")[-1].split()[0] | ||
self.a.append(float(tokens)) | ||
for i in range(3): | ||
tokens = i.strip().split("=")[-1].split()[0] | ||
self.b.append(float(tokens)) | ||
for i in range(3): | ||
tokens = i.strip().split("=")[-1].split()[0] | ||
self.c.append(float(tokens)) | ||
f.readline() # not sure the meaning of the line | ||
n = int(f.readline().strip().split("=")[-1]) | ||
for i in range(n -3): | ||
f.readline() | ||
|
||
counter = 0 | ||
for i in range(self.natoms): | ||
if counter % 3 == 0: | ||
tokens = [] | ||
tokens.append(i.strip().split()) | ||
self.coords.append(token) | ||
counter += 1 | ||
|
||
def parser(self,): | ||
""" parse cfg to system | ||
""" | ||
s = System() | ||
s.pbc = v2lattice(a, b, c) | ||
s.natoms = self.natoms | ||
for i in range(s.natoms): | ||
atom = Atom() | ||
atom.name = self.coords[i][1][0] | ||
x = float(self.coords[i][2][0]) | ||
y = float(self.coords[i][2][1]) | ||
z = float(self.coords[i][2][2]) | ||
atom.x[0] = a[0]*x + b[0]*y + c[0]*z | ||
atom.x[1] = a[1]*x + b[1]*y + c[1]*z | ||
atom.x[2] = a[2]*x + b[2]*y + c[2]*z | ||
s.atoms.append(atom) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
# see http://www.cscs.ch/~mvalle/mencoder/mencoder.html | ||
|
||
# touch ~/.mplayer/mencoder # | ||
|
||
JPEG_DIR=Jpg | ||
MPG_FILE=AtomEye.mpg | ||
|
||
jpgfile=`ls $JPEG_DIR/ | grep --max-count=1 -i .jpg` | ||
|
||
geometry=`identify -verbose $JPEG_DIR/$jpgfile | grep Geometry | cut -d: -f2` | ||
|
||
height=`echo $geometry | cut -dx -f1` | ||
width=`echo $geometry | cut -dx -f2` | ||
|
||
optimal_bitrate=`echo "scale=0; 50 * 25 * $width * $height / 256" | bc -l` | ||
|
||
rm -f $MPG_FILE | ||
|
||
opt="vbitrate=$optimal_bitrate:mbd=2:keyint=132:vqblur=1.0:cmp=2:subcmp=2:dia=2:last_pred=3" | ||
|
||
mencoder -ovc lavc -lavcopts vcodec=msmpeg4v2:vpass=1:$opt -mf type=jpg:fps=8 -nosound -o /dev/null mf://$JPEG_DIR/\*.jpg | ||
|
||
mencoder -ovc lavc -lavcopts vcodec=msmpeg4v2:vpass=2:$opt -mf type=jpg:fps=8 -nosound -o $MPG_FILE mf://$JPEG_DIR/\*.jpg |
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
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