#!/usr/bin/env python3 # # GRAIN BOUNDARY SYMMETRIC TILT ENERGY RELAXED CUBIC CRYSTAL AL 100 # # Author: Brandon Runnels # Date: June 2019 # Institution: Department of Mechanical and Aerospace Engineering # University of Colorado Colorado Springs # Email: brunnels@uccs.edu # # Description: This file contains a test for computing the energies # of 100 symmetric tilt grain boundaries using the # grain_boundary_symmetric_tilt_energy_relaxed_cubic_crystal # test driver # # Copyright: 2016-2019 University of Colorado Colorado Springs # import sys from subprocess import Popen, PIPE import fileinput inp = fileinput.input() exe = next(inp).strip() args = "".join([line for line in inp]) try: proc = Popen( exe, stdin=PIPE, stdout=sys.stdout, stderr=sys.stderr, shell=True, encoding="utf-8", ) proc.communicate(input=args) except Exception as e: pass finally: exit(proc.returncode)