Previous Thread
Next Thread
Print Thread
Setting up Disulfide Bonds Automatically
#37191 11/20/18 07:33 PM
Joined: Sep 2018
Posts: 8
A
Forum Member
OP Offline
Forum Member
A
Joined: Sep 2018
Posts: 8
Hello,

To define the disulfide bonds sometimes is upsetting, so I wrote a loop to set it up automatically:

Code:
set count = 0

label cysloop
incr count by 1
define residue sele ires @count end

if ?selresn .eq. CYS then
coor mind sele ires @count .and. type SG end sele type SG end
  if ?mind .lt. 2.5 then
    define CYS1 sele bynu ?minda1 end
    set CYS1 = ?selsegi ?selresi
    define CYS2 sele bynu ?minda2 end
    set CYS2 = ?selsegi ?selresi
    patch disu @CYS1 @CYS2 setup warn
  endif
endif

if count .lt. ?nres goto cysloop


I put the loop right after reading the coordinates/sequence of all chains.

If you all have any thoughts to improve this loop, it would be great.

Regards,

Antoniel.


Antoniel A. S. Gomes
Re: Setting up Disulfide Bonds Automatically
Antoniel Gomes #37194 11/21/18 09:04 PM
Joined: Sep 2003
Posts: 4,793
Likes: 2
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 4,793
Likes: 2
Seems fine for automatic processing, but perhaps it will create each disulfide twice? This may not be a problem though, but you should check with a system where you also define the disulfides yourself.

A semi-automatic way of doing this for systems that you are not familiar with is to first get all the CYS SG-SG distances shorter than 2.5:

coor dist sele atom * cys sg end sele atom * cys sg end cut 2.5

and then use the resulting output to setup patches for the handful of real disulfides.

Last edited by lennart; 11/21/18 09:05 PM.

Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden
Re: Setting up Disulfide Bonds Automatically
lennart #37234 12/12/18 10:40 AM
Joined: Sep 2018
Posts: 8
A
Forum Member
OP Offline
Forum Member
A
Joined: Sep 2018
Posts: 8
Thank you for your answer!

Yes, apparently CHARMM doesn't create a disulfide bond that is already generated because hydrogen atoms are already deleted (CHARMM returns a LEVEL 1 WARNING).
I tested it using two chains and it works fine.

Your idea to use coor dist command is a good one. I didn't use it because I was not possible to iterate along the selection. Do you think it is possible? If yes, we can iterate considering only CYS residues...


Antoniel A. S. Gomes
Re: Setting up Disulfide Bonds Automatically
Antoniel Gomes #37235 12/12/18 05:20 PM
Joined: Sep 2003
Posts: 8,498
rmv Online Content
Forum Member
Online Content
Forum Member
Joined: Sep 2003
Posts: 8,498
It is possible to iterate on a selection via the .subset. option, but NOT over the list of named atoms produced by COOR DIST with a double selection.

However, you can divert the list to a file via OUTU, process the list externally via the SYSTEM command which calls a script or program that produces a CHARMM stream file, then read the stream file. The script or program can use whatever tool you feel comfortable with, e.g. python, perl, bash script using awk and sed, etc. The CHARMM framework would be something like

open unit 2 write card name cyslist.txt
outu 2
coor dist sele atom * cys sg end sele atom * cys sg end cut 2.5
outu 6
system "makestr.sh cyslist"
stream cyslist.str


Here, makestr.sh would process cyslist.txt to produce the patch commands required in cyslist.str. I've used a similar approach recently to generate a stream file to define a list of time series via the ENTER command of CORREL.


Rick Venable
computational chemist

Re: Setting up Disulfide Bonds Automatically
rmv #37248 12/23/18 08:26 PM
Joined: Sep 2018
Posts: 8
A
Forum Member
OP Offline
Forum Member
A
Joined: Sep 2018
Posts: 8
Thanks a lot for telling me about the .subset. command. Now I can iterate the cysteine residues only. It makes the loop faster.

New code bellow:

Code:
set count = 0

define CYSTEINES sele resname CYS .and. type SG end

label cysloop
incr count by 1

coor mind sele CYSTEINES .subset. @count end sele CYSTEINES end

if ?mind .lt. 2.5
define CYS1 sele bynu ?minda1 end
set CYS1 = ?selsegi ?selresi
define CYS2 sele bynu ?minda2 end
set CYS2 = ?selsegi ?selresi
patch disu @CYS1 @CYS2 setup warn

define CYSTEINES sele resname CYS .and. type SG end

if count .lt. ?nsel goto cysloop


Unfortunately (it's not that bad), you must to define CYSTEINES group in every loop because the PSF changes due the atoms deletion.

Thank you all.


Antoniel A. S. Gomes
Re: Setting up Disulfide Bonds Automatically
Antoniel Gomes #37587 07/29/19 06:08 PM
Joined: Sep 2018
Posts: 8
A
Forum Member
OP Offline
Forum Member
A
Joined: Sep 2018
Posts: 8
Originally Posted By: Antoniel Gomes
Thanks a lot for telling me about the .subset. command. Now I can iterate the cysteine residues only. It makes the loop faster.

New code bellow:

Code:
set count = 0

define CYSTEINES sele resname CYS .and. type SG end

label cysloop
incr count by 1

coor mind sele CYSTEINES .subset. @count end sele CYSTEINES end

if ?mind .lt. 2.5 then
define CYS1 sele bynu ?minda1 end
set CYS1 = ?selsegi ?selresi
define CYS2 sele bynu ?minda2 end
set CYS2 = ?selsegi ?selresi
patch disu @CYS1 @CYS2 setup warn
endif

define CYSTEINES sele resname CYS .and. type SG end

if count .lt. ?nsel goto cysloop


Unfortunately (it's not that bad), you must to define CYSTEINES group in every loop because the PSF changes due the atoms deletion.

Thank you all.

Last edited by Antoniel Gomes; 07/29/19 06:11 PM.

Antoniel A. S. Gomes

Moderated by  lennart, rmv 

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

PHP: 5.6.33-0+deb8u1 Page Time: 0.006s Queries: 26 (0.002s) Memory: 0.9361 MB (Peak: 1.0344 MB) Data Comp: Off Server Time: 2020-09-26 11:13:07 UTC
Valid HTML 5 and Valid CSS