Skip to content

Commit 066c499

Browse files
committed
ensure topology section gets removed
1 parent faba588 commit 066c499

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

container/Dockerfile_python3.10_cuda

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ RUN pip install git+https://github.com/acesuit/MACE.git@55f7411 && \
6363
RUN pip install pyscf
6464

6565
ARG GIT_COMMIT_SHA
66-
RUN pip install 'psiflow[parsl] @ git+https://github.com/molmod/psiflow@v3.0.3'
66+
RUN pip install 'psiflow[parsl] @ git+https://github.com/molmod/psiflow'
6767
RUN pip cache purge
6868

6969
ENV OMPI_MCA_plm_rsh_agent=

psiflow/reference/_cp2k.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ def dict_to_str(cp2k_input_dict: dict) -> str:
4545
def insert_atoms_in_input(cp2k_input_dict: dict, atoms: FlowAtoms):
4646
from ase.data import chemical_symbols
4747

48+
# get rid of topology if it's there
49+
cp2k_input_dict["force_eval"]["subsys"].pop("topology", None)
50+
4851
coord = []
4952
cell = {}
5053
for i in range(len(atoms)):
@@ -54,11 +57,11 @@ def insert_atoms_in_input(cp2k_input_dict: dict, atoms: FlowAtoms):
5457
)
5558
)
5659
cp2k_input_dict["force_eval"]["subsys"]["coord"] = {"*": coord}
57-
if atoms.pbc.any():
58-
for i, vector in enumerate(["A", "B", "C"]):
59-
cell[vector] = "{} {} {}".format(*atoms.cell[i])
60-
# cell.append('{} {} {} {}'.format(vector, *atoms.cell[i]))
61-
cp2k_input_dict["force_eval"]["subsys"]["cell"] = cell
60+
61+
assert atoms.pbc.any() # CP2K needs cell info!
62+
for i, vector in enumerate(["A", "B", "C"]):
63+
cell[vector] = "{} {} {}".format(*atoms.cell[i])
64+
cp2k_input_dict["force_eval"]["subsys"]["cell"] = cell
6265

6366

6467
@typeguard.typechecked

0 commit comments

Comments
 (0)