From: Axel Kohlmeyer (
Date: Sat Aug 04 2007 - 16:04:31 CDT

On Sat, 4 Aug 2007, Victor Albert wrote:

VA> Dear VMD users,


VA> I am running a script that spits out a ".pdb" file that I then input
VA> into vmd. I need to be able to add molecules to an already-running copy of
VA> vmd from the command-line instead of opening a new copy of vmd every
VA> time. Thus, everytime I run the script:
VA> Is VMD running?
VA> if running: "add molecule command" - adds molecule to
VA> already-opened vmd
VA> if not: vmd -size 500 500 molecule.pdb - starts new copy of vmd and
VA> adds molecule

VA> The "add molecule command" is the one I'm having trouble with. Is there a
VA> way this can be done?

in principle yes. but why don't you just start VMD and
then run your script from the command prompt and then
do a 'mol new molecule.pdb'?

other than that, you have to open a socket to 'remote control'
vmd through. for more details, see

and the scripts referenced.


VA> - Victor V Albert
VA> VMD for Linux 1.8.5

Axel Kohlmeyer
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
If you make something idiot-proof, the universe creates a better idiot.