I have a self-inflicted problem with the input files that I am generating using RDKit in order to automate my ORCA jobs. I like to keep track of data such as:

  • The name of a mol
  • The SMILES of a mol
  • The path of an .inp file
  • The ID ("%.08d" format string number) of a mol

and other stuff from the generated initial geometries, to the executed .inp files themselves. This helps me keep track of what comes from where and getting infos on the mols from the output files after the calculations are done using a python script.

So what I essentially do is add a line like:


to my .inp files and so later on I can get all the info from the output file, since that will also show the .inp file at the top of the output file.

The problem is: SMILES strings use the the hash/pound character "#" to denote triple bonds. So if I have a mol that has, for example, a nitrile inside it, then I would have a comment like this:


What is necessarily going to happen, since "#" is the typical comment char, is that ORCA will interpret "SMILES: N" as a command, and only everything afterwards as a comment, which leads to the following error:

[file orca_main/maininp1.cpp, line 17547]: ERROR: expect a '$', '!', '%', '*' or '[' in the input

So it tries to find a command, but obviously there will not be anything intelligible for ORCA in that line. And so it crashes.

My question is: Is there a way around that? I could just rewrite my scripts in such a way that a SMILES will be added to the file as: C[HASH]N... and then just later re-substitute [HASH] for #, but I wanted to know if there may be a creative way around that.

Does ORCA have more options for comments that allow me to circumvent this issue? I didn't find anything useful in the manual unfortunately.

  • 1
    $\begingroup$ I'd suggest posting this on the ORCA forum .. I know they're working to finish ORCA 6, so it would be a great suggestion. $\endgroup$ Oct 10, 2023 at 16:41
  • $\begingroup$ In the meantime, I'd definitely replace the triple bond character, for example with "&" maybe? $\endgroup$ Oct 10, 2023 at 16:44

1 Answer 1


From the ORCA documentation (ORCA 5.0.4), using double '#' in ORCA input files closes the comment. I am quoting from the ORCA manual.

Comments can also be closed by a second “#”, as in the example below where TolE and TolMaxP are two variables that can be user-specified:

TolE=1e-5; #Energy conv.# TolMaxP=1e-6; #Density conv.#

In my opinion, you have to substitute the character '#' which denotes the triple bond.

  • 2
    $\begingroup$ Yeah looks like it's the only way unfortunately. Would be cool if there was a way to comment everything until the next newline char. $\endgroup$
    – J.Doe
    Oct 10, 2023 at 7:56
  • $\begingroup$ Very true indeed. $\endgroup$
    – Pro
    Oct 10, 2023 at 14:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .