Re: Is there really no way of automating pair interaction calculations without invoking NAMD for each pdb file separately?

From: Peter Freddolino (petefred_at_umich.edu)
Date: Thu Nov 01 2018 - 15:45:16 CDT

Just as an addendum to that, under the hood namdenergy is basically just
doing what you are here. Your problem is the repeated calling of
coordinates, which should be taken outside of the loop. You should have the
coordinates for all of your frames in a single dcd file, which is specified
by the 'coorfile open dcd' statement. Also, do you need to be updating the
selections for the interaction every step or not?

This type of calculation is quite easy to set up with namdenergy, and if
you do so in debug mode, you can look at the resulting tcl script to see
what is happening.
Best,
Peter

On Thu, Nov 1, 2018 at 2:06 PM Nielsen, Steven <steven.nielsen_at_utdallas.edu>
wrote:

> Clever use of namdenergy will do it. You would run a full simulation and
> then feed the trajectory (dcd) file to a tcl script invoking the namdenergy
> command.
> -Steve
>
> On Nov 1, 2018, at 11:46 AM, Asghar Razavi <asr2013_at_med.cornell.edu>
> wrote:
>
> Dear all,
>
>
> It is my understanding that to calculate pair interaction energies you
> would need to create a pdb file that specifies which atoms need to be used
> for energy calculations. If I want to calculate interaction energies for
> e.g. 100 pairs, I would need 100 pdb files.
>
> Instead of creating 100 NAMD input files and invoking NAMD 100 times, I
> have been trying to adjust the following script to automatically load each
> pdb file and do the calculations. However, I get the error:
>
>
> TCL: Setting parameter coordinates to C_10_15.pdb
>
> FATAL ERROR: Setting parameter coordinates from script failed!
>
>
>
>
> I have noticed that other people in the past have been experiencing
> similar problems when trying to automate the procedure. Does anyone have a
> better/faster way of doing these calculations or know how to adjust the
> following script to make calculations automated?
>
>
> Thank you very much,
>
> Asghar
>
>
>
> structure wt.psf
>
> paraTypeCharmm on
>
> parameters par_all36_prot.prm
>
> parameters par_all36_lipid.prm
>
> parameters par_water_ions.prm
>
> numsteps 1
>
> exclude scaled1-4
>
> outputname namd-temp
>
> temperature 0
>
> COMmotion yes
>
> cutoff 12
>
> dielectric 1.0
>
> switchdist 10
>
> pairInteraction on
>
> pairInteractionGroup1 1
>
> pairInteractionGroup2 2
>
> pairInteractionSelf off
>
>
> for {set i 14} {$i < 18} {incr i} {
>
> coordinates C_10_$i.pdb
>
> pairInteractionFile C_10_$i.pdb
>
> coorfile open dcd tmp_10.dcd
>
> set ts 0
>
> while { ![coorfile read] } {
>
> firstTimestep $ts
>
> run 0
>
> incr ts 1
>
> }
>
> coorfile close
>
> }
>
>
>
>
> -----------------------------------------------
> *Asghar Razavi *
> Postdoctoral Associate
> Department of Physiology and Biophysics
>
> *Weill Cornell Medical College **(WCMC)*
> 1300 York Avenue, Room C505
>
> New York, NY 10065
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__maps.google.com_maps-3Fz-3D16-26q-3D1300-2Byork-2Bavenue-2C-2Broom-2Bc503-2Bnew-2Byork-2C-2Bny-2B10065&d=DwMGaQ&c=OCIEmEwdEq_aNlsP4fF3gFqSN-E3mlr2t9JcDdfOZag&r=jUfnSyKkfkyVRBIUzlG1GSGGZAZGcznwr8YliSSCjPc&m=z_WEN8cHPqdpfKRTmql3F3pPXc8uR_xEXkE0kGjIxo4&s=cPTCRuazCxFcq_UhydfqHf-ED-RiSBFBc80Cxb1ChYI&e=>
>
> *Email:* asr2013_at_med.cornell.edu
> *Website:*
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__physiology.med.cornell.edu_faculty_hweinstein_index.html&d=DwMGaQ&c=OCIEmEwdEq_aNlsP4fF3gFqSN-E3mlr2t9JcDdfOZag&r=jUfnSyKkfkyVRBIUzlG1GSGGZAZGcznwr8YliSSCjPc&m=z_WEN8cHPqdpfKRTmql3F3pPXc8uR_xEXkE0kGjIxo4&s=BHWV0bQ7Z7gaE6e5dFrD4G768E41HOSmSBVW2ew0ZeE&e=>
> https://asgharrazavi.net
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__asgharrazavi.net&d=DwMGaQ&c=OCIEmEwdEq_aNlsP4fF3gFqSN-E3mlr2t9JcDdfOZag&r=jUfnSyKkfkyVRBIUzlG1GSGGZAZGcznwr8YliSSCjPc&m=z_WEN8cHPqdpfKRTmql3F3pPXc8uR_xEXkE0kGjIxo4&s=Rt-UGvCIXYWW4UJ88H6kfSsEssu5UhakJYJTwpEDa8k&e=>
>
>

This archive was generated by hypermail 2.1.6 : Wed Sep 18 2019 - 23:20:26 CDT