I have bee working with the input files and have found that the default name is job whatever. If I am running through several molecules I have to take the time to rename them to a unique name. It seems to me it would be better to have the default name to be the same as the filename you are studying. So if I were using MOPAC on benzene the default would be benzene.mop. I might even suggest “benzene-Eq_Geo” so that the calculation type would included in the default. Also the input generator defaults to 1 core. My computer has 10 cores and 10 threads. For things like this it would be good to have a settings file that the user could fill out and have it default to what the computer has available.
The nightly builds remember settings in the input generators, yes.
I’ll take a look at the default filenames later this afternoon.
@Helium5793 Are these i) large batches of input files to generate and ii) are the instructions to deliver to MOPAC per batch the same? Do you feel comfortable with the command line?
Let’s assume you have two structure files, benzene.xyz and pyridine.xyz in one folder, and you have openbabel at hand, you can convert the two into .mop
$ obabel *.xyz -O .mop -m
2 molecules converted
2 files output. The first is benzene.mop
where flag -m just tells that there multiple input files (for openbabel) to convert from .xyz to .mop. File pyridine.mop for instance reads
PUT KEYWORDS HERE
pyridine.xyz
C 1.43303 1 0.05159 1 0.00100 1
C 0.68800 1 1.22595 1 0.00151 1
C -0.69424 1 1.12563 1 0.00218 1
N -1.36237 1 -0.04853 1 0.00552 1
C -0.61197 1 -1.17189 1 0.00692 1
C 0.77379 1 -1.17331 1 0.00332 1
H 2.51852 1 0.09036 1 -0.00113 1
H 1.17153 1 2.19630 1 0.00127 1
H -1.31976 1 2.01344 1 0.00006 1
H -1.17257 1 -2.10232 1 0.01145 1
H 1.32543 1 -2.10632 1 0.00270 1
which a UNIX like operating system (for instance Linux Debian) can adjust further by
sed -i 's/PUT KEYWORDS HERE/pm3 charge=0 cycles=200/g' *.mop
to instruct MOPAC about the level of theory, the charge, the maximal number of iterations to improve the geometry, etc. by substitution of the placeholder PUT KEYWORDS HERE openbabel added. (Openbabel has an optional -k flag to write the instructions for MOPAC into the .mop, too).
Instead, let us assume this. One wants to compare the properties of benzene, toluene, all the Xylenes, and mesitylenes in mopac(or any of the outputs) So one loads the structures in and calls mopac to write the mop file. All the files are named job.mop. So one has to rename them all before mopac can be run on them. Why not have the name of the file (benzene..etc) be the default name that avogadro assigns in this situation? and not have to manually do that. Avogadro knows the file name from the structure it is working with. It just has to use it. Having to call openbabel doesn’t seem necessary.
Yes, it’s a good idea. I added the patch, so it’s now part of the continuous / nightly builds for 2.1.
@Thomas is indicating another way to set up a batch of files. For example, many times people will have a set of existing compounds, or a file with a set of SMILES and want to create a batch of dozens of input files. (Indeed, this is one of the reasons I created Open Babel in the first place.)
An extension of the GUI based approach could be to offer to read multiple input files (.xyz, .sdf, etc.) in batches - similar to the conversion of multiple images in batches by irfanview (Windows only) or xnconvert (linux, macos, windows).
The idea would be a small interface where
- one line would allow the user to enter the keywords for MOPAC, Gaussian, etc which every file written by Avogadro should include
- similar to a file manager an area which only lists the input files (perspective of Avogadro2) to prepare / provide with the MOPAC instruction
- a field which allows to define the eventual output format (in perspective of Avogadro2) to write to (e.g., .mop)
- a button which actually starts the batch conversion (which retains the stem of the files’ file name,
benzene_125.sdfwould be rewritten asbenzene_125.mop)
Because this is so close to the GUI of openbabel, I checked again if it were available. At least for the version of openbabel-gui 3.1.1+dfsg-14+b2 in Debian 14/forky (testing branch), this seems not yet available and the placeholder PUT KEYWORDS HERE is always put into the output:
and the provision of a keyword like PM3 as a property to append the title does not work


