VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Mar 01 2011 - 11:28:30 CST
- Next message: Mao Mao: "question about the inorganic builder"
- Previous message: John Stone: "Re: Compiling Fortran bindings for the VMD molfile plugins"
- In reply to: Axel Kohlmeyer: "Re: Compiling Fortran bindings for the VMD molfile plugins"
- Next in thread: Susana Tomasio: "Re: Compiling Fortran bindings for the VMD molfile plugins"
- Reply: Susana Tomasio: "Re: Compiling Fortran bindings for the VMD molfile plugins"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Axel,
Yes, in principle one could use the dynamic plugins, but without
the necessary loading infrastructure implemented, it's not what I'd suggest
for someone just getting started. This is exactly why I said "it would be
difficult", since one would first have to write the loading code. ;-)
This will likely be solved in an upcoming version of the plugin tree
later this summer, as I need the dynamic loading mechanism to be easy
to incorporate into other plugins (like psfgen). When implemented,
it also take care of the Fortran case too.
Cheers,
John
On Tue, Mar 01, 2011 at 12:23:36PM -0500, Axel Kohlmeyer wrote:
> On Tue, Mar 1, 2011 at 11:38 AM, John Stone <johns_at_ks.uiuc.edu> wrote:
> >
> > Susana,
> > Although VMD ships with the dynamically loadable plugins, those
> > would be difficult to use from Fortran. I think you will find it
>
> john,
>
> since the fortran warppers are written in C, there is no principal difference
> to load shared objects instead of the static plugins between the fortran
> wrappers and VMD itself. it is only that i didn't write code for registering
> them in addition to the static ones. lazyness, i guess.
>
> cheers,
> axel.
>
> > much easier to compile the VMD plugins from source code and use the
> > statically linkable version, "libmolfile_plugin.a", that is built
> > when you compile the plugins yourself.
> >
> > Cheers,
> > John Stone
> > vmd_at_ks.uiuc.edu
> >
> > On Tue, Mar 01, 2011 at 04:34:35PM +0000, Susana Tomasio wrote:
> >> Hi John,
> >>
> >> Thank you for your reply.
> >> I do have a directory with the molfile plugins which was created when I
> >> installed vmd.
> >> It includes the .so files such as xyzplugin.so, moldenplugin.so etc. But
> >> the files molfile_plugin.h and
> >> vmdplugin.h are in a different directory.
> >>
> >> Thank you,
> >>
> >> Susana
> >>
> >> On Tue, Mar 1, 2011 at 4:24 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
> >>
> >> Hi Susana,
> >> Before you compile the Fortran bindings, you'll have to have
> >> already compiled the plugins themselves. Did you compile the plugins
> >> before trying to compile the Fortran bindings? If so, there should be a
> >> "compile" subdirectory in your plugin tree containing the plugin
> >> libraries
> >> and header files, which is the first step in the process to linking them
> >> into
> >> your Fortran code.
> >>
> >> Cheers,
> >> John Stone
> >> vmd_at_ks.uiuc.edu
> >>
> >> On Tue, Mar 01, 2011 at 04:16:18PM +0000, Susana Tomasio wrote:
> >> > Hi,
> >> >
> >> > I'm trying to compile the Fortran bindings for the VMD molfile
> >> plugins of
> >> > Axel Kohlmeyer on a MacOSX Snow Leopard.
> >> > I have edited the Makefile to include the architecture and the c
> >> and
> >> > fortran compilers. I also edited NETCDFLIB to include the location
> >> > of netcdf.
> >> > This is how the config section of my Makefile looks like:
> >> >
> >> >
> >> ########################################################################
> >> > ARCH = MACOSX86-64
> >> > ARCHDIR = /Applications/VMD\
> >> > 1.8.7.app/Contents/vmd/plugins/include/
> >> > FC = g77
> >> > #FC = g77
> >> > #-fno-second-underscore
> >> > CC = gcc
> >> > LD = $(FC)
> >> > OPT = -O2 -Wall
> >> > CPPFLAGS = -I../../include -I$(ARCHDIR) #
> >> > -D_F77_F2C_UNDERSCORE
> >> > CFLAGS = -c $(CPPFLAGS) $(OPT)
> >> > FFLAGS = -c $(OPT)
> >> > NETCDFLIB = -L/opt/local/var/macports/software/netcdf/
> >> > #/usr/lib64/netcdf-3
> >> > NETCDFLDFLAGS = -lnetcdf
> >> > TCLLIB =
> >> > TCLLDFLAGS = -ltcl8.4
> >> > LDFLAGS = -L$(ARCHDIR) $(TCLLIB) $(NETCDFLIB)
> >> > LDLIBS = -lmolfile_plugin $(NETCDFLDFLAGS) $(TCLLDFLAGS)
> >> -lstdc++
> >> > -ldl
> >> >
> >> ########################################################################
> >> >
> >> > I also copied the files molfile_plugin.h, vmdplugin.h and
> >> > libmolfile_plugin.h to my working directory.
> >> >
> >> > When I typed "make" I got the following:
> >> >
> >> > g77 -c -O2 -Wall tester.f -o tester.o
> >> > gcc -c -I../../include -I/Applications/VMD\
> >> > 1.8.7.app/Contents/vmd/plugins/include/ -O2 -Wall f77_molfile.c -o
> >> > f77_molfile.o
> >> > g77 -o tester -L/Applications/VMD\
> >> > 1.8.7.app/Contents/vmd/plugins/include/
> >> > -L/opt/local/var/macports/software/netcdf/ tester.o
> >> f77_molfile.o
> >> > -lmolfile_plugin -lnetcdf -ltcl8.4 -lstdc++ -ldl
> >> > ld: library not found for -lmolfile_plugin
> >> > collect2: ld returned 1 exit status
> >> > make: *** [tester] Error 1
> >> >
> >> > I don't understand this error. It looks like it cannot find
> >> > -lmolfile_plugin. But I don't think that there is such file.
> >> >
> >> > I would be grateful if anyone could help me with this.
> >> >
> >> > Thank you.
> >> >
> >> > Kind regards,
> >> >
> >> > Susana
> >> --
> >> NIH Resource for Macromolecular Modeling and Bioinformatics
> >> Beckman Institute for Advanced Science and Technology
> >> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> >> Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> >> WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> >
> > --
> > NIH Resource for Macromolecular Modeling and Bioinformatics
> > Beckman Institute for Advanced Science and Technology
> > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> > WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> >
>
>
>
> --
> Dr. Axel Kohlmeyer
> akohlmey_at_gmail.com http://goo.gl/1wk0
>
> Institute for Computational Molecular Science
> Temple University, Philadelphia PA, USA.
-- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 Email: johns_at_ks.uiuc.edu Phone: 217-244-3349 WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
- Next message: Mao Mao: "question about the inorganic builder"
- Previous message: John Stone: "Re: Compiling Fortran bindings for the VMD molfile plugins"
- In reply to: Axel Kohlmeyer: "Re: Compiling Fortran bindings for the VMD molfile plugins"
- Next in thread: Susana Tomasio: "Re: Compiling Fortran bindings for the VMD molfile plugins"
- Reply: Susana Tomasio: "Re: Compiling Fortran bindings for the VMD molfile plugins"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]