Closed dim-99 closed 2 years ago
Update I tried to use -from to point out the charmm.rtf file, still the forcefield is not identified.
Thanks
Hi, yes, the code can (in principle) deal with any type of molecule, as long as the required datafiles are present. I would welcome PRs that add data files.
Update I tried to use -from to point out the charmm.rtf file, still the forcefield is not identified.
What did you try exactly? What did you try to achieve? What was the command line you used? Did you read the (admittedly sparse) documentation?
Thank you for the reply.
I made a directory named charmm with .rtp file for FAD molecule (which I retrieved from CGENFF and I converted the .rtf file to .rtp by hand) and another directory with FAD.charmm.map where I mapped atoms in the .pdb file to martini22 beads.
Used the command martinize2 -f fad.pdb -x fad-cg.pdb -o fad.top -ff martini22 -from charmm/fad.rtp -map-dir martini-map
I get the error
Traceback (most recent call last):
File "/apps/vermouth-martinize/0.7.2/bin/martinize2", line 797, in
Thank you again for your patience. I went through the documentation several times, but I can't get through this error.
Thanks for the details. You should specify not the file, but the folder: -ff-dir ./charmm -from charmm
*. You can check whether it picks up on your new blocks with -list-blocks
, and try -list-ff
to see which force fields are found.
forcefields/charmm/FAD.rtp
, and do -ff-dir forcefields
. But I can't quite recall nor test at the moment.Thank you again.
I tried the following,
martinize2 -f fad.pdb -x fad-cg.pdb -o fad.top -ff-dir ./forcefields -from forcefields/charmm/FAD.rtp it returns the same error ValueError: Unknown force field
When I neglect do martinize2 -f fad.pdb -x fad-cg.pdb -o fad.top -ff-dir ./forcefields -list-ff it shows charmm as one of the options, but when I do list-blocks it doesn't pick up any charmm blocks. Am I doing something wrong again?
Thank you ! I appreciate it
... it shows charmm as one of the options...
So do -from charmm
. (or -to charmm
).
list-blocks needs you to select a valid FF before it can print the blocks in a force field.
Thanks again Peter!
I tried martinize2 -f fad.pdb -x fad-cg.pdb -o fadtopol.top -ff-dir ./forcefields -from charmm -ff nucleotideff -map-dir martinimap In the nucleotideff folder I have nucleotide.ff (which has force field definition for FAD) and other martini22 .itp and .ff files I copied from force field folder of installation files.
I get the error,
Traceback (most recent call last):
File "/apps/vermouth-martinize/0.7.2/bin/martinize2", line 797, in <module>
entry()
File "/apps/vermouth-martinize/0.7.2/bin/martinize2", line 556, in entry
partial_mapping = read_mapping_directory(directory,
File "/apps/vermouth-martinize/0.7.2/lib/python3.10/site-packages/vermouth/map_input.py", line 427, in read_mapping_directory
new_mappings = read_backmapping_file(infile, force_fields)
File "/apps/vermouth-martinize/0.7.2/lib/python3.10/site-packages/vermouth/map_input.py", line 110, in read_backmapping_file
map_obj = make_mapping_object(from_block, to_block, mapping,
File "/apps/vermouth-martinize/0.7.2/lib/python3.10/site-packages/vermouth/map_input.py", line 166, in make_mapping_object
idx_to = to_name_to_idx[atname_to]
KeyError: 'Qa'
My mapping file looks like this,
[ molecule ]
FAD
[from]
charmm
[to]
nucleotideff
[ nucleotide ]
Qa P3 SC3 SN0 SNa SP3 N0 P4
[ mapping ]
charmm27 charmm36
[ atoms ]
1 PA Qa
2 O1A Qa
3 O2A Qa
5 O5B Qa
8 O3P Qa
11 O1P Qa
14 O2P Qa
15 P Qa
16 O5' Qa
17 C5' P3
18 O4' P3
19 C3' P3
20 O3' P3
21 C2' P3
22 O2' P3
24 C8M SC3
25 C8 SC3
26 C7M SC3
27 C9 SN0
28 C9A SN0
29 N10 SN0
30 C10 SN0
31 C6 SNa
32 C5X SNa
33 N5 SNa
34 C4X SNa
35 N1 SP3
36 C2 SP3
37 O2 SP3
38 N3 SP3
39 C4 SP3
40 O4 SP3
41 N9A SNa
42 C8A SNa
43 N7A SNa
44 N1A SNa
45 N3A SNa
46 C2A SNa
47 C1B N0
48 O4B N0
49 C4B N0
50 C5B N0
51 O2B P4
52 C2B P4
53 C3B P4
54 O3B P4
Mappings map by atom/name/, not /type/. The block you added to the martini forcefield for ~your lipid~ FAD defines which atom types will be assigned to the atoms.
Thank you @pckroon !
@pckroon Can this issue be closed? It helps to have less issues open.
Thank you ! I'll close the issue , thanks again for the guidance!
Hi,
Is it possible to use this plugin for other molecules like FAD and PEG (now that we have parameters for these molecules ?)
Thank you