Previous Thread
Next Thread
Print Thread
#211 10/23/03 09:25 AM
Joined: Sep 2003
Posts: 4,850
Likes: 10
lennart Online Content OP
Forum Member
OP Online Content
Forum Member
Joined: Sep 2003
Posts: 4,850
Likes: 10
*FILENAME: add-ions.str
*PURPOSE: replace some waters with ions; which ones to replace you have to
* decide beforehand, based on random picking, low energy, ...
*AUTHOR: Lennart Nilsson, Karolinska Institutet, October 20 2003
*
!ASSUMPTIONS:
! 1/ your psf and coordinates are in place
! 2/ the selection WATREPL has been defined as the water molecules
! you want to replace in the water segment which has SEGID WAT.
! 34/ the variable ION has to be set to the residue name of the ion in the RTF
!RESULTS:
! A new segment named IONS will be created. Variable NIONS is set to number
! of ions in this segment.
! The water segment will have some molecules
! deleted, and the rest will be consecutively numbered.
!USAGE EXAMPLE:
!define watrepl select segid wat .and. (resi 23 .or. resi 48 .or. resi 999) end
!set ion sod
!stream add-ions.str

! Script starts here
! basically we believe in a 3-center water
coor stat sele WATREPL .and. .not. hydrogen end
set nions ?nsel
read sequence @ion @nions
gene ions
coor dupl sele watrepl .and. .not. hydrogen end sele segid ions end
delete atom sele .byres. watrepl end
join wat renumber ! fix numbering of residues in the modified water segment
return


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
lennart #212 09/15/04 06:35 AM
Joined: May 2004
Posts: 222
C
Forum Member
Offline
Forum Member
C
Joined: May 2004
Posts: 222
Just to clarify:

1/ " set nions ?nsel "
where is ?nsel ?

2/ " define watrepl select segid wat .and. (resi 23 .or. resi 48 .or. resi 999) end "

This means any water residue (in segid wat) near resi 23 or 48 or any other water residue, can be replaced in that order of priority?

chuan #213 09/15/04 06:48 AM
Joined: Sep 2003
Posts: 4,850
Likes: 10
lennart Online Content OP
Forum Member
OP Online Content
Forum Member
Joined: Sep 2003
Posts: 4,850
Likes: 10
1/ subst.doc
2/ This is just an EXAMPLE, but you should use a selection that suits your case. In the exmaple EXACTLY the three water molecules with segid wat and the listed resids get replaced. One cannot say anything about "any water residue near resi 23... or any other water" from this example, and there is no priority involved.


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
lennart #214 03/04/08 09:03 AM
Joined: Jul 2006
Posts: 118
B
Forum Member
Offline
Forum Member
B
Joined: Jul 2006
Posts: 118
Hi, Dr. Lennart,
Do you think we can modify the scripts:
gene ions ---> gene @ions
so that ppl can add several types of ions by calling the scripts then.


coor stat sele WATREPL .and. .not. hydrogen end
set nions ?nsel
read sequence @ion @nions
-------------------------------------------------
gene @ions <--------------------modification?
-------------------------------------------------
coor dupl sele watrepl .and. .not. hydrogen end sele segid ions end
delete atom sele .byres. watrepl end
join wat renumber ! fix numbering of residues in the modified water segment
return


Regards BioStanley -----------
BioStanley #215 03/04/08 09:50 AM
Joined: Sep 2003
Posts: 4,850
Likes: 10
lennart Online Content OP
Forum Member
OP Online Content
Forum Member
Joined: Sep 2003
Posts: 4,850
Likes: 10
These scripts are just examples and suggestions to get people started. Please modify as you like to suit your needs.


Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Moderated by  lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5
(Release build 20201027)
Responsive Width:

PHP: 7.3.31-1~deb10u1 Page Time: 0.006s Queries: 24 (0.004s) Memory: 0.7457 MB (Peak: 0.8004 MB) Data Comp: Off Server Time: 2022-10-06 06:35:05 UTC
Valid HTML 5 and Valid CSS