Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ CalLearn uses ASE to handle atomic systems and the calculator interface to calcu

You can install CatLearn by downloading it from GitHub as:
```shell
$ git clone https://github.com/avishart/CatLearn
$ pip install -e CatLearn/.
git clone --single-branch --branch activelearning https://github.com/avishart/CatLearn
pip install -e CatLearn/.
```

You can also install CatLearn directly from GitHub:
```shell
$ pip install git@github.com:avishart/CatLearn.git
pip install git+https://github.com/avishart/CatLearn.git@activelearning
```

However, it is recommended to install a specific tag to ensure it is a stable version:
```shell
$ pip install git+https://github.com/avishart/CatLearn.git@v.x.x.x
pip install git+https://github.com/avishart/CatLearn.git@v.x.x.x
```

The dependency of ASE has only been thoroughly tested up to version 3.26.0.
Expand Down Expand Up @@ -74,7 +74,7 @@ dyn.run(
fmax=0.05,
max_unc=0.30,
steps=100,
ml_steps=1000,
ml_steps=500,
)

```
Expand Down Expand Up @@ -117,7 +117,7 @@ mlneb = MLNEB(
start_without_ci=True,
reuse_ci_path=True,
save_memory=False,
parallel_run=False,
parallel_run=True,
local_opt=FIRE,
local_opt_kwargs={},
use_restart=True,
Expand All @@ -129,7 +129,7 @@ mlneb.run(
fmax=0.05,
max_unc=0.30,
steps=100,
ml_steps=1000,
ml_steps=500,
)

```
Expand Down
2 changes: 1 addition & 1 deletion catlearn/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = "7.2.0"
__version__ = "7.2.1"

