deGrootLab / pmx

Toolkit for free-energy calculation setup/analysis and biomolecular structure handling
GNU Lesser General Public License v3.0
137 stars 49 forks source link

Confusion in [ dihedrals ] section in hybrid topology #38

Open wagleswapnil opened 1 year ago

wagleswapnil commented 1 year ago

Hi, I generated a hybrid topology of two ligands, the [ dihedrals ] section of the hybrid topology looks like this: [ dihedrals ] ; ai aj ak al funct c0 c1 c2 c3 c4 c5 1 10 9 3 1 180 15.3215155 2 180 0 2 ; C1x C10x C9x C3x (AAAA->DDDD) 1 10 9 3 1 180 0 2 180 15.3215155 2 ; C1x C10x C9x C3x (AAAA->DDDD) 1 10 9 8 1 180 15.3215155 2 180 0 2 ; C1x C10x C9x C8x (AAAA->DDDD) 1 10 9 8 1 180 0 2 180 15.3215155 2 ; C1x C10x C9x C8x (AAAA->DDDD) 1 11 2 3 1 180 24.7411728 2 180 0 2 ; C1x N1x C2x C3x (AAAA->DDDD) 1 11 2 3 1 180 0 2 180 24.7411728 2 ; C1x N1x C2x C3x (AAAA->DDDD) 1 11 2 23 1 180 15.6141438 2 180 0 2 ; C1x N1x C2x H2x (AAAA->DDDD) 1 11 2 23 1 180 0 2 180 15.6141438 2 ; C1x N1x C2x H2x (AAAA->DDDD) 2 3 4 12 1 180 4.8669776 2 180 0 2 ; C2x C3x C4x C11x (AAAA->DDAA) 2 3 4 12 1 180 0 2 180 0.48669776 2 ; C2x C3x C4x C11x (AAAA->DDAA) ....

The dihedrals for almost all the pairs are defined twice. So, I have 2 questions about this [ dihedrals ] output:

  1. I want to simulate just the end states A and B in equilibrium runs. Are all the force constants for dihedrals for state A turned to 0, as the latest entries for the dihedrals will be considered?
  2. If I want to write ifdef LIGAND_A and ifdef LIGAND_B sections for the dihedrals, which contain the dihedrals for ligand A and ligand B on both the left and right sides in the entries, respectively, should it look like this? : [ dihedrals ]

    ifdef LIGAND_A

    1 10 9 3 1 180 15.3215155 2 180 15.3215155 2 ; C1x C10x C9x C3x (AAAA->DDDD) 1 10 9 3 1 180 0 2 180 0 2 ; C1x C10x C9x C3x (AAAA->DDDD) 1 10 9 8 1 180 15.3215155 2 180 15.3215155 2 ; C1x C10x C9x C8x (AAAA->DDDD) 1 10 9 8 1 180 0 2 180 0 2 ; C1x C10x C9x C8x (AAAA->DDDD) 1 11 2 3 1 180 24.7411728 2 180 24.7411728 2 ; C1x N1x C2x C3x (AAAA->DDDD) 1 11 2 3 1 180 0 2 180 0 2 ; C1x N1x C2x C3x (AAAA->DDDD) ....

    endif

    ifdef LIGAND_B

    1 10 9 3 1 180 0 2 180 0 2 ; C1x C10x C9x C3x (AAAA->DDDD) 1 10 9 3 1 180 15.3215155 2 180 15.3215155 2 ; C1x C10x C9x C3x (AAAA->DDDD) 1 10 9 8 1 180 0 2 180 0 2 ; C1x C10x C9x C8x (AAAA->DDDD) 1 10 9 8 1 180 15.3215155 2 180 15.3215155 2 ; C1x C10x C9x C8x (AAAA->DDDD) 1 11 2 3 1 180 0 2 180 0 2 ; C1x N1x C2x C3x (AAAA->DDDD) 1 11 2 3 1 180 24.7411728 2 180 24.7411728 2 ; C1x N1x C2x C3x (AAAA->DDDD) 1 11 2 23 1 180 0 2 180 0 2 ; C1x N1x C2x H2x (AAAA->DDDD) 1 11 2 23 1 180 15.6141438 2 180 15.6141438 2 ; C1x N1x C2x H2x (AAAA->DDDD) ....

    endif

    ifdef LIGAND_AB

    1 10 9 3 1 180 15.3215155 2 180 0 2 ; C1x C10x C9x C3x (AAAA->DDDD) 1 10 9 3 1 180 0 2 180 15.3215155 2 ; C1x C10x C9x C3x (AAAA->DDDD) 1 10 9 8 1 180 15.3215155 2 180 0 2 ; C1x C10x C9x C8x (AAAA->DDDD) 1 10 9 8 1 180 0 2 180 15.3215155 2 ; C1x C10x C9x C8x (AAAA->DDDD) 1 11 2 3 1 180 24.7411728 2 180 0 2 ; C1x N1x C2x C3x (AAAA->DDDD) 1 11 2 3 1 180 0 2 180 24.7411728 2 ; C1x N1x C2x C3x (AAAA->DDDD) 1 11 2 23 1 180 15.6141438 2 180 0 2 ; C1x N1x C2x H2x (AAAA->DDDD) 1 11 2 23 1 180 0 2 180 15.6141438 2 ; C1x N1x C2x H2x (AAAA->DDDD) 2 3 4 12 1 180 4.8669776 2 180 0 2 ; C2x C3x C4x C11x (AAAA->DDAA) 2 3 4 12 1 180 0 2 180 0.48669776 2 ; C2x C3x C4x C11x (AAAA->DDAA) 2 3 4 18 1 180 4.8669776 2 180 0 2 ; C2x C3x C4x C14x (AAAA->DDAA) 2 3 4 18 1 180 0 2 180 0.48669776 2 ; C2x C3x C4x C14x (AAAA->DDAA) ...

    endif

vgapsys commented 12 months ago
  1. In a hybrid topology dihedral for ligand A is turned of, dihedral for ligand B is turned on. This topology can be used for equilibrium simulations in the states A and B, as well as for the transitions between the states
  2. The ifdef definitions are not required: you can simply use hybrid topology as created by pmx and control which state is activated via mdp parameters
nonsensejoke commented 2 months ago

I'm also struggling to understand this section about dihedral.

Is there some detailed manual related to this? Or could you please point me to certain block of pmx code?

Thanks a lot.

vgapsys commented 2 months ago

The dihedrals are constructed here: https://github.com/deGrootLab/pmx/blob/e6d62580df7374c24e3056db5142517b8475daba/src/pmx/ligand_alchemy.py#L2509