Created
April 7, 2017 10:19
-
-
Save KPLauritzen/f09af6ba141bc559c45e0d04ee4462b4 to your computer and use it in GitHub Desktop.
Succeeds with `--size 7`, fails with `--size 8`
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
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