コード例 #1
0
#!/usr/bin/env python

import numpy as np

from ase.io import read, write
backbone = read('wrapped-POSCAR_1_Kooi-wo-vdw-12x12x3.vasp')

# posi = backbone.get_positions()
# fix_ind = []
# for i in range(len(backbone)):
    # if posi[i][1] < 28.7:
        # fix_ind.append(i)

# from ase.visualize import view
# view(backbone[fix_ind])

# np.save('fix_inds.npy', fix_ind)

from ss_util import random_atoms_gen as RAG
atoms = RAG(
    backbone,
    fix_ind_dict  = {'Te':list(range(12*12*3*4, 12*12*3*9))},
    cutoff_frac   = 0.80,
    random_radi   = 0.0,
    pin_the_fixed = True,
    )

write('matsunaga-w-rag-kooi-layer-12x12x3.traj', atoms)
コード例 #2
0
#!/usr/bin/env python

import numpy as np

from ase.io import read, write
backbone = read('wrapped-POSCAR_1_Kooi-wo-vdw-16x8x4.vasp')

# from ase.visualize import view
# view(backbone[fix_ind])

# np.save('fix_inds.npy', fix_ind)

from ss_util import random_atoms_gen as RAG
atoms = RAG(
    backbone,
    # fix_ind_dict  = fix_ind,
    cutoff_frac=0.80,
    random_radi=0.6,
    # pin_the_fixed = True,
)

write('init-liquid.traj', atoms)
コード例 #3
0
ファイル: make-cubic-w-rag.py プロジェクト: ssrokyz/tools
from ase.io import read, write
backbone = read('cubic-backbone-64.vasp-4x4x4.vasp')

# posi = backbone.get_positions()
# fix_ind = []
# for i in range(len(backbone)):
# if posi[i][1] < 28.7:
# fix_ind.append(i)

# from ase.visualize import view
# view(backbone[fix_ind])

# np.save('fix_inds.npy', fix_ind)

from ss_util import random_atoms_gen as RAG
atoms = RAG(
    backbone,
    num_spec_dict={
        'Ge': 819,
        'Sb': 819,
        'Te': 2048,
        'V': 410
    },
    fix_ind_dict={'Te': list(range(2048, 4096))},
    cutoff_frac=0.80,
    random_radi=0.0,
    pin_the_fixed=True,
)

write('cubic-w-rag.vasp', atoms)