Skip to content

Argument list too long error #15

@jackzzs

Description

@jackzzs

In prepare_ligands_ad.sh:

obabel -isdf *sdf -opdbqt -m
rm *sdf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions