Commit 645683f0 authored by Malthe Kjær Bisbo's avatar Malthe Kjær Bisbo
Browse files

removed functionallity to relax final structures in population through gofee....

removed functionallity to relax final structures in population through gofee. Should just be done afterwards
parent f5970b1b
......@@ -65,11 +65,6 @@ class GOFEE():
trajectory:
kappa:
N_relax_final_pop: int or None.
If not None the best 'N_relax_final_pop' structures in the
population is relaxed after the specified number of search
iterations is reached.
"""
def __init__(self, structures=None,
calc=None,
......@@ -85,8 +80,7 @@ class GOFEE():
population_size=5,
dualpoint=True,
min_certainty=0.7,
restart=None,
N_relax_final_pop=None):
restart=None):
if structures is None:
assert startgenerator is not None
......@@ -153,14 +147,6 @@ class GOFEE():
self.dualpoint = dualpoint
self.min_certainty = min_certainty
self.restart = restart
if N_relax_final_pop is None:
self.N_relax_final_pop = 0
else:
try:
self.N_relax_final_pop = int(N_relax_final_pop)
except TypeError:
raise
if isinstance(trajectory, str):
self.trajectory = Trajectory(filename=trajectory, mode='a', master=self.master)
......@@ -270,8 +256,6 @@ class GOFEE():
print('anew pred:', anew.info['key_value_pairs']['Epred'], anew.info['key_value_pairs']['Epred_std'])
print('E_true:', [a.get_potential_energy() for a in a_add])
print('pop:', [a.get_potential_energy() for a in self.population.pop])
self.relax_final_population()
def get_dualpoint(self, a, lmax=0.10, Fmax_flat=5):
"""Returns dual-point structure, i.e. the original structure
......@@ -414,14 +398,6 @@ class GOFEE():
return a
def relax_final_population(self):
if self.N_relax_final_pop > 0:
relaxed_population_trajectory = Trajectory(filename='relaxed_final_population.traj',
mode='a', master=self.master)
for a in self.population.pop[:self.N_relax_final_pop]:
a = relax(a, self.calc, Fmax=0.05, steps_max=20)
relaxed_population_trajectory.write(a)
def write(self, a):
if self.trajectory is not None:
self.trajectory.write(a)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment