#!/usr/bin/python # -*- coding: UTF-8 -*- #by Zhiqiang-Zhao #import module ! import os import fileinput as fi import numpy as np import math #specify input and outputfile ! in_file= 'CONTCAR' out1_file='strain.vasp' for i in range ...
import os import fileinput with fileinput.input('tip.data',backup='.bak',inplace=True) as f: for line in f: line = line.rstrip().replace('0.417000','0.5564') &nb ...