From: Peter Freddolino (
Date: Tue Sep 06 2022 - 16:42:35 CDT

Hi Enrico,
What is the intended downstream application for the modified file?
Molefacture is pretty tightly wrapped up with the GUI, so this is not going
to be easy to pull off. You can see the set of steps that it uses in the
::Molefacture::add_all_hydrogen function in molefacture_builder.tcl, but I
am not sure whether the state will update properly without the GUI running.
(Perhaps someone who has worked on molefacture more recently than me can
provide an estimate. It definitely would have crashed and burned last I
tried). This package is really intended for interactive usage. Using
babel/openbabel (general case) or psfgen (if you're planning to use the
resulting molecules for MD simulations with NAMD) is almost certainly going
to be easier.

On Tue, Sep 6, 2022 at 6:03 AM Enrico Martinez <>

> Dear VMD users!
> I need to protonate a small molecule using the Molefacture plugin. I
> have already done it via VMD gui and now would like to test batch mode
> that should be activated using:
> vmd -dispdev text -e input.file |& output.file
> Could you please suggest to me a possibility of the script which will
> call Molefacture from the script for such purpose?
> Many thanks in advance
> Enrico