Skip to content

Commit

Permalink
auto
Browse files Browse the repository at this point in the history
  • Loading branch information
dimonaks committed Oct 26, 2018
1 parent a02a57d commit ece45be
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
10 changes: 8 additions & 2 deletions siman/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4516,15 +4516,21 @@ def read_results(self, load = '', out_type = '', voronoi = False, show = '', cho
if "in kB" in line:
# print(line)
line = line.replace('-', ' -')

self.stress = [float(i)*100 for i in line.split()[2:]] # in MPa
# print(line)
if '*' in line:
self.stress = [0,0,0] # problem with stresses
printlog('Warning! Some problem with *in kB* line of OUTCAR')
else:
self.stress = [float(i)*100 for i in line.split()[2:]] # in MPa
if "Total " in line:
# print(line)
line = line.replace('-', ' -')
try:
self.intstress = [int(float(i)*1000) for i in line.split()[1:]] #stress in internal units; can be regarded as forces
except:
self.intstress = [0,0,0]
printlog('Warning! Some problem with *Total * line of OUTCAR')

if "external pressure =" in line:
#print iterat
self.extpress = float(line.split()[3]) * 100 # in MPa
Expand Down
6 changes: 3 additions & 3 deletions siman/monte_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ def metropolis(E1, E2, T = 1):
"""
decrease = False # energy reduction

# kb = 1.3806488*10**-23 / 1.6 * 10 **19
# kB = 1.3806488*10**-23 / 1.6 * 10 **19
dE = E2 - E1

printlog("metropolis(): dE is ", dE)
if dE < -0.000001:
printlog( "dE is ", dE, "Accept!")
decrease = True
elif 1 > math.exp(-dE/kb/T) > random():
printlog ("Accepted due to the temperature; exponent is ", math.exp(-dE/kb/T) )
elif 1 > math.exp(-dE/kB/T) > random():
printlog ("Accepted due to the temperature; exponent is ", math.exp(-dE/kB/T) )
decrease = True
else:
printlog('Not accepted')
Expand Down
2 changes: 1 addition & 1 deletion siman/picture_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def plot_mep(atom_pos, mep_energies, image_name = None, filename = None, show =
"""


from analysis import determine_barrier
from siman.analysis import determine_barrier

if filename is None:
filename = image_name
Expand Down
2 changes: 1 addition & 1 deletion siman/project_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3832,7 +3832,7 @@ def process_cathode_material(projectname, step = 1, target_x = 0, update = 0, pa
"""
from geo import determine_symmetry_positions, primitive, remove_x
from siman.geo import determine_symmetry_positions, primitive, remove_x
pn = projectname

m_set = '1u'; n_set = '1u'; clust = 'cee' #
Expand Down

0 comments on commit ece45be

Please sign in to comment.