<![CDATA[Multiwfn forum / Batching multiple cube generation for several compound]]> http://www.shanxitv.org/wfnbbs/viewtopic.php?id=1663 Fri, 23 May 2025 14:22:34 +0000 FluxBB <![CDATA[Re: Batching multiple cube generation for several compound]]> http://www.shanxitv.org/wfnbbs/viewtopic.php?pid=5100#p5100 this could be overcome i files generate by multiwfn differ, e.g. by prefix, instead of being constiently l or h, this cause overwriting when i iterate

E.g. this code doesnt work:

#!/bin/bash

# Save the current directory
start_dir=$(pwd)

# Find .mwfn files and process each
find . -type f -name "*.mwfn" | sort | while read -r fullpath; do
    # Extract directory and filename
    dir=$(dirname "$fullpath")
    file=$(basename "$fullpath")

    echo "Processing $file in $dir"

    # Change to the file's directory
    cd "$dir" || continue

    # Run Multiwfn with input commands
    /Users/apm/Applications/Wineskin/Multiwfn.app/Contents/MacOS/wineskinlauncher << EOF
$file
200
3
h
2
3
l
2
0
r
EOF

    # Wait 15 seconds before processing the next file
    sleep 60

    # Return to the original directory
    cd "$start_dir" || exit
done
]]>
Fri, 23 May 2025 14:22:34 +0000 http://www.shanxitv.org/wfnbbs/viewtopic.php?pid=5100#p5100
<![CDATA[Re: Batching multiple cube generation for several compound]]> http://www.shanxitv.org/wfnbbs/viewtopic.php?pid=5099#p5099 Unfortunately,  it does for me— My computer freezes and I am not able to do anything. I need to reset it

]]>
Thu, 22 May 2025 07:43:54 +0000 http://www.shanxitv.org/wfnbbs/viewtopic.php?pid=5099#p5099
<![CDATA[Re: Batching multiple cube generation for several compound]]> http://www.shanxitv.org/wfnbbs/viewtopic.php?pid=5096#p5096 It doesn't matter, no extra computational cost.

]]>
Wed, 21 May 2025 02:55:52 +0000 http://www.shanxitv.org/wfnbbs/viewtopic.php?pid=5096#p5096
<![CDATA[Re: Batching multiple cube generation for several compound]]> http://www.shanxitv.org/wfnbbs/viewtopic.php?pid=5095#p5095 But this results in multiple Multiwfn instances being run one by one, instead of reloading.

]]>
Tue, 20 May 2025 20:14:33 +0000 http://www.shanxitv.org/wfnbbs/viewtopic.php?pid=5095#p5095
<![CDATA[Re: Batching multiple cube generation for several compound]]> http://www.shanxitv.org/wfnbbs/viewtopic.php?pid=5093#p5093 Please check Section 5.3 of Multiwfn manual, where I described how to use Multiwfn in batch mode by writting Linux shell script

]]>
Tue, 20 May 2025 16:24:10 +0000 http://www.shanxitv.org/wfnbbs/viewtopic.php?pid=5093#p5093
<![CDATA[Batching multiple cube generation for several compound]]> http://www.shanxitv.org/wfnbbs/viewtopic.php?pid=5091#p5091 Hello
In my current directory [.] are folders named after *.mwfn generated with NTO for different excitations (S1, T1, T2...). So it is like

./compound1-S1/compound1-S1.mwfn
./compound1-T1/compound1-T1.mwfn
./compound2-S1/compound2-S1.mwfn
./compound2-T1/compound2-T1.mwfn
./compound2-T2/compound2-T2.mwfn

I need to generate CUBES for occupied and virtual orbitals for each .mwfn file. The commands sequence is:

200
3
h
2
3
l
2
0

Can you share batch code to do that? I dont know programming and doing it manually is cumbersome sad
Thanks

]]>
Tue, 20 May 2025 10:47:17 +0000 http://www.shanxitv.org/wfnbbs/viewtopic.php?pid=5091#p5091
久久精品国产99久久香蕉