From: Nuno Sousa Cerqueira (nscerque_at_fc.up.pt)
Date: Thu Mar 18 2010 - 17:50:33 CDT

Hello,

What am trying to do is the following.
I have developed a small GUI (Tk interface) so that people can easy
load several scenes from VMD.
Each scene (dynamic or static scenes) is stored in a directory and
what I do is to play a vmd state. For dynamics and static scenes this
works fine.

My idea was to do the same thing with the NAMD interactive
simulations, for instance the alanine example.

The script that the GUI runs is something like this:

exec namd2 NAMD_1/alanin.conf &
mol new NAMD_1/alanin.psf type psf
mol addfile NAMD_1/alanin.pdb type pdb

imd connect localhost 2030

It woks ok in the first time. But when I change it for another scene
and select this example again It no longer works.

There are no errors on the output but instead of observing the alanine
dynamic I just see the molecule jumping between two states.

Sample output:

nfo) Using plugin psf for structure file NAMD_1/alanin.psf
psfplugin) no cross-terms defined in PSF file.
Info) Analyzing structure ...
Info) Atoms: 66
Info) Bonds: 65
Info) Angles: 96 Dihedrals: 31 Impropers: 32 Cross-terms: 0
Info) Bondtypes: 0 Angletypes: 0 Dihedraltypes: 0 Impropertypes: 0
Info) Residues: 12
Info) Waters: 0
Warning) Unusual bond between residues: 1 (none) and 2 (protein)
Warning) Unusual bond between residues: 11 (protein) and 12 (none)
Info) Segments: 1
Info) Fragments: 1 Protein: 1 Nucleic: 0
0
Info) Using plugin pdb for coordinates from file NAMD_1/alanin.pdb
Charm++: standalone mode (not using charmrun)
Info) Finished with coordinate file NAMD_1/alanin.pdb.
0
Charm++: scheduler running in netpoll mode.
Info) Connected to same-endian machine
Info) Using multithreaded IMD implementation.
Charm++> cpu topology info is being gathered!
Charm++> 1 unique compute nodes detected!
Info: NAMD 2.7b1 for MacOSX-x86
Info:
Info: Please visit http://www.ks.uiuc.edu/Research/namd/
Info: and send feedback or bug reports to namd_at_ks.uiuc.edu
Info:
Info: Please cite Phillips et al., J. Comp. Chem. 26:1781-1802 (2005)
Info: in all publications reporting results obtained with NAMD.
Info:
Info: Based on Charm++/Converse 60100 for multicore-darwin-x86
Info: Built Mon Mar 23 02:39:30 CDT 2009 by jim on juneau.ks.uiuc.edu
Info: 1 NAMD 2.7b1 MacOSX-x86 1 macnuno.local nuno
Info: Running on 1 processors.
Info: Charm++/Converse parallel runtime startup completed at 0.134066 s
Info: 598.246 MB of memory in use based on ps
Info: Changed directory to NAMD_1
Info: Configuration file is alanin.conf
TCL: Suspending until startup complete.
Info: SIMULATION PARAMETERS:
Info: TIMESTEP 1
Info: NUMBER OF STEPS 100000
Info: STEPS PER CYCLE 20
Info: LOAD BALANCE STRATEGY New Load Balancers -- ASB
Info: LDB PERIOD 4000 steps
Info: FIRST LDB TIMESTEP 100
Info: LAST LDB TIMESTEP -1
Info: LDB BACKGROUND SCALING 1
Info: HOM BACKGROUND SCALING 1
Info: MAX SELF PARTITIONS 20
Info: MAX PAIR PARTITIONS 8
Info: SELF PARTITION ATOMS 154
Info: SELF2 PARTITION ATOMS 154
Info: PAIR PARTITION ATOMS 318
Info: PAIR2 PARTITION ATOMS 637
Info: MIN ATOMS PER PATCH 100
Info: INITIAL TEMPERATURE 300
Info: CENTER OF MASS MOVING INITIALLY? NO
Info: DIELECTRIC 1
Info: EXCLUDE SCALED ONE-FOUR
Info: 1-4 SCALE FACTOR 0.4
Info: NO DCD TRAJECTORY OUTPUT
Info: NO EXTENDED SYSTEM TRAJECTORY OUTPUT
Info: NO VELOCITY DCD OUTPUT
Info: OUTPUT FILENAME output
Info: BINARY OUTPUT FILES WILL BE USED
Info: NO RESTART FILE
Info: SWITCHING ACTIVE
Info: SWITCHING ON 7
Info: SWITCHING OFF 8
Info: PAIRLIST DISTANCE 9
Info: PAIRLIST SHRINK RATE 0.01
Info: PAIRLIST GROW RATE 0.01
Info: PAIRLIST TRIGGER 0.3
Info: PAIRLISTS PER CYCLE 2
Info: PAIRLISTS ENABLED
Info: MARGIN 1
Info: HYDROGEN GROUP CUTOFF 2.5
Info: PATCH DIMENSION 12.5
Info: CROSSTERM ENERGY INCLUDED IN DIHEDRAL
Info: TIMING OUTPUT STEPS 100
Info: INTERACTIVE MD ACTIVE
Info: INTERACTIVE MD PORT 2031
Info: INTERACTIVE MD FREQ 1
Info: WILL AWAIT INTERACTIVE MD CONNECTION
Info: LANGEVIN DYNAMICS ACTIVE
Info: LANGEVIN TEMPERATURE 300
Info: LANGEVIN DAMPING COEFFICIENT IS 5 INVERSE PS
Info: LANGEVIN DYNAMICS NOT APPLIED TO HYDROGENS
Info: USING VERLET I (r-RESPA) MTS SCHEME.
Info: C1 SPLITTING OF LONG RANGE ELECTROSTATICS
Info: PLACING ATOMS IN PATCHES BY HYDROGEN GROUPS
Info: RANDOM NUMBER SEED 1268952576
Info: USE HYDROGEN BONDS? NO
Info: COORDINATE PDB alanin.pdb
Info: STRUCTURE FILE alanin.psf
Info: PARAMETER file: XPLOR format! (default)
Info: PARAMETERS alanin.params
Info: USING ARITHMETIC MEAN TO COMBINE L-J SIGMA PARAMETERS
Info: SUMMARY OF PARAMETERS:
Info: 61 BONDS
Info: 179 ANGLES
Info: 38 DIHEDRAL
Info: 42 IMPROPER
Info: 0 CROSSTERM
Info: 21 VDW
Info: 0 VDW_PAIRS
Info: TIME FOR READING PSF FILE: 0.00109315
Info: TIME FOR READING PDB FILE: 0.000276089
Info:
Info: ****************************
Info: STRUCTURE SUMMARY:
Info: 66 ATOMS
Info: 65 BONDS
Info: 96 ANGLES
Info: 31 DIHEDRALS
Info: 32 IMPROPERS
Info: 0 CROSSTERMS
Info: 0 EXCLUSIONS
Info: 198 DEGREES OF FREEDOM
Info: 55 HYDROGEN GROUPS
Info: TOTAL MASS = 783.886 amu
Info: TOTAL CHARGE = 8.19564e-08 e
Info: *****************************
Info:
Info: Entering startup at 0.171621 s, 598.246 MB of memory in use
Info: Startup phase 0 took 0.00666499 s, 598.246 MB of memory in use
Info: Startup phase 1 took 0.00684404 s, 598.246 MB of memory in use
Info: Startup phase 2 took 0.00740099 s, 598.246 MB of memory in use
Info: PATCH GRID IS 1 BY 1 BY 1
Info: PATCH GRID IS 1-AWAY BY 1-AWAY BY 1-AWAY
Info: REMOVING COM VELOCITY 0.382153 0.103801 -0.409218
Info: LARGEST PATCH (0) HAS 66 ATOMS
Info: CREATING 12 COMPUTE OBJECTS
Info: Startup phase 3 took 0.00722408 s, 598.25 MB of memory in use
Info: Startup phase 4 took 0.00670385 s, 598.266 MB of memory in use
Info: Startup phase 5 took 0.00961804 s, 598.266 MB of memory in use
LDB: Measuring processor speeds ... Done.
Info: Startup phase 6 took 0.00853109 s, 598.266 MB of memory in use
Info: CREATING 12 COMPUTE OBJECTS
Info: useSync: 1 useProxySync: 0
Info: NONBONDED TABLE R-SQUARED SPACING: 0.0625
Info: NONBONDED TABLE SIZE: 705 POINTS
Info: ABSOLUTE IMPRECISION IN FAST TABLE ENERGY: 3.38813e-21 AT 7.99609
Info: RELATIVE IMPRECISION IN FAST TABLE ENERGY: 6.88002e-15 AT 7.96477
Info: ABSOLUTE IMPRECISION IN FAST TABLE FORCE: 6.77626e-21 AT 7.99609
Info: RELATIVE IMPRECISION IN FAST TABLE FORCE: 6.65646e-16 AT 7.96477
Info: ABSOLUTE IMPRECISION IN VDWA TABLE ENERGY: 1.00974e-28 AT 8.05838
Info: RELATIVE IMPRECISION IN VDWA TABLE ENERGY: 1.03763e-15 AT 7.96477
Info: ABSOLUTE IMPRECISION IN VDWA TABLE FORCE: 3.15544e-30 AT 7.96477
Info: RELATIVE IMPRECISION IN VDWA TABLE FORCE: 1.69576e-16 AT 10.7209
Info: ABSOLUTE IMPRECISION IN VDWB TABLE ENERGY: 3.30872e-24 AT 7.93332
Info: RELATIVE IMPRECISION IN VDWB TABLE ENERGY: 1.17076e-15 AT 7.96477
Info: ABSOLUTE IMPRECISION IN VDWB TABLE FORCE: 8.27181e-25 AT 7.96477
Info: RELATIVE IMPRECISION IN VDWB TABLE FORCE: 1.30075e-16 AT 7.96477
Warning: Interactive MD failed to bind to port 2031.
Info: Interactive MD listening on port 1032.
Info: Startup phase 7 took 0.0116479 s, 598.598 MB of memory in use
Info: Startup phase 8 took 0.0138009 s, 598.848 MB of memory in use
Info: Finished startup at 0.250057 s, 598.848 MB of memory in use

