How to convert a folder of structures at once

Run athanor batch ./structures --to cdxml --out ./for-chemdraw. Each file gets a line saying ok, with where it went, or failed, with the reason. The exit status is 1 if any file failed.

the athanor command line

Steps

  1. Install the athanor command line.
  2. Put the files in one folder, for example structures.
  3. Run batch with the format you want and a folder for the results:
athanor batch ./structures --to cdxml --out ./for-chemdraw
ok	./structures\aspirin.mol	./for-chemdraw\aspirin.cdxml
ok	./structures\caffeine.smi	./for-chemdraw\caffeine.cdxml
failed	./structures\notes.mol	file ended early
  1. Each line is tab-separated: ok, the file, and where its result went; or failed, the file, and the reason. Fix or remove the failed files and run it again.

The results take each file's name with the new extension. Without --out, they are written beside the originals.

Which files it converts

  • Every file whose extension is a format Athanor reads: .smi, .mol, .sdf (its first record), .cdxml, .mrv, .cml, .xyz, .cif and .athanor.
  • Files already in the target format are skipped, and so are files it does not recognize. Skipped files get no line.

The formats you can convert to are in the command reference.

In a script

The exit status is 0 when every file converted and 1 when any failed, so a script can stop and report:

athanor batch ./structures --to mol --out ./mol || echo "Some files failed"

Is this helpful?

Last updated Nov 12, 2026