Skip to content

Commit 0a29510

Browse files
author
andy
committed
Merge remote-tracking branch 'origin/main' into wip/mac-remote
# Conflicts: # .github/workflows/build.yml
2 parents 2c5ad9d + 92638b5 commit 0a29510

136 files changed

Lines changed: 21586 additions & 23 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/build.yml‎

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
libwxgtk3.2-dev libxerces-c-dev libgl-dev libglu1-mesa-dev \
8383
libgtk-3-dev libx11-dev libice-dev libxt-dev libjpeg-dev \
8484
libmosquitto-dev mosquitto-dev libaprutil1-dev mosquitto git dpkg-dev file libssh-dev libssl-dev \
85-
python3 libcoin-dev libegl-dev
85+
python3 libcoin-dev libegl-dev libxc-dev libeigen3-dev
8686
8787
- uses: actions/checkout@v4
8888

@@ -100,6 +100,17 @@ jobs:
100100
- name: No build paths in the packages
101101
run: tests/packaging/no-build-paths.sh "$GITHUB_WORKSPACE" build-cmake/*.deb
102102

103+
# ecce-qm is in the client package, stripped, and gives ORCA's energies.
104+
- name: ecce-qm in the package
105+
run: |
106+
d=$(mktemp -d)
107+
ls -l build-cmake/*.deb
108+
dpkg-deb -x build-cmake/ecce-client_*.deb "$d"
109+
q=$(find "$d" -path '*/bin/ecce-qm')
110+
test -n "$q"
111+
file "$q" || true
112+
python3 tests/qm/package_check.py "$q" "$(dirname "$q")/../data/admin/basissets" --max-mb 40
113+
103114
- uses: actions/upload-artifact@v4
104115
with:
105116
name: ecce-debian-trixie-deb
@@ -150,7 +161,7 @@ jobs:
150161
libwxgtk3.2-dev libxerces-c-dev libgl-dev libglu1-mesa-dev \
151162
libgtk-3-dev libx11-dev libice-dev libxt-dev libjpeg-dev \
152163
libmosquitto-dev mosquitto-dev libaprutil1-dev mosquitto git dpkg-dev libssh-dev libssl-dev \
153-
python3 libcoin-dev libegl-dev
164+
python3 libcoin-dev libegl-dev libxc-dev libeigen3-dev
154165
155166
- name: Configure
156167
run: cmake -G Ninja -B build-cmake -DECCE_REQUIRE_LIBSSH=ON
@@ -166,6 +177,17 @@ jobs:
166177
- name: No build paths in the packages
167178
run: tests/packaging/no-build-paths.sh "$GITHUB_WORKSPACE" build-cmake/*.deb
168179

180+
# ecce-qm is in the client package, stripped, and gives ORCA's energies.
181+
- name: ecce-qm in the package
182+
run: |
183+
d=$(mktemp -d)
184+
ls -l build-cmake/*.deb
185+
dpkg-deb -x build-cmake/ecce-client_*.deb "$d"
186+
q=$(find "$d" -path '*/bin/ecce-qm')
187+
test -n "$q"
188+
file "$q" || true
189+
python3 tests/qm/package_check.py "$q" "$(dirname "$q")/../data/admin/basissets" --max-mb 40
190+
169191
- uses: actions/upload-artifact@v4
170192
with:
171193
name: ecce-ubuntu-latest-deb
@@ -226,6 +248,17 @@ jobs:
226248
command -v cpio >/dev/null || dnf install -y cpio
227249
tests/packaging/no-build-paths.sh "$GITHUB_WORKSPACE" build-cmake/*.rpm
228250
251+
- name: ecce-qm in the client rpm
252+
run: |
253+
w=$PWD
254+
d=$(mktemp -d)
255+
ls -l "$w"/build-cmake/*.rpm
256+
(cd "$d" && rpm2cpio "$w"/build-cmake/ecce-client-*.x86_64.rpm | cpio -idm 2>/dev/null)
257+
q=$(find "$d" -path '*/bin/ecce-qm')
258+
test -n "$q"
259+
ls -l "$q"
260+
python3 tests/qm/package_check.py "$q" "$(dirname "$q")/../data/admin/basissets" --max-mb 40
261+
229262
- uses: actions/upload-artifact@v4
230263
with:
231264
name: ecce-rockylinux9-rpm
@@ -248,7 +281,7 @@ jobs:
248281
mesa-libGL-devel mesa-libGLU-devel \
249282
gtk3-devel libX11-devel libICE-devel libXt-devel libjpeg-turbo-devel \
250283
mosquitto-devel apr-util-devel mosquitto libssh-devel openssl-devel \
251-
Coin4-devel mesa-libEGL-devel python3
284+
Coin4-devel mesa-libEGL-devel python3 libxc-devel eigen3-devel
252285
253286
- name: Check out source
254287
run: |
@@ -275,6 +308,17 @@ jobs:
275308
command -v cpio >/dev/null || dnf install -y cpio
276309
tests/packaging/no-build-paths.sh "$GITHUB_WORKSPACE" build-cmake/*.rpm
277310
311+
- name: ecce-qm in the client rpm
312+
run: |
313+
w=$PWD
314+
d=$(mktemp -d)
315+
ls -l "$w"/build-cmake/*.rpm
316+
(cd "$d" && rpm2cpio "$w"/build-cmake/ecce-client-*.x86_64.rpm | cpio -idm 2>/dev/null)
317+
q=$(find "$d" -path '*/bin/ecce-qm')
318+
test -n "$q"
319+
ls -l "$q"
320+
python3 tests/qm/package_check.py "$q" "$(dirname "$q")/../data/admin/basissets" --max-mb 40
321+
278322
- uses: actions/upload-artifact@v4
279323
with:
280324
name: ecce-fedora-latest-rpm
@@ -427,6 +471,16 @@ jobs:
427471
sed -n '/^Mach-O files/,$p' minos/minos.txt; echo '```'; } >> "$GITHUB_STEP_SUMMARY"
428472
exit ${rc:-0}
429473
474+
- name: ecce-qm in the app
475+
run: |
476+
mnt=$(mktemp -d)
477+
hdiutil attach dist/ECCE-*.dmg -mountpoint "$mnt" -nobrowse -quiet
478+
q="$mnt/ECCE.app/Contents/Resources/ecce/bin/ecce-qm"
479+
test -x "$q"
480+
python3 tests/qm/package_check.py "$q" "$mnt/ECCE.app/Contents/Resources/ecce/data/admin/basissets" --max-mb 40 | tee -a "$GITHUB_STEP_SUMMARY" || rc=$?
481+
hdiutil detach "$mnt" -quiet
482+
exit ${rc:-0}
483+
430484
- name: Run the packaged app
431485
if: always() && hashFiles('dist/*.dmg') != ''
432486
timeout-minutes: 25
@@ -576,6 +630,14 @@ jobs:
576630
# launchjob is a test driver, not part of the package.
577631
Copy-Item build\launchjob.exe "$d\ecce\bin\"
578632
633+
- name: ecce-qm in the zip
634+
shell: pwsh
635+
run: |
636+
$r = "$env:RUNNER_TEMP\unpacked\ecce"
637+
$env:Path = "$env:SystemRoot\System32;$env:SystemRoot"
638+
& "$r\python\python3.exe" tests/qm/package_check.py "$r\bin\ecce-qm.exe" "$r\data\admin\basissets" --max-mb 40 2>&1 | Tee-Object -Append $env:GITHUB_STEP_SUMMARY
639+
exit $LASTEXITCODE
640+
579641
# Local job end to end from the unpacked zip, with System32 as the only
580642
# PATH outside it (tests/windows/launch_local.py): no MSYS2 involved.
581643
- name: Local jobs (complete, cancel)

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ install-tree/
1818
verify-logs/
1919
dg-state/
2020
tests/containers/logs/
21+
/build-qm/

