Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tao authored and tao committed Apr 13, 2020
1 parent 0f4dbf5 commit 5bb4742
Show file tree
Hide file tree
Showing 61 changed files with 31,553 additions and 196 deletions.
18 changes: 18 additions & 0 deletions tools/ase/ase-translate.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from math import pi
import numpy as np
from ase import Atoms
from ase.io import read, write
from ase.optimize import BFGS
from ase.vibrations import Vibrations
#from deepmd.calculator import DP
from ase.build import molecule
from ase.constraints import FixInternals

atoms = read('input.vasp')
for i in atoms:
for n in range(3):
i.position[n] = i.position[n] + 5
atoms.wrap()

write('POSCAR', atoms, vasp5=True)

24 changes: 24 additions & 0 deletions tools/ase/clip-a-pov.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import os
import numpy as np
from pgroup.ase.io import POV
from ase.build import fcc111

atoms = fcc111('Pt', (3, 2, 2), vacuum=10.)
atoms[11].symbol = 'Au'

# Repeat, rotate and translate to desired position.
atoms = atoms.repeat((6, 8, 1))
atoms.rotate('z', np.pi, rotate_cell=True)
atoms.translate(-atoms[190].position)

# Do the ray-trace.
pov = POV(atoms,
cameralocation=(0., -15., 10.),
area_light=[(2., -25., 20.), 'White', 1.7, 1.7, 3, 3],
tex='vmd',
clipplane='y, -0.00',
pixelwidth=640,
look_at=(0., 0., 2.),
)

pov.write('cut-alloy.png')
Loading

0 comments on commit 5bb4742

Please sign in to comment.