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

From: Asghar Razavi (asr2013_at_med.cornell.edu)
Date: Fri Nov 02 2018 - 08:30:21 CDT

Thank you Peter and Steve for your comments. I am following Steve's approach in using namdenergy for the calculations. It is still invoking NAMD for each set of calculations, but, at least I don't need to create pdb files by hand.

@ Peter: I do have all my coordinates in a single dcd file. I don't need to update selection of atoms for each step. However, I want to calculate interaction energies for > 100 pairs of residues. It would help a lot if NAMD allowed reassignments of interacting residues, so that calculations could be done faster. My system is large and invoking NAMD to initiate calculations every time takes more than 10% of the total calculation time.

Regards,

Asghar

-----------------------------------------------
Asghar Razavi
Postdoctoral Associate
Department of Physiology and Biophysics

Weill Cornell Medical College (WCMC)
1300 York Avenue, Room C505

New York, NY 10065<http://maps.google.com/maps?z=16&q=1300+york+avenue,+room+c503+new+york,+ny+10065>

Email: asr2013_at_med.cornell.edu
Website: <http://physiology.med.cornell.edu/faculty/hweinstein/index.html> https://asgharrazavi.net
________________________________
From: Peter Freddolino <petefred_at_umich.edu>
Sent: Thursday, November 1, 2018 4:45:16 PM
To: <namd-l_at_ks.uiuc.edu>; steven.nielsen_at_utdallas.edu
Cc: Asghar Razavi
Subject: [EXTERNAL] Re: namd-l: Is there really no way of automating pair interaction calculations without invoking NAMD for each pdb file separately?

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<mailto: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<mailto: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<mailto: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.netkfSsEssu5UhakJYJTwpEDa8k&e=>

This archive was generated by hypermail 2.1.6 : Tue Dec 31 2019 - 23:20:18 CST