RE: How to create multiple molecules using psfgen

From: Vermaas, Joshua (Joshua.Vermaas_at_nrel.gov)
Date: Tue May 15 2018 - 18:18:25 CDT

Hi Sonibare,

Put it in a loop.

package require psfgen
topology plant.top
set name 2units
mol new plant.pdb
set sel [atomselect top "all"]
for { set i 0 } { $i < 120 } { incr i } {
resetpsf
segment L$i {
 residue 1 SYR
 residue 2 GUAI
}

patch 4O5 L$i:1 L$i:2
$sel set segname L$i
$sel moveby [list 1 1 1]
$sel writepdb tmp.pdb
regenerate angles dihedrals
coordpdb L$i tmp.pdb
}
guesscoord
writepdb $name.pdb
writepsf $name.psf

Just out of curiosity, which parameter set are you using for your lignin? You will probably also want to add a patch to both residues to modify the chemistry attached to C1.

-Josh

On 2018-05-15 16:37:59-06:00 owner-namd-l_at_ks.uiuc.edu wrote:

Dear NAMD users,

I am a new NAMD user and I intend to run a simulation of 120 molecules of an organic compound. Using some examples, I have been able to generate just a single molecule using psfgen. Please, how can I use this to get 120 molecules? I have attached my tcl script.

package require psfgen
topology plant.top
set name 2units

resetpsf
segment li {
 residue 1 SYR
 residue 2 GUAI
}

patch 4O5 li:1 li:2

regenerate angles dihedrals
coordpdb plant.pdb
guesscoord
writepdb $name.pdb
writepsf $name.psf

exit

This archive was generated by hypermail 2.1.6 : Wed Dec 04 2019 - 23:19:54 CST