Skip to content

Commit

Permalink
molpro: fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
markuskowa committed Nov 28, 2024
1 parent cb65d24 commit 56495f2
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions pkgs/apps/molpro/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ in stdenv.mkDerivation {
for bin in ${lib.optionalString (comm == "sockets") "hydra_pmi_proxy mpiexec"} molpro.exe; do
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/$bin
done ''
+ lib.optionalString (comm == "mpipr") ''
done
'' + lib.optionalString (comm == "mpipr") ''
for bin in hydra_pmi_proxy mpiexec mpiexec.hydra hydra_bstrap_proxy; do
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/impi/bin/$bin
Expand All @@ -62,39 +62,39 @@ in stdenv.mkDerivation {
doInstallCheck = true;

installCheckPhase = ''
#
# Minimal check if installation runs properly
#
inp=water
cat << EOF > $inp.inp
basis=STO-3G
geom = {
3
Angstrom
O 0.000000 0.000000 0.000000
H 0.758602 0.000000 0.504284
H 0.758602 0.000000 -0.504284
}
HF
EOF
# pretend this is a writable home dir
export HOME=$PWD
# need to specify interface or: "MPID_nem_tcp_init(373) gethostbyname failed"
${lib.optionalString (comm == "sockets") ''
$out/bin/molpro --launcher \
"$out/bin/mpiexec -iface lo $out/bin/molpro.exe" $inp.inp
''}
${lib.optionalString (comm == "mpipr") ''
#
# Minimal check if installation runs properly
#
inp=water
cat << EOF > $inp.inp
basis=STO-3G
geom = {
3
Angstrom
O 0.000000 0.000000 0.000000
H 0.758602 0.000000 0.504284
H 0.758602 0.000000 -0.504284
}
HF
EOF
# pretend this is a writable home dir
export HOME=$PWD
# need to specify interface or: "MPID_nem_tcp_init(373) gethostbyname failed"
${lib.optionalString (comm == "sockets") ''
$out/bin/molpro --launcher \
"$out/bin/mpiexec -iface lo $out/bin/molpro.exe" $inp.inp
''}
${lib.optionalString (comm == "mpipr") ''
$out/bin/molpro --launcher \
$out/bin/molpro.exe $inp.inp
''}
''}
echo "Check for successful run:"
grep "RHF STATE 1.1 Energy" $inp.out
echo "Check for correct energy:"
grep "RHF STATE 1.1 Energy" $inp.out | grep 74.880174
echo "Check for successful run:"
grep "RHF STATE 1.1 Energy" $inp.out
echo "Check for correct energy:"
grep "RHF STATE 1.1 Energy" $inp.out | grep 74.880174
'';

meta = with lib; {
Expand Down

0 comments on commit 56495f2

Please sign in to comment.