From: Josh Vermaas (
Date: Fri Dec 18 2015 - 18:00:02 CST

Hi Tom,

The mol urlload command looks like its on a totally different codepath
that is hardcoded to not append to a file. In cmd_mol.C (line 492), you
have this line:
int molid = app->molecule_load(-1, localfile, argv[2], &spec);
The -1 is what is killing you, as that tells VMD to create a new
molecule every time you call the command. Addfile does this instead,
where it had previously figured out which molid you wanted to add the
file to (Line 935, same file):
molid = app->molecule_load(molid, argv[2], type, &spec);

If you wanted this feature, it'd be a matter of creating a new legal
argument for type that addfile would know how to handle as a special
case, since url isn't a legal type as far as VMD is concerned... yet.
Something like:

mol addfile type url http://stuff

would need trigger the file fetch via vmd_mol_urlload (which is actually
in a tcl script! scripts/vmd/vmdinit.tcl is where the code is hiding)
and then detect the ACTUAL filetype based on the extension. John might
have a more elegant way of doing this. Now I'm curious though. When is
this more useful than downloading them to your own machine first? DCDs
get big quick, and I can't imagine that getting them from the internet
is faster than downloading them once to a local disk and then using the
usual addfile commands every time you rerun a script.

-Josh Vermaas

On 12/18/2015 04:41 PM, Thomas C Bishop wrote:
> Dear VMD,
> i figured out the webpdb and urlload commands... even for loading a
> dcd....slick!
> but how do I "mol add url" instead of just urlload?
> Seems that unless I add the dcd to an existing structure there are
> display problems and other information that's not in a dcd that I can
> only get with a mol load equivalent.
> Thanks in advance for telling me how to do this.
> Happy Hollidays.
> Tom