From: Rangeen Othman (rangeen.othman_at_googlemail.com)
Date: Thu Nov 27 2014 - 06:29:08 CST

Thanks a lot Alex and sorry again yes I haven't explained the procedure!
I have used the following scripts to make a psf for gold.
#mol new "Au_bond2.pdb" autobonds no waitfor all
set atoms [atomselect top all]
$atoms set type Au
$atoms set segname A

mol bondsrecalc top
package require topotools
topo retypebonds
vmdcon -info "assigned[topo numbondtypes] bond types to [topo #numbonds] bonds;"
vmdcon -info "bondtypes:[topo bondtypenames]"
topo guessangles
vmdcon -info "assigned[topo numangletypes] angle types to [topo
numangles] angles;"
vmdcon -info "angletypes:[topo angletypenames]"
mol reanalyze top
animate write pdb 2nmfix1.pdb
animate write psf 2nmfix1.psf

Then I have solvated a membrane and combined it with gold:

set psf0 solvate.psf
set pdb0 solvate.pdb
set psf1 2nmfix2.psf
set pdb1 2nmfix2.pdb

set outName mem_gold1

set finalPsf $outName.psf
set finalPdb $outName.pdb
package require psfgen
resetpsf
readpsf $psf0
coordpdb $pdb0
readpsf $psf1
coordpdb $pdb1

# Write the combination.
writepdb $finalPdb
writepsf $finalPsf

It failed to read the set coordinates of Gold, so pdb has zero coor
for gold however the psf was created for the system, so I have used
this to read the coor of gold into the pdb;
  1) remove "END" at the end of solvate.pdb
  2) cat solvate.pdb 2nmfix2.pdb > mem_gold1.pdb
  3) vmd mem_gold1.psf mem_gold1.pdb

So the structure is fine now.

Then wanted to delete unwanted water:

mol load psf mem_gold1.psf pdb modelsystem.pdb

set bad [atomselect top {same residue as \
(water and within 2.9 of resname Au)or\
(water and (x<-50 or x>28 or y<-50 or y>28))or\
(water and abs(z)<18)}]

resetpsf
readpsf mem_gold1.psf
coordpdb mem_gold1.pdb
foreach segid [$bad get segid] resid [$bad get resid] name [$bad get name] {
  delatom $segid $resid $name
}
 writepsf system_fixwat.psf
 writepdb system_fixwat.pdb

So in this stage again system_fixwat.pdb has zero coor for gold atoms!

Sorry Ashar I wasn't patient, and thanks alot you are totally right,
but I haven't used a topology file to make a psf, instead of that I
have used topotool to make a psf, I think it is not a problem to make
psf with topotool. I have seen that so many people used topotool to do
that and there was not a problem!

Thanks all for advises and sorry again

Rangeen

Sent from my iPhone

