def opt(ncpu=20,T=2500,us='F',tstep=2001,dt=1.0,gen='poscar.gen'): if exists('siesta.MDE') or exists('siesta.MD_CAR'): system('rm siesta.MDE siesta.MD_CAR') A = read(gen,index=-1) A = press_mol(A) print('\n- running siesta opt ...') siesta_opt(A,ncpu=ncpu,us=us)
def pm(gen='md.traj', index=-1): ''' pressMol ''' A = read(gen, index=index) cell = A.get_cell() print(cell) A = press_mol(A) A.write('poscar.gen') del A
#!/usr/bin/env python from irff.molecule import packmol, press_mol from ase.io import read,write from ase.io.trajectory import TrajectoryWriter from ase import Atoms # packmol(strucs=['cl20mol','hmxmol','co2','CO','no2','NO','h2o'], # supercell=[2,2,2], # w=True) A = read('siesta.traj',index=-1) A = press_mol(A,inbox=False) A.write('pos.gen')