Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#Build a sub-lattice you wish to disorder [test case do the Ba sub-lattice]
sub_lattice = distort.build_sub_lattice(single_substitution,"Ba")
# Enumerate the inequivalent sites
inequivalent_sites = distort.get_inequivalent_sites(sub_lattice,single_substitution)
# Replace Ba at inequivalent sites with Sr
i = 0
for inequivalent_site in inequivalent_sites:
print "------------------------------"
print " Substituted coordinates"
#print test_case,inequivalent_site
distorted = distort.make_substitution(single_substitution,inequivalent_site,"Sr")
io.write('POSCAR-%s'%i,distorted,format='vasp')
i = i + 1
# print distorted
print "------------------------------"
print "------------------------------"
#Build a sub-lattice you wish to disorder [test case do the Ba sub-lattice]
sub_lattice = distort.build_sub_lattice(single_substitution,"Ba")
# Enumerate the inequivalent sites
inequivalent_sites = distort.get_inequivalent_sites(sub_lattice,single_substitution)
# Replace Ba at inequivalent sites with Sr
for inequivalent_site in inequivalent_sites:
print "------------------------------"
print " Substituted coordinates"
#print test_case,inequivalent_site
distorted = distort.make_substitution(single_substitution,inequivalent_site,"Sr")
print distorted
print "------------------------------"
print "------------------------------"