From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Wed Sep 28 2011 - 08:51:38 CDT

On Tue, Sep 27, 2011 at 10:08 PM, Vadim Patsalo <patsalov_at_gmail.com> wrote:
> Hello VMD mailing list,
>
> I am a CHARMM user. I find myself having to constantly type:
>
> vmd -cor X.crd -cor Y.crd -cor Z.crd
>
> when trying to load multiple CHARMM CRDs into the same molecule. I would like to overwrite the default VMD behavior of associating the .crd file extension with the Amber7 CRD plugin, and instead associate it with the COR plugin.
>
> I've attempted to create a symbolic link from crdplugin.so to corplugin.so in
> /Applications/VMD\ 1.9.app/Contents/vmd/plugins/MACOSXX86/molfile/ (Mac OS X)
>
> However, this does nothing. It doesn't appear that VMD uses the dynamic libraries inside ../molfile/, and is even able to recognize .crd files as Amber7 CRD when the crdplugin.so file is moved.

no. this _cannot_ work. this is not how VMD encodes the extensions into plugins.
you'd have to change and recompile the respective plugins. also VMD has all
plugins also linked statically, so you have to step up the version
number of the
external plugin to override the internal one. and even that wouldn't
be sufficient
in your case, since the VMD startup is organized in such a way that file reading
is initiated very early on, long before plugins are initialized.

> Is there a way to correct this behavior at startup inside .vmdrc? I am open to other hackety suggestions. One possibility is to write a wrapper script which takes as input "vmd A.crd B.crd C.crd" and runs the system command "vmd -cor A.crd -cor B.crd -cor C.crd", I suppose. Renaming the files to .cor is not a real option for me.

why can't you rename the files? or create symbolic links (or hard links)?
a name is just a name.
other than that, a shell script wrapper is your best shot.

axel.

> Thanks in advance!
> Vadim
>

-- 
Dr. Axel Kohlmeyer
akohlmey_at_gmail.com http://goo.gl/1wk0
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.