Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Malthe Kjær Bisbo
GOFEE
Commits
b9ff7151
Commit
b9ff7151
authored
Feb 16, 2020
by
Malthe Kjær Bisbo
Browse files
modified logfile
parent
c1e7ed44
Changes
7
Hide whitespace changes
Inline
Side-by-side
__pycache__/bfgslinesearch_constrained.cpython-36.pyc
View file @
b9ff7151
No preview for this file type
__pycache__/gofee.cpython-36.pyc
View file @
b9ff7151
No preview for this file type
gofee.py
View file @
b9ff7151
...
...
@@ -335,11 +335,13 @@ class GOFEE():
relaxed_candidates
=
self
.
certainty_filter
(
relaxed_candidates
)
relaxed_candidates
=
self
.
population
.
pop_MLrelaxed
+
relaxed_candidates
"""
if self.master:
Epred = np.array([a.info['key_value_pairs']['Epred'] for a in relaxed_candidates])
Epred_std = np.array([a.info['key_value_pairs']['Epred_std'] for a in relaxed_candidates])
fitness = Epred - self.kappa*Epred_std
print(np.c_[Epred, Epred_std, fitness])
"""
return
relaxed_candidates
def
generate_candidate
(
self
):
...
...
surrogate/__pycache__/gpr.cpython-36.pyc
View file @
b9ff7151
No preview for this file type
surrogate/__pycache__/kernel.cpython-36.pyc
View file @
b9ff7151
No preview for this file type
surrogate/gpr.py
View file @
b9ff7151
...
...
@@ -240,9 +240,6 @@ class GPR():
fmin_l_bfgs_b
(
self
.
neg_log_marginal_likelihood
,
theta_initial
,
bounds
=
self
.
kernel
.
theta_bounds
)
if
convergence_dict
[
"warnflag"
]
!=
0
:
warnings
.
warn
(
"fmin_l_bfgs_b terminated abnormally with the "
" state: %s"
%
convergence_dict
)
return
theta_opt
,
func_min
def
numerical_neg_lml
(
self
,
dx
=
1e-4
):
...
...
test_systems/TiO2/run_search.py
View file @
b9ff7151
import
numpy
as
np
from
ase.calculators.dftb
import
Dftb
from
ase.io
import
read
from
surrogate.gpr
import
GPR
from
ase.io
import
read
,
write
from
candidate_operations.candidate_generation
import
CandidateGenerator
,
StartGenerator
,
OperationConstraint
from
candidate_operations.basic_mutations
import
RattleMutation
,
RattleMutation2
,
PermutationMutation
from
gofee
import
GOFEE
import
sys
from
gofee
import
GOFEE
### Set up StartGenerator and mutations ###
# read slab
slab
=
read
(
'slab.traj'
,
index
=
'0'
)
...
...
@@ -33,14 +30,10 @@ sg = StartGenerator(slab, stoichiometry, box)
# initialize rattle mutation
n_to_optimize
=
len
(
stoichiometry
)
# Add position constraint to mutations
z_constraint
=
OperationConstraint
(
zlim
=
[
6.5
,
15
])
candidate_generator
=
CandidateGenerator
([
0.2
,
0.2
,
0.6
],
[
sg
,
PermutationMutation
(
n_to_optimize
,
Npermute
=
2
),
RattleMutation
(
n_to_optimize
,
Nrattle
=
3
,
rattle_range
=
4
)])
[
sg
,
PermutationMutation
(
n_to_optimize
,
Npermute
=
2
),
RattleMutation
(
n_to_optimize
,
Nrattle
=
3
,
rattle_range
=
4
)])
### Define calculator ###
calc
=
Dftb
(
label
=
'TiO2_surface'
,
...
...
@@ -54,16 +47,14 @@ calc = Dftb(label='TiO2_surface',
kpts
=
(
2
,
1
,
1
))
### Initialize and run search ###
search
=
GOFEE
(
structures
=
None
,
calc
=
calc
,
gpr
=
None
,
search
=
GOFEE
(
calc
=
calc
,
startgenerator
=
sg
,
candidate_generator
=
candidate_generator
,
max_steps
=
200
,
d
max_
cov
=
1.5
,
max_
relax_dist
=
4
,
population_size
=
5
,
kappa
=
1
,
dualpoint
=
True
,
restart
=
'restart'
)
search
.
run
()
search
.
run
()
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment