From: Peter Freddolino (petefred_at_umich.edu)
Date: Mon Nov 09 2020 - 00:08:01 CST
I suspect that the 'resetpsf' inside your loop isn't helping.
Best,
Peter
On Sun, Nov 8, 2020 at 10:53 PM Ritu Arora <ritu.arora_at_mail.concordia.ca>
wrote:
> Hi Josh,
>
> Thank you for clarifying this. After removing alias commands and minor
> typos, the following script saves the coordinates and structure of only the
> last trehalose molecule in the output files. Something is still missing!
>
> package require psfgen
> topology top_all36_carb.rtf
> mol new carb_all.pdb
> set sel [atomselect top "all"]
> for { set i 0 } { $i < 150 } { incr i } {
> resetpsf
> segment L$i {
> residue 1 AGLC
> residue 2 AGLC
> }
> patch 11aa 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 tmp.pdb L$i
> }
> guesscoord
> writepdb new.pdb
> writepsf new.psf
>
> Sincerely,
> Ritu
> ------------------------------
> *From:* Josh Vermaas <joshua.vermaas_at_gmail.com>
> *Sent:* Sunday, November 8, 2020 9:13 PM
> *To:* NAMD list <namd-l_at_ks.uiuc.edu>; Ritu Arora <
> ritu.arora_at_mail.concordia.ca>
> *Cc:* namd_at_ks.uiuc.edu <namd_at_ks.uiuc.edu>
> *Subject:* Re: namd-l: psf generation for multiple trehalose molecules
>
> 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 : Fri Dec 31 2021 - 23:17:10 CST