Skip to content

Commit 19f6722

Browse files
Progress
1 parent 602b170 commit 19f6722

5 files changed

Lines changed: 30 additions & 5 deletions

File tree

calcus/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@
310310

311311
SESSION_COOKIE_NAME = "CALCUS_SESSION_COOKIE"
312312

313-
PACKAGES = ["xtb"]
313+
PACKAGES = ["xtb", "PySCF"]
314314

315315
# For the Cloud version
316316
RESOURCE_LIMITS = {

frontend/calcusliveserver.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,21 @@ def setUpClass(cls):
8181
cls.host = socket.gethostbyname(socket.gethostname())
8282

8383
chrome_options = Options()
84+
chrome_options.add_argument(
85+
"--incognito"
86+
) # Required to avoid the "leaked password" popup.
87+
88+
# This should work also, but doesn't
89+
"""
90+
chrome_options.add_argument("--password-store=basic")
91+
chrome_options.add_experimental_option(
92+
"prefs",
93+
{
94+
"credentials_enable_service": False,
95+
"profile.password_manager_enabled": False,
96+
},
97+
)
98+
"""
8499
if "CI" in os.environ: # Github Actions
85100
chrome_options.add_argument("--headless")
86101
# from pyvirtualdisplay import Display

frontend/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ class Calculation(models.Model):
14841484

14851485
input_file = models.CharField(max_length=50000, default="", blank=True, null=True)
14861486

1487-
command = models.CharField(max_length=500, default="", blank=True, null=True)
1487+
command = models.CharField(max_length=5000, default="", blank=True, null=True)
14881488

14891489
local = models.BooleanField(default=True)
14901490

frontend/tasks.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,11 @@ def system(
441441
)
442442
with open(os.path.join(tmpdir, "tmp.sh"), "a") as out:
443443
if log_file:
444-
out.write(f"run.py '{command}' | tee calc.out\n")
444+
# out.write(f"run.py '{command}' | tee calc.out\n")
445+
out.write(f"{command} | tee calc.out\n")
445446
else:
446-
out.write(f"run.py '{command}'\n")
447+
# out.write(f"run.py '{command}'\n")
448+
out.write(f"{command}\n")
447449
sftp_put(
448450
os.path.join(tmpdir, "tmp.sh"),
449451
os.path.join(remote_dir, f"submit_{software}.sh"),
@@ -2514,7 +2516,7 @@ def launch_nwchem_calc(calc, files):
25142516
)
25152517

25162518
ret = system(
2517-
"mpirun -n {PAL} nwchem calc.inp",
2519+
f"mpirun -n {PAL} nwchem calc.inp",
25182520
"calc.out",
25192521
software="NWChem",
25202522
calc_id=calc.id,
@@ -4530,6 +4532,13 @@ def get_Gaussian_xyz(text):
45304532
"Single-Point Energy": nwchem_sp,
45314533
# "Minimum Energy Path": mep,
45324534
},
4535+
"PySCF": {
4536+
# "Geometrical Optimisation": pyscf_opt,
4537+
# "TS Optimisation": pyscf_ts,
4538+
# "Frequency Calculation": pyscf_freq,
4539+
# "Constrained Optimisation": pyscf_scan,
4540+
# "Single-Point Energy": pyscf_sp,
4541+
},
45334542
}
45344543

45354544
time_dict = {}

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ periodictable
2323
pre-commit
2424
psutil==5.7.2
2525
psycopg2-binary
26+
PySCF
2627
git+https://github.com/RaphaelRobidas/pysisyphus@c26992423c52ba6b27b2509e3ad40dc1b3b1d95e
2728
python-magic
2829
rdkit

0 commit comments

Comments
 (0)