Re: psf generation for multiple trehalose molecules

From: Josh Vermaas (joshua.vermaas_at_gmail.com)
Date: Sun Nov 08 2020 - 20:13:20 CST

Hi Ritu,

Why are you aliasing at all? In patches that connect more than one residue,
the first digit indicates to psfgen which residue the atom name is on. This
is fundamentally why atom names can't start with a digit. I think your
script otherwise looks close to what I would write.

Josh

On Sun, Nov 8, 2020, 5:26 PM Ritu Arora <ritu.arora_at_mail.concordia.ca>
wrote:

> Dear All,
>
> I wish to run a simulation of 150 molecules of trehalose. I adapted a
> psfgen script from earlier NAMD threads, but I am not able to get the
> script working. The trial script for the carbohydrate section of my system
> follows:
>
> package require psfgen
> topology top_all36_carb.rtf
> mol new carb_only.pdb
> set sel [atomselect top 'all']
> for {set i 0} {$i<150} {incr i} {
> resetpsf
> segment L$i {
> residue 1 AGLC
> residue 2 AGLC
> }
> pdbalias atom 'AGLC 1' O1 1O1
> pdbalias atom 'AGLC 1' C1 1C1
> pdbalias atom 'AGLC 2' C1 2C1
> #
> patch 11aa L$i:1 L$i:2
> $sel set segname L$i
> $set moveby [list 1 1 1]
> $set writepdb tmp.pdb
> regenerate angles dihederals
> coordpdb L$i tmp.pdb
> }
> guesscoord
> writepdb $name.pdb
> writepsf $name.psf
>
> The confusion is that there are two AGLCs in trehalose and each has either
> resid 1 or 2, rather than sequential increments for whole molecule of
> trehalose. The pdbalias command also seems to be wrong.
>
> I also tried to split the two fragments of trehalose in two separate pdbs:
>
> pdbalias atom 'AGLC 1' O1 1O1
> pdbalias atom 'AGLC 2' C1 2C1
>
> for {set i 0} {$i < 150} {incr i} {
> segment TRE1$i {pdb output/carb1.pdb }
>
> segment TRE2$i {pdb output/carb2.pdb }
>
> patch 11aa TRE1$i:1 TRE2$i:2
> coordpdb output/carb1.pdb TRE1$i
> coordpdb output/carb2.pdb TRE2$i
> }
> I would be thankful for any suggestions to improvise the script.
>
> Best,
> Ritu
>

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