From: John Stone (
Date: Tue Dec 22 2015 - 09:52:51 CST

  On the road today, so just a quick addendum to Josh's note.
After we taught VMD to automatically load PDBs over the web
via their accession code, the 'urlload' feature didn't get much
(any?) use anymore, so it never got a comparable command in the new
APIs. Since Tcl has http download of any URL built-in, it seemed
that in most cases people would use that rather than something like
urlload. That being said, if people have some smashingly useful or
exciting reason to bring the urlload feature into the new mol commands,
I would certainly consider it.


On Fri, Dec 18, 2015 at 06:00:02PM -0600, Josh Vermaas wrote:
> 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
> >

NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801           Phone: 217-244-3349