Skip to content

Instantly share code, notes, and snippets.

@KPLauritzen
Created April 7, 2017 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KPLauritzen/f09af6ba141bc559c45e0d04ee4462b4 to your computer and use it in GitHub Desktop.
Save KPLauritzen/f09af6ba141bc559c45e0d04ee4462b4 to your computer and use it in GitHub Desktop.
Succeeds with `--size 7`, fails with `--size 8`
from __future__ import print_function
import numpy as np
import argparse
from ase.units import kB, fs
from ase.build import fcc111
from asap3 import EMT
from asap3.md.langevin import Langevin
parser = argparse.ArgumentParser()
parser.add_argument('--size', default=2, type=int)
args = parser.parse_args()
# Generate a structure
atoms = fcc111('Au', size=(args.size, args.size, args.size), vacuum=10.0)
# Attach a calculator
atoms.set_calculator(EMT())
dyn = Langevin(atoms, timestep=5.0*fs, temperature=300*kB, friction=1e-1)
# Run an MD step
dyn.run(10)
# Done
n_atoms = atoms.get_number_of_atoms()
print('Completed with {} atoms'.format(n_atoms))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment