marrink-lab / vermouth-martinize

Describe and apply transformation on molecular structures and topologies
Apache License 2.0
90 stars 40 forks source link

No parameters for ALA-SC1 beads when using martini3001 #363

Closed bisejdiu closed 3 years ago

bisejdiu commented 3 years ago

Issue

When using martinize2 with martini3001, alanine SC1 beads are not included in any parameter section of the topology.

Steps to Reproduce

Using the aa.pdb structure from here: https://github.com/marrink-lab/vermouth-martinize/tree/master/vermouth/tests/data/integration_tests/tier-1/lysozyme and running:

martinize2 -f ../aa.pdb -x cg.pdb -o topol.top -ff martini3001 -elastic -scfix -cys auto -dssp -ignore HOH

The resulting molecule_0.itp file does not include alanine SC1 beads in any potential definitions.

Running:

# including martini_v3.0.0.itp in topol.top
gmx editconf -f cg.pdb -o cg_box.pdb -box 15 15 15
gmx grompp -f mini.mdp -o out.tpr -c cg_box.pdb -r cg.pdb -p topol.top -v

includes the following output:

Atom 21 'SC1' in moleculetype 'molecule_0' is not bound by a potential or constraint to any other atom in the same moleculetype.
Atom 23 'SC1' in moleculetype 'molecule_0' is not bound by a potential or constraint to any other atom in the same moleculetype.
Atom 25 'SC1' in moleculetype 'molecule_0' is not bound by a potential or constraint to any other atom in the same moleculetype.
Atom 77 'SC1' in moleculetype 'molecule_0' is not bound by a potential or constraint to any other atom in the same moleculetype.
Atom 79 'SC1' in moleculetype 'molecule_0' is not bound by a potential or constraint to any other atom in the same moleculetype.
Atom 104 'SC1' in moleculetype 'molecule_0' is not bound by a potential or constraint to any other atom in the same moleculetype.
Atom 195 'SC1' in moleculetype 'molecule_0' is not bound by a potential or constraint to any other atom in the same moleculetype.
Atom 211 'SC1' in moleculetype 'molecule_0' is not bound by a potential or constraint to any other atom in the same moleculetype.
Atom 221 'SC1' in moleculetype 'molecule_0' is not bound by a potential or constraint to any other atom in the same moleculetype.
Atom 245 'SC1' in moleculetype 'molecule_0' is not bound by a potential or constraint to any other atom in the same moleculetype.
Atom 255 'SC1' in moleculetype 'molecule_0' is not bound by a potential or constraint to any other atom in the same moleculetype.
Atom 285 'SC1' in moleculetype 'molecule_0' is not bound by a potential or constraint to any other atom in the same moleculetype.

Environment

# vermouth installed using
python -m pip install git+https://github.com/marrink-lab/vermouth-martinize.git#vermouth
gmx --version
# GROMACS version:    2021.1
pckroon commented 3 years ago

Thanks for the extensive and detailed report. This is definitely not supposed to happen :)

Alanine is defined as follows in the library:

[ moleculetype ]                                                                
; molname       nrexcl                                                          
ALA                1                                                            

[ atoms ]                                                                       
;id type resnr residu atom cgnr   charge                                        
 1   SP2    1   ALA    BB     1      0                                          
 2   TC3    1   ALA    SC1    2      0                                          

[ constraints ]                                                                 
#meta {"group": "Side chain bonds", "ifndef": "FLEXIBLE"}                       
;  i     j   funct   length                                                     
  BB   SC1    1       0.270                                                     

This indeed means that there will only be a connection (constraint specifically) between BB and SC1 if FLEXIBLE is not defined. In molecule_0.itp you can find them as:

...
[ constraints ]
...
#ifndef FLEXIBLE                                                                
; Side chain bonds                                                              
...
 20  21 1 0.270                                                                 
 22  23 1 0.270                                                                 
...

I'll open a PR soon to also add a stiff bond #ifdef FLEXIBLE.

bisejdiu commented 3 years ago

Thank you for the quick fix!