Topic Options
#37191 - 11/20/18 02:33 PM Setting up Disulfide Bonds Automatically
Antoniel Gomes Offline
Forum Member

Registered: 09/13/18
Posts: 8
Loc: São Paulo, BR
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.

Top
#37194 - 11/21/18 04:04 PM Re: Setting up Disulfide Bonds Automatically [Re: Antoniel Gomes]
lennart Online   content

Forum Member

Registered: 09/25/03
Posts: 4741
Loc: ~ 59N, 15E
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.


Edited by lennart (11/21/18 04:05 PM)
_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden

Top
#37234 - 12/12/18 05:40 AM Re: Setting up Disulfide Bonds Automatically [Re: lennart]
Antoniel Gomes Offline
Forum Member

Registered: 09/13/18
Posts: 8
Loc: São Paulo, BR
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...

Top
#37235 - 12/12/18 12:20 PM Re: Setting up Disulfide Bonds Automatically [Re: Antoniel Gomes]
rmv Online   content

Forum Member

Registered: 09/17/03
Posts: 8373
Loc: 39 03 48 N, 77 06 54 W
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


Top
#37248 - 12/23/18 03:26 PM Re: Setting up Disulfide Bonds Automatically [Re: rmv]
Antoniel Gomes Offline
Forum Member

Registered: 09/13/18
Posts: 8
Loc: São Paulo, BR
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.

Top
#37587 - 07/29/19 02:08 PM Re: Setting up Disulfide Bonds Automatically [Re: Antoniel Gomes]
Antoniel Gomes Offline
Forum Member

Registered: 09/13/18
Posts: 8
Loc: São Paulo, BR
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.


Edited by Antoniel Gomes (07/29/19 02:11 PM)

Top

Moderator:  John Legato, lennart