Info: INTERACTIVE MD AWAITING CONNECTION
Info) IMD connection ended unexpectedly; connection terminated.

Regards, Nuno

On Mar 18, 2010, at 9:54 PM, Axel Kohlmeyer wrote:

> On Thu, 2010-03-18 at 19:18 +0000, Nuno Sousa Cerqueira wrote:
>> Hello,
>>
>> I am having problems running imd under the shell.
>
> what shell?
>
>> The alanine molecule seems to be jumping only between two conformers,
>> and not as it should be expected, i.e., following the dynamic
>> simulation.
>>
>> I use the following script:
>>
>>
>> mol new NAMD_1/alanin.pdb type pdb
>> mol addfile NAMD_1/alanin.psf type psf
>
> not that it makes a difference, but these two lines
> should be the other way around.
>
>> mol delrep 0 top
>> mol representation Lines
>> mol color ColorID 0
>> mol selection {all}
>> mol addrep top
>> mol drawframes top 0 {now}
>> mol representation Licorice 0.300000 10.000000 10.000000
>> mol color Name
>> mol selection {resid 7 75 539}
>> mol addrep top
>> mol drawframes top 1 {now}
>> mol rename top GLCliq100C1bar.gro
>> set viewpoints([molinfo top]) {{{1 0 0 -17.6829} {0 1 0 -18.1038}
>> {0 0
>> 1 -20.0221} {0 0 0 1}} {{0.293337 0.0118332 -0.955939 0} {-0.241153
>> 0.968506 -0.0620104 0} {0.925099 0.248718 0.286952 0} {0 0 0 1}}
>> {{0.0505537 0 0 0} {0 0.0505537 0 0} {0 0 0.0505537 0} {0 0 0 1}} {{1
>> 0 0 0} {0 1 0 0} {0 0 1 0} {0 0 0 1}}}
>> lappend viewplist [molinfo top]
>> foreach v $viewplist {
>> molinfo $v set {center_matrix rotate_matrix scale_matrix
>> global_matrix} $viewpoints($v)
>> }
>> unset viewplist
>> pbc box
>> axes location off
>> rock y by 0.01
>> animate delete beg 0 end 0 0
>> animate style rock
>> animate speed 0.8
>> animate forward
>
> why animate here?
>
>>
>> imd connect 0 2030
>
> i the machine running NAMD called "0"?
> i seriously doubt that. RTFM!
> this should be something like:
> imd connect my.machine.somewhere.net 2030
>
>> In the background i am running : namd2 alanin.conf
>
> if it is local, then of course the machine
> name could be "localhost" or "127.0.0.1"
>
> cheers,
> axel.
>
>>
>> Regards, Nuno
>>
>
> --
> Dr. Axel Kohlmeyer akohlmey_at_gmail.com
> http://sites.google.com/site/akohlmey/
>
> Institute for Computational Molecular Science
> Temple University, Philadelphia PA, USA.
>