normal martinize-2.4 : problem/suggestion

  • Landry
  • Landry's Avatar Topic Author
  • Offline
  • Fresh Boarder
More
10 years 5 months ago #3027 by Landry
martinize-2.4 : problem/suggestion was created by Landry
Dear Martini developers,

I have tried the new martinize script (v2.4) in order to compare the output files with the 2.3 version.

I find a problem in the itp file created for the protein in the case of Cystine bridges. Fir the cystine bridge definition, the lines are:
in the v2.3 : at1_id at2_id 1 0.39000 5000
in the v2.4 : at1_id at2_id 1 0.24000
So there is no force constant for v2.4 which give an error during the grompp step (Incorrect number of parameters - found 1, expected 2 or 4 for Bond.)
Indeed, in the script (line 1065) the constant force value is None.
Is it an error?

Moreover, you change the #ifdef RUBBER_BANDS by #ifndef NO_RUBBER_BANDS for the elastic network definition.
I suppose that, as martini needs elastic networks for secondary structure preservation, this change adds elastic networks by default. If yes, why the topol.top file created by martinize_v2.4 still contains the #define RUBBER_BANDS line? I think this line is now no more necessary isn't it?


I have also a suggestion for the next version (minor importance, like all computer guys, I am lazy). In the topol.top file, the line is always #include "martini.itp" independently of the force field choice. Currently, we have to modify this line manually. In order to the script does it automatically, I have modified the lines 5028 to 5041 by:
        if (options['ForceField'].name == "martini21") or (options['ForceField'].name == "elnedyn"):
	    itp_ff="martini_v2.1.itp"
        elif (options['ForceField'].name == "martini22") or (options['ForceField'].name == "elnedyn22"):
	    itp_ff="martini_v2.2.itp"
        elif options['ForceField'].name == "martini21p":
	    itp_ff="martini_v2.1P.itp"
        elif (options['ForceField'].name == "martini22p") or (options['ForceField'].name == "elnedyn22p"):
	    itp_ff="martini_v2.2P.itp"
	else:
	    itp_ff="martini.itp"
   
	top.write(
'''#include "%s"
%s
    
[ system ]
; name
Martini system from %s
    
[ molecules ]
; name        number
%s''' % (itp_ff, itps, options["-f"] and options["-f"].value or "stdin", molecules)) # I have deleted the #define "RUBBER_BANDS" line.

May be the syntax is not well adapted, I am not an expert in python.


Landry

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #3031 by djurre
Replied by djurre on topic martinize-2.4 : problem/suggestion
Dear Landry,
Thanks a lot for the bug report and suggestion. To answer you questions one by one:
-Force constant 'None' should give a constraint instead of a bond. I'll look into why that is not happening here.
-You are right, the "#define RUBBER_BANDS" line is no longer used. I'll remove it from the code in a next release.
-I totally agree that the reference to the forcefield should depend on the forcefield. However it also should be flexible, for example if one uses a self modified forcefield. But than again, it is in your code because of the else statement. I'll try include it in the next release, either as you proposed or in a different way.

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #3032 by djurre
Replied by djurre on topic martinize-2.4 : problem/suggestion
I've fixed the problem with the constraints. If you change lines 4974 and 4975 to:

cat = (forceconst == None) and "Constraint" or "Link"
top.bonds.append(TOP.Bond((atomA,atomB),options=options,type=1,parameters=(bondlength,forceconst),category=cat,comments="Cys-bonds/special link"))

it should be fixed. If you have time, could you check if it works? If it works we'll include it in the next version.

Please Log in or Create an account to join the conversation.

  • Landry
  • Landry's Avatar Topic Author
  • Offline
  • Fresh Boarder
More
10 years 5 months ago - 10 years 5 months ago #3036 by Landry
Replied by Landry on topic martinize-2.4 : problem/suggestion
No it doesn't work. I have the error message:
File "martinize-2.4.py", line 4977, in main
    top.bonds.append(TOP.Bond((atomA,atomB),options=options,type=1,parameters=(bondlength,forceconst),category=cat,comments="Cys-bonds/special link"))
NameError: global name 'TOP' is not defined

If I have changed "TOP.Bond" by "top.bonds", I have now the error message:
File "martinize-2.4.py", line 4977, in main
    top.bonds.append(top.bonds((atomA,atomB),options=options,type=1,parameters=(bondlength,forceconst),category=cat,comments="Cys-bonds/special link"))
TypeError: 'CategorizedList' object is not callable

Sorry I can't help you more than that, I never use python.

Landry
Last edit: 10 years 5 months ago by Landry.

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #3037 by djurre
Replied by djurre on topic martinize-2.4 : problem/suggestion
Ah , yes of course. You can leave the "TOP." away. So only the "Bond((...etc"

Please Log in or Create an account to join the conversation.

  • Landry
  • Landry's Avatar Topic Author
  • Offline
  • Fresh Boarder
More
10 years 5 months ago - 10 years 5 months ago #3038 by Landry
Replied by Landry on topic martinize-2.4 : problem/suggestion
It works now, but still a little problem.
Even without the -cys option, martinize finds and writes cys-bond. It could be a problem if the cys-bonds find by martinize don't exist.

So, if I used the -cys option with -cys chain/resn/resi,chain/resn/resi, the cys-bonds already find by martinize are written twice in the protein.itp file (one time by martinize and one by me in the -cys option).


EDIT: No it's fine, it works perfectly, I did a mistake, I have used the -cys option twice! sorry
Last edit: 10 years 5 months ago by Landry.

Please Log in or Create an account to join the conversation.

  • Landry
  • Landry's Avatar Topic Author
  • Offline
  • Fresh Boarder
More
10 years 5 months ago #3040 by Landry
Replied by Landry on topic martinize-2.4 : problem/suggestion
Last remark (I hope). The HIH residue parameters are present in all the forcefield for martinize_v2.3 but for v2.4, it is missing for the elnedyn forcefield. Is it normal?

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #3064 by djurre
Replied by djurre on topic martinize-2.4 : problem/suggestion

Landry wrote: EDIT: No it's fine, it works perfectly, I did a mistake, I have used the -cys option twice! sorry


Oh man, I spend all yesterday evening trying to reproduce this! :-) No, just kidding. Glad this problem is fixed. I'll look into the HIH issue. Thanks again for reporting!

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #3083 by chenyuetian
Replied by chenyuetian on topic martinize-2.4 : problem/suggestion
Thanks for the discussion here. I am facing the same problem (in grompp, Incorrect number of parameters - found 1, expected 2 or 4 for Bond) when using the -cys option. I don't know how you modify the python script here, nor wait for the release of martinize v2.5.

So now in the .itp file may I just move the generated the cystine bridge definition from the [bonds] section to [constrains] section?

Another problem is the warning when in grompp step:
Warning: atom name 4 in 1r2m_water.top and 1r2m_water.gro does not match (SCP - SCD)
Warning: atom name 5 in 1r2m_water.top and 1r2m_water.gro does not match (SCN - SCD)
I am sure I can ignore the warning but it does exist.
The -ff elnedyn22p option is used in martinize2.4 script.

Please Log in or Create an account to join the conversation.

More
10 years 5 months ago #3088 by djurre
Replied by djurre on topic martinize-2.4 : problem/suggestion
1) Yes, you can just move the cys-bridge from bonds to constraints.
2) Yes, you can ignore the warning. The martinize.py script also warns you that this will happen:

WARNING Bead names of charges in sidechains differ between .top/.itp and .pdb.
WARNING Using names in topology, as Gromacs does, gives the correct result.

Please Log in or Create an account to join the conversation.

Time to create page: 0.132 seconds