To whom it may concern,
   I have a set of about 20,000 pdb files to which I would like to add Hydrogens, add partial charges, and convert to the mol2 format. I have written a python script to perform these tasks, which it does without issue when opened from the GUI using the "open" option in the top left corner. However, as soon as the script start srunning, I become unable to interact with the Chimera GUI and my computer warns that the application is not responding. While it continues to iterate through the pdb files and convert them to mol2 files, this process slows down drastically over time, from one file per second to over 30 seconds between files, a rate that is prohibitively slow. It is not clear to me why these issues are occurring, as there is nothing about the way my script is written that should increase the computational load over time.
   Based on the unresponsiveness of the Chimera application, I assumed that the slowdown might have something to do with the GUI, so I instead ran my script from the terminal, using chimera -- nogui  python_script.py . This resulted in a rate of file conversion that was much faster than the GUI even before its slowdown, but it raised an error that was never a problem in the GUI: Cannot properly run "/Applications/Chimera.app/Contents/Resources/bin/amber18/bin/sqm -O -i sqm.in -o sqm.out". This only occurred on nonstandard amino acid residues, but the error was not solely determined by the residue's identity, as many carboxylated lysine residues were processed properly before the system encountered one particular file whose KCX residue caused it to crash. However, the error is consistent, meaning that the same KCX residue on that particular file always causes the program to crash. I have had no luck searching for the error online, but I am happy to include the entire error message in context if that would be helpful.
   More generally, I don't understand why running the exact same python script through the GUI and through the terminal window gives such different results. I'm happy to do it either way as long as the operation can be completed successfully within a day or two, and I would be very thankful for any advice you may have.

Sincerely,
Rafi Brent