Closed l454025801 closed 2 years ago
Hi @l454025801,
Happy to help as you're almost there. As you want to connect 4 itp-files all of the residues in the residue graph need to have the "from_itp" label with the value set to that of the molecule name. So your command for making the graph should be more like this:
polyply gen_seq -f C12.itp VVKK.itp OEG_4.itp ../Z33/Z33_mar3.itp -from_file c:C12 v:VVKK o:O4 z:Z33\
-seq c v o z -connects 0:1:0-0 1:2:3-0 2:3:3-0 -o seq.json -name test \
-label 0:"from_itp":"C12-1" 1:"from_itp":"VVKK-1" 2:"from_itp":"OEG4-1" 3:"from_itp":Z33-1
Please note that in the last line of this command I simply guessed your molecule names. You may have to adjust those. Finally in case you haven't done it you will need to install the version from GitHub not pypi in order to avoid one bug that only recently has been fixed.
Also be aware that in your link file the indices seem strange. Note that by_atom_id refers
to the atom ids in the final molecule. For example the bond 5 5 1 0.41 2000
would result in a bond between atom 5 with itself NOT between atom 5 in two bonded residues. It is easiest to first just stitch together the itp files and then see which atoms you want to connect and adjust the links.
I hope this helps! Please let me know if there are any other issues.
If you want a "clean example" have a look at the commands below:
polyply gen_params -lib martini3 -seq PEO:2 -o A.itp -name PEO
polyply gen_params -lib martini3 -seq PS:2 -o B.itp -name PS
polyply gen_params -lib martini3 -seq PE:2 -o C.itp -name PE
polyply gen_seq -f A.itp B.itp C.itp -from_file a:PEO b:PS c:PE -seq a b c -connects 0:1:0-0 1:2:1-0 \
-o seq.json -name test -label 0:"from_itp":"PEO-1" 1:"from_itp":PS-1 2:"from_itp":PE-1
[ link ]
[ molmeta ]
by_atom_id true
[ bonds ]
2 6 1 3000 0.43 ; bond between backbone PEO and PS
10 11 1 3000 0.43 ; bond between backbone PS and PE
polyply gen_params -f A.itp B.itp C.itp link.ff -seqf seq.json -o test.itp -name test
Thank you very much! It works alright now!
Good to hear! I will convert this issue to a discussion so that other people can see it as well. But feel free to still comment here when you have any other problems related to this
I want to connect 4 separate itp files into 1. I used the following command:
polyply gen_seq -f C12.itp VVKK.itp OEG_4.itp ../Z33/Z33_mar3.itp -from_file c:C12 v:VVKK o:O4 z:Z33 -seq c v o z -connects 0:1:0-0 1:2:3-0 2:3:3-0 -o seq.json -name test -label 0:"from_itp":"C12-1"
polyply gen_itp -f C12.itp VVKK.itp OEG_4.itp ../Z33/Z33_mar3.itp link.ff -o Z33_O4 -seqf seq.json -name Z33_O4
It gave the errors:
Below is the VVKK.itp and the link.ff
Could you please help with this? Any help would be much appreciated!