> On 26 Nov 2014, at 21:50, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:
>
> On Wed, Nov 26, 2014 at 4:32 PM, Rangeen Othman
> <rangeen.othman_at_googlemail.com> wrote:
>> Ok sorry for that. First, I have built a gold nanoparticle with inorganic builder using VMD. So I have pdb and psf for it but there is no bonds, angels and etc in the psf file. Second I have used inorganic builder to add bonds and topotool to make angles. So if you are following me now I have psf and pdb for the gold nanoparticle. Third I have the pdb and psf for membrane in a box of water, I have loaded both structures into VMD, then move the gold nanoparricle into the position I wanted and saved that coordinates. Then loaded the final structure of goldnanoparticle into VMD. Finally, tried to combine them together using Topotool and it worked. The problem is deleting water around the gold atoms! I have used simple scripts to delete waters but when I havd rewritten that into the pdb and psf the coordinates of gold nanoparticle are became zero which is unusual!
>> I hope you understand me now.
>
> i *did* understand you, but you don't understand me. it *still*
> doesn't help because you only *describe* what you have been doing (or
> think you have been doing). how can we know whether you did it
> correctly? and what you did in particular? any description that is
> qualified with "it worked" or "it didn't work" is not very helpful.
>
> obviously your "simple scripts" are broken. i never had this problem
> with this kind of procedure. there is a commented example script on my
> homepage at:
>
> https://sites.google.com/site/akohlmey/software/topotools/topotools-tutorial---various-tips-tricks#TOC-Combine-multiple-data-files-with-overlap-detection-and-removal
>
>
>> Thanks
>> Rangeen
>>
>>
>> Sent from my iPhone
>>
>>> On 26 Nov 2014, at 18:33, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:
>>>
>>> On Wed, Nov 26, 2014 at 1:15 PM, Rangeen Othman
>>> <rangeen.othman_at_googlemail.com> wrote:
>>>> Now I have the structure ( Gold atoms + lipid bilayer+ water) I want to
>>>> delete some water around gold nanoparticle to avoid clashes between atoms! I
>>>> have done it with just scripts as you have advised me but when I rewrite the
>>>> pdb and psf after deleting waters the coordinates of gold nano particles are
>>>> zero!
>>>
>>> let me repeat. nobody can give advice, when you don't give details. my
>>> only conclusion is that you didn't do what you said you are doing
>>> correctly. atom coordinates are only set to zero when either: you have
>>> an incorrectly formatted pdb file or: you ask psfgen to regenerate
>>> coordinates without providing a suitable topology file. neither case
>>> should happen, if you are using topotools and VMD correctly.
>>>
>>> axel.
>>>
>>>
>>>> For example the final pdb like that til the end:
>>>> ATOM 54852 OH2 TIP3W9241 -2.899 1.217 27.357 1.00 0.00 WT10
>>>> O
>>>> ATOM 54853 H1 TIP3W9241 -3.556 0.518 27.619 1.00 0.00 WT10
>>>> H
>>>> ATOM 54854 H2 TIP3W9241 -2.067 0.714 27.395 1.00 0.00 WT10
>>>> H
>>>> ATOM 54855 OH2 TIP3W9250 -6.839 1.532 33.356 1.00 0.00 WT10
>>>> O
>>>> ATOM 54856 H1 TIP3W9250 -7.394 2.000 32.730 1.00 0.00 WT10
>>>> H
>>>> ATOM 54857 H2 TIP3W9250 -5.922 1.685 32.999 1.00 0.00 WT10
>>>> H
>>>> ATOM 54858 Au0 Au 1 0.000 0.000 0.000 -1.00 0.00 A
>>>> ATOM 54859 Au1 Au 2 0.000 0.000 0.000 -1.00 0.00 A
>>>> ATOM 54860 Au2 Au 3 0.000 0.000 0.000 -1.00 0.00 A
>>>> ATOM 54861 Au3 Au 4 0.000 0.000 0.000 -1.00 0.00 A
>>>> ATOM 54862 Au4 Au 5 0.000 0.000 0.000 -1.00 0.00 A
>>>> ATOM 54863 Au5 Au 6 0.000 0.000 0.000 -1.00 0.00 A
>>>> ATOM 54864 Au6 Au 7 0.000 0.000 0.000 -1.00 0.00 A
>>>> ATOM 54865 Au7 Au 8 0.000 0.000 0.000 -1.00 0.00 A
>>>>
>>>> Thanks
>>>> Rangeen
>>>>
>>>>> On Wed, Nov 26, 2014 at 5:25 PM, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:
>>>>>
>>>>> On Wed, Nov 26, 2014 at 12:09 PM, Rangeen Othman
>>>>> <rangeen.othman_at_googlemail.com> wrote:
>>>>>> Thanks for the reply, I want to merge both structures but it complained
>>>>>> about failed set of coordinates For example; "psfgen) Warning: failed to
>>>>>> set
>>>>>> coordinate for atom AU31 AU:319 A". I have also used "
>>>>>> vmd>>extensions>>modeling>>merge structures " again gives me the same
>>>>>> warning! I have checked the merged pdb all coordinates of Au atoms are
>>>>>> (0,
>>>>>> 0, 0)! I have used also topotools it worked and combined them, however,
>>>>>> when
>>>>>> I wanted to delete some water around gold nanoparticle it failed again
>>>>>> because of using psfgen to do that!
>>>>>
>>>>> a) there is still not enough information here to see exactly what you
>>>>> have been doing.
>>>>> b) there is no need to use psfgen to remove some water, simple VMD
>>>>> scripting can do that.
>>>>>
>>>>>
>>>>>>
>>>>>> Thanks a lot
>>>>>>
>>>>>> Rangeen
>>>>>>
>>>>>> On Wed, Nov 26, 2014 at 4:13 PM, Axel Kohlmeyer <akohlmey_at_gmail.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> On Wed, Nov 26, 2014 at 10:36 AM, Rangeen Othman
>>>>>>> <rangeen.othman_at_googlemail.com> wrote:
>>>>>>>> Dear VMD Users,
>>>>>>>>
>>>>>>>> I have two structures (gold nano particle with lipid bilayer, pdb and
>>>>>>>> psf
>>>>>>>> files) I want to combine them using Psfgen but it failed! I wonder if
>>>>>>>> someone will advise me what is the problem. Also I have checked that
>>>>>>>> the
>>>>>>>> system has unique {segname resid name}. I have also used Topotool to
>>>>>>>> merge
>>>>>>>> them but again it failed and complained with the same phrase!
>>>>>>>
>>>>>>> there is not enough information here to give any advice, and i
>>>>>>> seriously doubt that psfgen and topotools give the same error message
>>>>>>> since they are completely different packages that don't share any
>>>>>>> code.
>>>>>>>
>>>>>>> axel.
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> psfgen) reading coordinates from pdb file
>>>>>>>> mergetmp1312235701/2nmfix2.1s.pdb
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU0 AU:1 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU1 AU:2 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU2 AU:3 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU3 AU:4 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU4 AU:5 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU5 AU:6 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU6 AU:7 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU7 AU:8 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU8 AU:9 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU9 AU:10 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU10 AU:11 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU11 AU:12 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU12 AU:13 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU13 AU:14 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU14 AU:15 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU15 AU:16 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU16 AU:17 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU17 AU:18 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU18 AU:19 A
>>>>>>>> psfgen) Warning: failed to set coordinate for atom AU19 AU:20 A
>>>>>>>>
>>>>>>>> Thanks in advance
>>>>>>>>
>>>>>>>> Rangeen
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
>>>>>>> College of Science & Technology, Temple University, Philadelphia PA,
>>>>>>> USA
>>>>>>> International Centre for Theoretical Physics, Trieste. Italy.
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
>>>>> College of Science & Technology, Temple University, Philadelphia PA, USA
>>>>> International Centre for Theoretical Physics, Trieste. Italy.
>>>
>>>
>>>
>>> --
>>> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
>>> College of Science & Technology, Temple University, Philadelphia PA, USA
>>> International Centre for Theoretical Physics, Trieste. Italy.
>
>
>
> --
> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
> College of Science & Technology, Temple University, Philadelphia PA, USA
> International Centre for Theoretical Physics, Trieste. Italy.