From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Wed Jan 10 2007 - 08:51:29 CST

Hi Regina,
I see what you're after. I can offer two solutions -- the cheap hack and
the "right" way.

The cheap hack is to, in your topology file, remove all the IC lines and
then reverse the ordering of both the atoms and bonds from C* H*1 O* H*
to C* O* H* H*1

This will cause the automatic generation to give you the proper
chirality (it still is guessing, but the guessing is deterministic and
based on the input order). Your groups should then look like
GROUP ! |
ATOM C2 CTS 0.15 ! |
ATOM O2 OHS -0.65 ! |
ATOM H2 HOS 0.40 ! |
ATOM H21 HAS 0.10 ! H21 -- C2 -- O2 -- H2

and your bonds like
BOND C2 O2 O2 H2 C2 H21

(C1 and C6 can be left unchanged, obviously)

The "right" way would be to fully fill out the IC information (including
all the bonds and angles as well as the dihedrals you've put in) and
give it three atoms to start from instead of one. You could do this by,
instead of using autoionize as a starting point, running a loop like the
following on your water box:

# for each sorbitol I want...
for {set i 0} {$i < 150} {incr i} {

#pick a random water
set sel [atomselect top "resname TIP3 and not hydrogen"]
set numwat [llength [$sel get index]]
set mywat [expr int(rand() * $numwat)]

set myresid [lindex [$sel get resid] $mywat]
set mysegname [lindex [$sel get segname] $mywat]
set mysel [atomselect top "resid $myresid and segname $mysegname"]
$mysel set resname SORB
$mysel set name {C1 C2 C3}

$sel delete
$mysel delete
}

This will give you enough of a basis for each sorbitol to construct it
from the ICs.

The "most" correct way is probably to append the appropriate number of
fully built sorbitol residues to your pdb, and then put each through a
separate rigid body translation and rotation prior to equilibration.
Whichever method you choose, you'll obviously need to relax the
structure before proceeding.

Peter

" politr"@huji.ac.il wrote:
> Dear Peter,
> Thank you very much for your fast replay. I want to explain you why
> I'm using only one atom and maybe you can advise me some other way to
> perform the same thing. My target is to create water box with 2M of
> sorbitol (150 mol). I was planning to do it using VMD. First of all I
> create water box and after that I add needed amount of ions (using add
> ions tool from VMD). After that the ions are replaced with atom name
> and residue name of sorbitol and by using psfgen I was planning to
> create my sorbitol molecule. At the moment I did it I can solvate the
> sorbitol molecules and at the end I'm getting water box with needed
> amount of sorbitol molecules. Using this procedure I can't put into
> water box more than one atom for each sorbitol molecule and I don't
> have a clue how to perform it. I will appreciate it very much if you
> or anyone else can help me. This procedure worked for glycerol but as
> I see not for sorbitol.
> Thanks again
> Regina
> Peter Freddolino wrote:
>>
>> ------------------------------------------------------------------------
>>
>> Subject:
>> Re: vmd-l: create new topology file for new molecule
>> From:
>> Peter Freddolino <petefred_at_ks.uiuc.edu>
>> Date:
>> Tue, 09 Jan 2007 11:10:42 -0600
>> To:
>> politr_at_huji.ac.il
>>
>> To:
>> politr_at_huji.ac.il
>>
>>
>> Hi Regina,
>> psfgen does indeed pay attention to internal coordinates, but you need
>> to give it more than one atom as a starting point or else it will just
>> need to guess. Try, for example, giving it C1/C2/C3, or all of the
>> carbons, and you'll see the effects of the IC lines (note that more
>> information is needed in the file you gave -- some bonds and angles
>> would be useful).
>>
>> Peter
>>
>> " politr"@huji.ac.il wrote:
>>
>>> Dear NAMD and VMD users,
>>> I'm trying to build topology file for sorbitol. I have used glycerol
>>> topology file in order to do it. I'm using psfgen with this topology
>>> file in order to create pdb and psf. The problem is that the molecule
>>> created with this topology file is not sorbitol but its isomer. I have
>>> tried to change the Internal coordinate definitions in topology file
>>> but it looks like psfgen ignores this lines at all and creates the
>>> molecule based on its own default parameters. The files i'm using are
>>> attached. I hope somebody can help me with it.
>>> Thank you in advance
>>> Regina
>>> The attached files:
>>> sorbitol_alone.pdb - input file to psfgen in oder to create sorbitol
>>> using only one coordinate (guesscoord can do it)
>>> one_sorbitol.psf/pdb - output files from psfgen
>>> topology file - sorbitol definitions at the end of file
>>> ------------------------------------------------------------------------
>>>
>>> PSF
>>>
>>> 3 !NTITLE
>>> REMARKS original generated structure x-plor psf file
>>> REMARKS topology ../inp/top_all27_prot_lipid_ret_csff_adam_spc.rtf
>>> REMARKS segment SORB { first NONE; last NONE; auto angles dihedrals }
>>>
>>> 26 !NATOM
>>> 1 SORB 1 SORB C1 CTS 0.050000 12.0110 0
>>> 2 SORB 1 SORB H11 HAS 0.100000 1.0080 0
>>> 3 SORB 1 SORB H12 HAS 0.100000 1.0080 0
>>> 4 SORB 1 SORB O1 OHS -0.650000 15.9994 0
>>> 5 SORB 1 SORB H1 HOS 0.400000 1.0080 0
>>> 6 SORB 1 SORB C2 CTS 0.150000 12.0110 0
>>> 7 SORB 1 SORB H21 HAS 0.100000 1.0080 0
>>> 8 SORB 1 SORB O2 OHS -0.650000 15.9994 0
>>> 9 SORB 1 SORB H2 HOS 0.400000 1.0080 0
>>> 10 SORB 1 SORB C3 CTS 0.150000 12.0110 0
>>> 11 SORB 1 SORB H31 HAS 0.100000 1.0080 0
>>> 12 SORB 1 SORB O3 OHS -0.650000 15.9994 0
>>> 13 SORB 1 SORB H3 HOS 0.400000 1.0080 0
>>> 14 SORB 1 SORB C4 CTS 0.150000 12.0110 0
>>> 15 SORB 1 SORB H41 HAS 0.100000 1.0080 0
>>> 16 SORB 1 SORB O4 OHS -0.650000 15.9994 0
>>> 17 SORB 1 SORB H4 HOS 0.400000 1.0080 0
>>> 18 SORB 1 SORB C5 CTS 0.150000 12.0110 0
>>> 19 SORB 1 SORB H51 HAS 0.100000 1.0080 0
>>> 20 SORB 1 SORB O5 OHS -0.650000 15.9994 0
>>> 21 SORB 1 SORB H5 HOS 0.400000 1.0080 0
>>> 22 SORB 1 SORB C6 CTS 0.050000 12.0110 0
>>> 23 SORB 1 SORB H61 HAS 0.100000 1.0080 0
>>> 24 SORB 1 SORB H62 HAS 0.100000 1.0080 0
>>> 25 SORB 1 SORB O6 OHS -0.650000 15.9994 0
>>> 26 SORB 1 SORB H6 HOS 0.400000 1.0080 0
>>>
>>> 25 !NBOND: bonds
>>> 1 2 1 3 1 4 1 6
>>> 4 5 6 7 6 8 6 10
>>> 8 9 10 11 10 12 10 14
>>> 12 13 14 15 14 16 14 18
>>> 16 17 18 19 18 20 18 22
>>> 20 21 22 23 22 24 22 25
>>> 25 26
>>>
>>> 42 !NTHETA: angles
>>> 1 6 10 1 6 8 1 6 7
>>> 1 4 5 2 1 6 2 1 4
>>> 2 1 3 3 1 6 3 1 4
>>> 4 1 6 6 10 14 6 10 12
>>> 6 10 11 6 8 9 7 6 10
>>> 7 6 8 8 6 10 10 14 18
>>> 10 14 16 10 14 15 10 12 13
>>> 11 10 14 11 10 12 12 10 14
>>> 14 18 22 14 18 20 14 18 19
>>> 14 16 17 15 14 18 15 14 16
>>> 16 14 18 18 22 25 18 22 24
>>> 18 22 23 18 20 21 19 18 22
>>> 19 18 20 20 18 22 22 25 26
>>> 23 22 25 23 22 24 24 22 25
>>>
>>> 63 !NPHI: dihedrals
>>> 1 6 8 9 1 6 10 11
>>> 1 6 10 12 1 6 10 14
>>> 2 1 4 5 2 1 6 7
>>> 2 1 6 8 2 1 6 10
>>> 3 1 4 5 3 1 6 7
>>> 3 1 6 8 3 1 6 10
>>> 4 1 6 7 4 1 6 8
>>> 4 1 6 10 5 4 1 6
>>> 6 10 12 13 6 10 14 15
>>> 6 10 14 16 6 10 14 18
>>> 7 6 8 9 7 6 10 11
>>> 7 6 10 12 7 6 10 14
>>> 8 6 10 11 8 6 10 12
>>> 8 6 10 14 9 8 6 10
>>> 10 14 16 17 10 14 18 19
>>> 10 14 18 20 10 14 18 22
>>> 11 10 12 13 11 10 14 15
>>> 11 10 14 16 11 10 14 18
>>> 12 10 14 15 12 10 14 16
>>> 12 10 14 18 13 12 10 14
>>> 14 18 20 21 14 18 22 23
>>> 14 18 22 24 14 18 22 25
>>> 15 14 16 17 15 14 18 19
>>> 15 14 18 20 15 14 18 22
>>> 16 14 18 19 16 14 18 20
>>> 16 14 18 22 17 16 14 18
>>> 18 22 25 26 19 18 20 21
>>> 19 18 22 23 19 18 22 24
>>> 19 18 22 25 20 18 22 23
>>> 20 18 22 24 20 18 22 25
>>> 21 20 18 22 23 22 25 26
>>> 24 22 25 26
>>>
>>> 0 !NIMPHI: impropers
>>>
>>>
>>> 0 !NDON: donors
>>>
>>>
>>> 0 !NACC: acceptors
>>>
>>>
>>> 0 !NNB
>>>
>>> 0 0 0 0 0 0 0 0
>>> 0 0 0 0 0 0 0 0
>>> 0 0 0 0 0 0 0 0
>>> 0 0
>>>
>>> 1 0 !NGRP
>>> 0 0 0
>>>
>>>
>>>
>>
>>
>