__all__ = ["__version__"]
24 changes: 20 additions & 4 deletions catlearn/activelearning/activelearning.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def __init__(
pred_evaluated="predicted_evaluated.traj",
converged_trajectory="converged.traj",
initial_traj="initial_struc.traj",
last_traj=None,
tabletxt="ml_summary.txt",
timetxt="ml_time.txt",
prev_calculations=None,
Expand Down Expand Up @@ -187,14 +188,18 @@ def __init__(
training data with predicted properties.
If pred_evaluated is None, then the predicted data is
not saved.
converged_trajectory: str or TrajectoryWriter instance
converged_trajectory: str or TrajectoryWriter instance (optional)
Trajectory filename to store the converged structure(s).
Or the TrajectoryWriter instance to store the converged
structure(s).
initial_traj: str or TrajectoryWriter instance
initial_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the initial structure(s).
Or the TrajectoryWriter instance to store the initial
structure(s).
last_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the last structure(s).
Or the TrajectoryWriter instance to store the last
structure(s).
tabletxt: str (optional)
Name of the .txt file where the summary table is printed.
It is not saved to the file if tabletxt=None.
Expand Down Expand Up @@ -267,6 +272,7 @@ def __init__(
pred_evaluated=pred_evaluated,
converged_trajectory=converged_trajectory,
initial_traj=initial_traj,
last_traj=last_traj,
tabletxt=tabletxt,
timetxt=timetxt,
seed=seed,
Expand Down Expand Up @@ -856,6 +862,7 @@ def update_arguments(
pred_evaluated=None,
converged_trajectory=None,
initial_traj=None,
last_traj=None,
tabletxt=None,
timetxt=None,
seed=None,
Expand Down Expand Up @@ -978,14 +985,18 @@ def update_arguments(
training data with predicted properties.
If pred_evaluated is None, then the predicted data is
not saved.
converged_trajectory: str or TrajectoryWriter instance
converged_trajectory: str or TrajectoryWriter instance (optional)
Trajectory filename to store the converged structure(s).
Or the TrajectoryWriter instance to store the converged
structure(s).
initial_traj: str or TrajectoryWriter instance
initial_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the initial structure(s).
Or the TrajectoryWriter instance to store the initial
structure(s).
last_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the last structure(s).
Or the TrajectoryWriter instance to store the last
structure(s).
tabletxt: str (optional)
Name of the .txt file where the summary table is printed.
It is not saved to the file if tabletxt=None.
Expand Down Expand Up @@ -1101,6 +1112,8 @@ def update_arguments(
self.converged_trajectory = converged_trajectory
if initial_traj is not None or not hasattr(self, "initial_traj"):
self.initial_traj = initial_traj
if last_traj is not None or not hasattr(self, "last_traj"):
self.last_traj = last_traj
if tabletxt is not None:
self.tabletxt = str(tabletxt)
elif not hasattr(self, "tabletxt"):
Expand Down Expand Up @@ -1198,6 +1211,8 @@ def run_method(
self.structures = self.get_structures()
# Write atoms to trajectory
self.save_trajectory(self.trajectory, self.structures, mode=self.mode)
# Write atoms to last_traj trajectory
self.save_trajectory(self.last_traj, self.structures, mode="w")
return method_converged

def initiate_structure(self, step=1, **kwargs):
Expand Down Expand Up @@ -2118,6 +2133,7 @@ def get_arguments(self):
pred_evaluated=self.pred_evaluated,
converged_trajectory=self.converged_trajectory,
initial_traj=self.initial_traj,
last_traj=self.last_traj,
tabletxt=self.tabletxt,
timetxt=self.timetxt,
seed=self.seed,
Expand Down
11 changes: 9 additions & 2 deletions catlearn/activelearning/adsorption.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def __init__(
pred_evaluated="predicted_evaluated.traj",
converged_trajectory="converged.traj",
initial_traj="initial_struc.traj",
last_traj=None,
tabletxt="ml_summary.txt",
timetxt="ml_time.txt",
prev_calculations=None,
Expand Down Expand Up @@ -193,14 +194,18 @@ def __init__(
training data with predicted properties.
If pred_evaluated is None, then the predicted data is
not saved.
converged_trajectory: str or TrajectoryWriter instance
converged_trajectory: str or TrajectoryWriter instance (optional)
Trajectory filename to store the converged structure(s).
Or the TrajectoryWriter instance to store the converged
structure(s).
initial_traj: str or TrajectoryWriter instance
initial_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the initial structure(s).
Or the TrajectoryWriter instance to store the initial
structure(s).
last_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the last structure(s).
Or the TrajectoryWriter instance to store the last
structure(s).
tabletxt: str
Name of the .txt file where the summary table is printed.
It is not saved to the file if tabletxt=None.
Expand Down Expand Up @@ -272,6 +277,7 @@ def __init__(
pred_evaluated=pred_evaluated,
converged_trajectory=converged_trajectory,
initial_traj=initial_traj,
last_traj=last_traj,
tabletxt=tabletxt,
timetxt=timetxt,
prev_calculations=prev_calculations,
Expand Down Expand Up @@ -458,6 +464,7 @@ def get_arguments(self):
pred_evaluated=self.pred_evaluated,
converged_trajectory=self.converged_trajectory,
initial_traj=self.initial_traj,
last_traj=self.last_traj,
tabletxt=self.tabletxt,
timetxt=self.timetxt,
seed=self.seed,
Expand Down
11 changes: 9 additions & 2 deletions catlearn/activelearning/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(
pred_evaluated="predicted_evaluated.traj",
converged_trajectory="converged.traj",
initial_traj="initial_struc.traj",
last_traj=None,
tabletxt="ml_summary.txt",
timetxt="ml_time.txt",
prev_calculations=None,
Expand Down Expand Up @@ -177,14 +178,18 @@ def __init__(
training data with predicted properties.
If pred_evaluated is None, then the predicted data is
not saved.
converged_trajectory: str or TrajectoryWriter instance
converged_trajectory: str or TrajectoryWriter instance (optional)
Trajectory filename to store the converged structure(s).
Or the TrajectoryWriter instance to store the converged
structure(s).
initial_traj: str or TrajectoryWriter instance
initial_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the initial structure(s).
Or the TrajectoryWriter instance to store the initial
structure(s).
last_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the last structure(s).
Or the TrajectoryWriter instance to store the last
structure(s).
tabletxt: str
Name of the .txt file where the summary table is printed.
It is not saved to the file if tabletxt=None.
Expand Down Expand Up @@ -252,6 +257,7 @@ def __init__(
pred_evaluated=pred_evaluated,
converged_trajectory=converged_trajectory,
initial_traj=initial_traj,
last_traj=last_traj,
tabletxt=tabletxt,
timetxt=timetxt,
prev_calculations=prev_calculations,
Expand Down Expand Up @@ -361,6 +367,7 @@ def get_arguments(self):
pred_evaluated=self.pred_evaluated,
converged_trajectory=self.converged_trajectory,
initial_traj=self.initial_traj,
last_traj=self.last_traj,
tabletxt=self.tabletxt,
timetxt=self.timetxt,
seed=self.seed,
Expand Down
11 changes: 9 additions & 2 deletions catlearn/activelearning/mlgo.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __init__(
pred_evaluated="predicted_evaluated.traj",
converged_trajectory="converged.traj",
initial_traj="initial_struc.traj",
last_traj=None,
tabletxt="ml_summary.txt",
timetxt="ml_time.txt",
prev_calculations=None,
Expand Down Expand Up @@ -231,14 +232,18 @@ def __init__(
training data with predicted properties.
If pred_evaluated is None, then the predicted data is
not saved.
converged_trajectory: str or TrajectoryWriter instance
converged_trajectory: str or TrajectoryWriter instance (optional)
Trajectory filename to store the converged structure(s).
Or the TrajectoryWriter instance to store the converged
structure(s).
initial_traj: str or TrajectoryWriter instance
initial_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the initial structure(s).
Or the TrajectoryWriter instance to store the initial
structure(s).
last_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the last structure(s).
Or the TrajectoryWriter instance to store the last
structure(s).
tabletxt: str
Name of the .txt file where the summary table is printed.
It is not saved to the file if tabletxt=None.
Expand Down Expand Up @@ -307,6 +312,7 @@ def __init__(
pred_evaluated=pred_evaluated,
converged_trajectory=converged_trajectory,
initial_traj=initial_traj,
last_traj=last_traj,
tabletxt=tabletxt,
timetxt=timetxt,
prev_calculations=None,
Expand Down Expand Up @@ -592,6 +598,7 @@ def get_arguments(self):
pred_evaluated=self.pred_evaluated,
converged_trajectory=self.converged_trajectory,
initial_traj=self.initial_traj,
last_traj=self.last_traj,
tabletxt=self.tabletxt,
timetxt=self.timetxt,
seed=self.seed,
Expand Down
11 changes: 9 additions & 2 deletions catlearn/activelearning/mlneb.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def __init__(
pred_evaluated="predicted_evaluated.traj",
converged_trajectory="converged.traj",
initial_traj="initial_struc.traj",
last_traj=None,
tabletxt="ml_summary.txt",
timetxt="ml_time.txt",
prev_calculations=None,
Expand Down Expand Up @@ -229,14 +230,18 @@ def __init__(
training data with predicted properties.
If pred_evaluated is None, then the predicted data is
not saved.
converged_trajectory: str or TrajectoryWriter instance
converged_trajectory: str or TrajectoryWriter instance (optional)
Trajectory filename to store the converged structure(s).
Or the TrajectoryWriter instance to store the converged
structure(s).
initial_traj: str or TrajectoryWriter instance
initial_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the initial structure(s).
Or the TrajectoryWriter instance to store the initial
structure(s).
last_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the last structure(s).
Or the TrajectoryWriter instance to store the last
structure(s).
tabletxt: str
Name of the .txt file where the summary table is printed.
It is not saved to the file if tabletxt=None.
Expand Down Expand Up @@ -315,6 +320,7 @@ def __init__(
pred_evaluated=pred_evaluated,
converged_trajectory=converged_trajectory,
initial_traj=initial_traj,
last_traj=last_traj,
tabletxt=tabletxt,
timetxt=timetxt,
prev_calculations=self.prev_calculations,
Expand Down Expand Up @@ -528,6 +534,7 @@ def get_arguments(self):
pred_evaluated=self.pred_evaluated,
converged_trajectory=self.converged_trajectory,
initial_traj=self.initial_traj,
last_traj=self.last_traj,
tabletxt=self.tabletxt,
timetxt=self.timetxt,
seed=self.seed,
Expand Down
11 changes: 9 additions & 2 deletions catlearn/activelearning/randomadsorption.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def __init__(
pred_evaluated="predicted_evaluated.traj",
converged_trajectory="converged.traj",
initial_traj="initial_struc.traj",
last_traj=None,
tabletxt="ml_summary.txt",
timetxt="ml_time.txt",
prev_calculations=None,
Expand Down Expand Up @@ -228,14 +229,18 @@ def __init__(
training data with predicted properties.
If pred_evaluated is None, then the predicted data is
not saved.
converged_trajectory: str or TrajectoryWriter instance
converged_trajectory: str or TrajectoryWriter instance (optional)
Trajectory filename to store the converged structure(s).
Or the TrajectoryWriter instance to store the converged
structure(s).
initial_traj: str or TrajectoryWriter instance
initial_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the initial structure(s).
Or the TrajectoryWriter instance to store the initial
structure(s).
last_traj: str or TrajectoryWriter instance (optional)
Trajectory filename to store the last structure(s).
Or the TrajectoryWriter instance to store the last
structure(s).
tabletxt: str
Name of the .txt file where the summary table is printed.
It is not saved to the file if tabletxt=None.
Expand Down Expand Up @@ -316,6 +321,7 @@ def __init__(
pred_evaluated=pred_evaluated,
converged_trajectory=converged_trajectory,
initial_traj=initial_traj,
last_traj=last_traj,
tabletxt=tabletxt,
timetxt=timetxt,
prev_calculations=prev_calculations,
Expand Down Expand Up @@ -496,6 +502,7 @@ def get_arguments(self):
pred_evaluated=self.pred_evaluated,
converged_trajectory=self.converged_trajectory,
initial_traj=self.initial_traj,
last_traj=self.last_traj,
tabletxt=self.tabletxt,
timetxt=self.timetxt,
seed=self.seed,
Expand Down