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 doneUnfortunately, it does for me— My computer freezes and I am not able to do anything. I need to reset it
It doesn't matter, no extra computational cost.
But this results in multiple Multiwfn instances being run one by one, instead of reloading.
Please check Section 5.3 of Multiwfn manual, where I described how to use Multiwfn in batch mode by writting Linux shell script
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.mwfnI need to generate CUBES for occupied and virtual orbitals for each .mwfn file. The commands sequence is:
200 3 h 2 3 l 2 0Can you share batch code to do that? I dont know programming and doing it manually is cumbersome ![]()
Thanks