-
Notifications
You must be signed in to change notification settings - Fork 13
martinate.sh can't handle martini3 itp files #30
Description
Using martini3 forcefield as provided on cgmartini.nl and specifying it in martinate.sh creates empty .itp files (like martini_v3.0_ions.itp) instead of copying the right files (like path/to/martini_v300/martini_v300_ions_v1.itp. It also doesn't include martini_v300_solvents_v1.itp in the topology .top file, which is problematic given it contains martini3 water beads.
Example of command: martinate.sh -f 2oar.pdb -fetch opm --insane-d=5 --insane-sol=W -martinize /path/to/martinize2 -ffdir /path/to/martini_v300 -cg martini3001, as written in martini3 paper
martini.itp is the only one well copied.
My personal quick fix was to write a small script outside of martinate.sh:
cp $input_dir/martini_v300/martini_v3.0.0{,_ions_v1,_phospholipids_v1,_sugars_v1,_solvents_v1}.itp .
sed -i -e 's/martini.itp/martini_v3.0.0.itp/' \
-e 's/martini_v3.0_sugars/martini_v3.0.0_sugars_v1/' \
-e 's/martini_v3.0_lipids/martini_v3.0.0_phospholipids_v1/' \
-e '9i #include\ "martini_v3.0.0_solvents_v1.itp"\n' \
-e 's/martini_v3.0_ions/martini_v3.0.0_ions_v1/' \
2oar-cg.top(It is possible to do this with two expressions instead of five with sed, but I was too lazy to search how.)