RE: Can Namd 2.14 and genpsf 2.0 process halogen bonds?

From: Pang, Yui Tik (
Date: Tue Oct 27 2020 - 13:00:14 CDT

Hi Nan,

It is not clear what is the cause of issue from the email, but I can share my ways of getting the psf file with the halogen virtual particle.

Method 1) Use ffTK

In my opinion the easiest way is to use the VMD plugin Force field toolkit (ffTK). Even if you do not plan to optimize the parameters, you can still use ffTK to process the CGenFF output and get the psf file. First, make sure you have the latest VMD 1.9.4 LATEST ALPHA version, then you can open ffTK by Extension -> Modeling -> Force Field Toolkit. Under the first tab “BuildPar”, expand the view under “Prepare Parameterization from CGenFF Program Output”, then put in the files required and click “Analyze Input” -> “Write PSF/PDB”

Method 2) Use psfgen 2.0

I am not sure why psfgen did not generate the NUMLP lines for you. I think the first thing to check is whether the psfgen you are using is truly the 2.0 version. You can specifically required psfgen version 2.0 in VMD by “package require psfgen 2.0”. Again if you find out your psfgen version is not right, you should download the latest VMD 1.9.4 LATEST ALPHA version. Another suggestion I have is make sure you are using the latest CGenFF force field topology file. The script I used to generate the psf file is attached here:

package require psfgen 2.0
topology CGenFFOutput.str
topology toppar_c36_jul19/top_all36_cgenff.rtf
#vpbonds 1
segment A {
    pdb molecule.pdb
coordpdb molecule.pdb
regenerate angles dihedrals
writepsf XXX.psf
writepdb XXX.pdb

If the above two methods do not work, the last resort is to write those NUMLP line manually. Please write back if you need help on that.


From: Nan Li<>
Sent: Monday, October 26, 2020 6:22 PM
Subject: namd-l: Can Namd 2.14 and genpsf 2.0 process halogen bonds?


I am trying to use genpsf 2.0 and namd 2.14 to simulate a system with halogen bondings, which involves bromine atoms, since I saw in the user guide, genpsf 2.0 version is able to process halogen bonds. I am using the force field from the latest version of CGenFF. However, in the psf file from genpsf 2.0, I can only see there are bonds generated between the dummy atom and the bromine atoms. When running simulations with Namd 2.14, I can see in the output that namd is trying to get lonepair bonds from LPhost entries. But the simulations crashed because the dummy atoms moved too fast. Therefore, I don't see the halogen bonds were treated properly because there is not LPhost entries in Psf file from genpsf 2.0.

I also tried to use genpsf 2.0 to get psf in Charmm format, which contains a session "!NUMLP NUMLPH". I copied and pasted this session into the psf file for namd. This time, I got the error message as "FATAL ERROR: must have same number of LP hosts as lone pairs". It seems like the namd 2.14 can process "!NUMLP NUMLPH", but it requires the same number of LP hosts as lone pairs?? But why? There are typically two LP hosts for one dummy atom.

Please instruct me how to proceed if you have successful experience with modeling halogen lone pairs using namd 2.14.


This archive was generated by hypermail 2.1.6 : Thu Dec 31 2020 - 23:17:14 CST