In prepare_ligands_ad.sh:
obabel -isdf *sdf -opdbqt -m
The expansion of *sdf/*/*dlg will cause a "argument list too long" error for millions of files. Also, this is inefficient for an multi-core run.
In order to operate on millions of files, I recommend some optimizations, such as:
# for batch obabel 10000 mols for each core in 24 cores.
find . -type f -name '*.sdf' | xargs -d '\n' -n 10000 -P 24 bash -c 'obabel -isdf "$@" -opdbqt -m;' command
# for faster removal of all sdf files in current dir (20x faster than rm)
perl -e 'for(<*.sdf>){((stat)[9]<(unlink))}'
Thanks for your work.
In
prepare_ligands_ad.sh:obabel -isdf *sdf -opdbqt -mrm *sdfThe expansion of
*sdf/*/*dlgwill cause a "argument list too long" error for millions of files. Also, this is inefficient for an multi-core run.In order to operate on millions of files, I recommend some optimizations, such as:
Thanks for your work.