Attempts to use CLI arguments that contain \n result in the backslash being escaped to give \\n which is later not recongnised as a newline character. Instead, the intended result can be achieved by opening a '' (single quotation) or "" (double quotation)block in the command line so that the terminal known we need to close such block and when we hit the return key the newline character will be part of the argument passed to ACC.
So, these do not work, as the atomids argument is parsed as a single line so only the first bond is removed:
autocompchem -t editbonds --infile ../t2-mol.sdf --outfile out2.sdf --atomids '0 1 REMOVE\n1 2 REMOVE'
autocompchem -t editbonds --infile ../t2-mol.sdf --outfile out2.sdf --atomids "0 1 REMOVE\n1 2 REMOVE"
but, this does work:
autocompchem -t editbonds --infile ../t2-mol.sdf --outfile out2.sdf --atomids '0 1 REMOVE
1 2 REMOVE'
autocompchem -t editbonds --infile ../t2-mol.sdf --outfile out2.sdf --atomids "0 1 REMOVE
1 2 REMOVE"
The expected behavior of using \n is unreliable because of the different behaviors of echo creating false expectations.
We can consider forcing the interpretation of the \n char sequence as a newline character in future releases.
Attempts to use CLI arguments that contain
\nresult in the backslash being escaped to give\\nwhich is later not recongnised as a newline character. Instead, the intended result can be achieved by opening a''(single quotation) or""(double quotation)block in the command line so that the terminal known we need to close such block and when we hit the return key the newline character will be part of the argument passed to ACC.So, these do not work, as the
atomidsargument is parsed as a single line so only the first bond is removed:but, this does work:
The expected behavior of using
\nis unreliable because of the different behaviors ofechocreating false expectations.We can consider forcing the interpretation of the
\nchar sequence as a newline character in future releases.