‎CMakeLists.txt‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,6 +2027,15 @@ if(PYTHON3_EXECUTABLE)
20272027
set_tests_properties(apps_panel_layouts PROPERTIES TIMEOUT 900
20282028
SKIP_RETURN_CODE 77)
20292029

2030+
# The Builder on an ECCE-QM calculation (fixture from the bundled engine):
2031+
# MOs panel present, MO Diagram not offered; an ORCA calculation as control.
2032+
add_test(NAME apps_ecceqm_builder
2033+
COMMAND ${PYTHON3_EXECUTABLE}
2034+
${CMAKE_CURRENT_SOURCE_DIR}/tests/apps/ecceqm_builder_test.py
2035+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests/apps)
2036+
set_tests_properties(apps_ecceqm_builder PROPERTIES TIMEOUT 900
2037+
SKIP_RETURN_CODE 77)
2038+
20302039
# ORCA orbitals in the MOs panel (#239): a 24-function cc-pVDZ water run
20312040
# draws; a 23-function one gives one plain dialog; the pane fits its rows.
20322041
add_test(NAME apps_orca_mo
@@ -2343,6 +2352,17 @@ if(PYTHON3_EXECUTABLE)
23432352
--build ${CMAKE_BINARY_DIR} --local
23442353
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests/launch)
23452354
set_tests_properties(launch_local PROPERTIES TIMEOUT 900 SKIP_RETURN_CODE 77)
2355+
# ECCE-QM, the bundled engine: water and triplet O2 created, run through
2356+
# Launch in a local data folder, energies against ORCA, MOs normalised.
2357+
if(ECCE_BUILD_QM)
2358+
add_test(NAME launch_ecceqm
2359+
COMMAND ${PYTHON3_EXECUTABLE}
2360+
${CMAKE_CURRENT_SOURCE_DIR}/tests/launch/ecceqm_test.py
2361+
--build ${CMAKE_BINARY_DIR}
2362+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests/launch)
2363+
set_tests_properties(launch_ecceqm PROPERTIES TIMEOUT 900 SKIP_RETURN_CODE 77)
2364+
endif()
2365+
23462366
# A GROMACS MD study through the real editors (private Xvfb), launches and
23472367
# results; skipped (77) without gmx or Xvfb. Needs the GUI apps built.
23482368
add_test(NAME launch_gromacs
@@ -2514,3 +2534,14 @@ if(PYTHON3_EXECUTABLE)
25142534
set_tests_properties(queues_${qm} PROPERTIES TIMEOUT 1200 SKIP_RETURN_CODE 77)
25152535
endforeach()
25162536
endif()
2537+
2538+
# ecce-qm: the small built-in HF/DFT engine (src/qm), registered as the code
2539+
# "ECCE-QM" (data/client/cap/ECCE-QM.edml). On by default, in every package.
2540+
# It fetches libcint (always), and libxc and Eigen unless the system has them
2541+
# (Debian: libxc-dev libeigen3-dev as build dependencies), at configure time.
2542+
# See docs/qm/README.md.
2543+
option(ECCE_BUILD_QM "Build ecce-qm, the built-in HF/DFT engine" ON)
2544+
if(ECCE_BUILD_QM)
2545+
add_subdirectory(src/qm)
2546+
install(TARGETS ecce-qm RUNTIME DESTINATION bin COMPONENT client)
2547+
endif()

‎GETTING_STARTED.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ sudo apt-get install -y \
2020
libwxgtk3.2-dev libxerces-c-dev libgl-dev libglu1-mesa-dev \
2121
libgtk-3-dev libx11-dev libice-dev libxt-dev libjpeg-dev \
2222
libmosquitto-dev mosquitto-dev libaprutil1-dev mosquitto git dpkg-dev file libssh-dev libssl-dev \
23-
python3 libcoin-dev libegl-dev
23+
python3 libcoin-dev libegl-dev libxc-dev libeigen3-dev
2424
```
2525

26+
`libxc-dev` and `libeigen3-dev` are for ecce-qm, the engine ECCE bundles (code
27+
ECCE-QM); without them the build downloads libxc and Eigen at configure time,
28+
as it always does for libcint. `-DECCE_BUILD_QM=OFF` leaves the engine out.
29+
2630
On Rocky 9 (with EPEL and CRB enabled) and Fedora the Coin3D packages are
2731
`Coin4-devel` (runtime `Coin4`) and `mesa-libEGL-devel`; OpenSSL is
2832
`openssl-devel` (`libssl-dev` on Debian).

‎data/client/cap/ECCE-QM.edml‎

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
3+
<!--
4+
ECCE-QM: the small HF/DFT engine bundled with ECCE (src/qm, program
5+
ecce-qm), for teaching-size molecules. Runs on the machine ECCE runs
6+
on; there is nothing to install or register.
7+
8+
Kept deliberately small, because it is for students: HF and DFT
9+
(SVWN, PBE, B3LYP, PBE0), Energy only so far (to add Opt, add its
10+
runtype to the theories below, teach ai.ecceqm's RunType() and the
11+
input format a gradient step), and a fixed list of basis sets chosen
12+
from the Calculation Editor's quick-pick menu. The Basis Set Tool is
13+
not used.
14+
15+
The code's name, ECCE-QM, appears here (the file name), in
16+
ResourceDescriptor*.xml, the machine lists (siteconfig/Machines),
17+
RefMachine.C's bundledCode(), scripts/gensub and the mimetypes.
18+
19+
Orbitals come from ecce-qm's own output (scripts/parsers/ecceqm.parse),
20+
columns in ECCE's order (atoms, then shells sorted by angular momentum);
21+
MOOrdering below gives the order within a shell, taken from libcint's
22+
real harmonics by fitting each function to monomials, and checked by
23+
trace(P S) equal to the electron count.
24+
-->
25+
26+
<appdescriptor>
27+
28+
<GaussianBasisSetRules>
29+
<MaxLValue>4</MaxLValue>
30+
<ECPS>False</ECPS>
31+
<GeneralContractions>False</GeneralContractions>
32+
<PreferOptimization> True</PreferOptimization>
33+
<MaxPrimitives>100 100 100 100 100 100</MaxPrimitives>
34+
<MaxSharedExponent> 1 </MaxSharedExponent>
35+
<SphericalCoordinates> True </SphericalCoordinates>
36+
<SphericalOnly>True</SphericalOnly>
37+
<DFTFitting> False</DFTFitting>
38+
<RecommendDFTCharge> False </RecommendDFTCharge>
39+
<RequireFullDFT> False </RequireFullDFT>
40+
<MaxTotalFunctions> 500</MaxTotalFunctions>
41+
<MaxTotalPrimitives> 7500</MaxTotalPrimitives>
42+
<MultipleOrbitals> false</MultipleOrbitals>
43+
<LibraryNames> False</LibraryNames>
44+
<AllowMultipleOrbitals>False</AllowMultipleOrbitals>
45+
</GaussianBasisSetRules>
46+
47+
<SupportsConstraints>false</SupportsConstraints>
48+
49+
<!-- Per-code switch for the MO correlation diagram. The students of the
50+
course this engine was written for are meant to construct the diagram
51+
themselves, so it is not offered; the MO list, energies, occupations
52+
and orbital pictures are. Delete the line (or say true) to lift it. -->
53+
<SupportsMODiagram>false</SupportsMODiagram>
54+
55+
<!-- Cartesian orbitals are not offered (the engine takes spherical
56+
d and f), so this table is never read. -->
57+
<MOOrdering type="cartesian" >
58+
<lshell lval="0" a1="1"></lshell>
59+
<lshell lval="1" a1="x" a2="y" a3="z"></lshell>
60+
<lshell lval="2" a1="xx" a2="yy" a3="zz" a4="xy" a5="xz"
61+
a6="yz"></lshell>
62+
<lshell lval="3" a1="xxx" a2="yyy" a3="zzz" a4="xyy" a5="xxy" a6="xxz"
63+
a7="xzz" a8="yzz" a9="yyz" a10="xyz"></lshell>
64+
<lshell lval="4" a1="zzzz" a2="yzzz" a3="yyzz" a4="yyyz" a5="yyyy"
65+
a6="xzzz" a7="xyzz" a8="xyyz" a9="xyyy" a10="xxzz"
66+
a11="xxyz" a12="xxyy" a13="xxxz" a14="xxxy"
67+
a15="xxxx"></lshell>
68+
</MOOrdering>
69+
70+
<!-- libcint's real solid harmonics, m = -l .. +l. p is x y z; d is
71+
xy yz z2 xz x2-y2; f is y(3x2-y2) xyz y(4z2-x2-y2) z(2z2-3x2-3y2)
72+
x(4z2-x2-y2) z(x2-y2) x(x2-3y2). Each function's own scale is
73+
irrelevant, its signs and ratios are not. -->
74+
<MOOrdering type="spherical" >
75+
<lshell lval="0" a1="1"></lshell>
76+
<lshell lval="1" a1="x" a2="y" a3="z"></lshell>
77+
<lshell lval="2" a1="xy" a2="yz" a3="-xx/2-yy/2+zz" a4="xz"
78+
a5="xx/2-yy/2"></lshell>
79+
<lshell lval="3" a1="3xxy/2-yyy/2" a2="xyz" a3="-xxy/2-yyy/2+2yzz"
80+
a4="-3xxz/2-3yyz/2+zzz" a5="-xxx/2-xyy/2+2xzz" a6="xxz/2-yyz/2"
81+
a7="xxx/2-3xyy/2"></lshell>
82+
</MOOrdering>
83+
84+
<!-- The basis sets the Calculation Editor offers (its quick-pick menu,
85+
in this order), and the one a new calculation starts with. The Basis
86+
Set Tool is hidden for this code. One list, here. -->
87+
<Editor theorydialog="ecceqmtheory.py"
88+
basisSetPicks="STO-3G,3-21G,6-31G*,cc-pVDZ,def2-SVP"
89+
basisSetDefault="6-31G*"
90+
basisSetToolHidden="true">
91+
<!-- DFT first: a new calculation starts as B3LYP. -->
92+
<Theory category="DFT" name="DFT">
93+
<runtype>Energy</runtype>
94+
</Theory>
95+
<Theory category="SCF" name="HF">
96+
<runtype>Energy</runtype>
97+
</Theory>
98+
99+
<TheorySummary>
100+
<item key="ES.Theory.DFT.XCFunctionals" label="DFT Functional"></item>
101+
</TheorySummary>
102+
</Editor>
103+
104+
<DataFiles>
105+
<Input type="primary" mimetype="chemical/x-ecceqm-input" comment="true" commentstring="#">ecceqm.qmin</Input>
106+
<Output type="primary" mimetype="chemical/x-ecceqm-output">ecceqm.qmout</Output>
107+
<Output type="parse" verifypattern="program ecce-qm" mimetype="chemical/x-ecceqm-output">ecceqm.qmout</Output>
108+
</DataFiles>
109+
110+
<IntegrationFiles>
111+
<Template>ecceqm.tpl</Template>
112+
<InputGenerator>ai.ecceqm</InputGenerator>
113+
<Importer>ECCE-QM.expt</Importer>
114+
<ParseSpecification>ecceqm.desc</ParseSpecification>
115+
<BasisTranslationScript>std2ECCEQM</BasisTranslationScript>
116+
<LaunchPreprocessor>ecceqm.launchpp</LaunchPreprocessor>
117+
</IntegrationFiles>
118+
119+
</appdescriptor>

0 commit comments

Comments
 (0)