selimsami / qforce

Apache License 2.0
57 stars 13 forks source link

Using external LJ parameters #45

Closed xiki-tempula closed 2 years ago

xiki-tempula commented 2 years ago

I'm interested in trying the openFF LJ.

I have the atomtype of each atom as ext_lj and the corresponding data as atomtypes.dat, I wonder how should I set the setting?

Like

lennard_jones = ext
ext_lj_lib = atomtypes.dat

?

Everything else is the same as gaff and it is only the sigma and epsilon of the atomtypes are changed. Thanks.

selimsami commented 2 years ago

ext_lj_lib should be an ITP file also with [atomtypes], [nonbonded_params] and optionally also [pairtypes]

You also need to set:

ext_lj_fudge, float:
Lennard-Jones fudge parameter for 1-4 interactions for when "lennard_jones" is set to "ext". 
ext_q_fudge, float:
Coulomb fudge parameter for 1-4 interactions for when "lennard_jones" is set to "ext". 
ext_comb_rule, int:
Choices(1, 2, 3)
Lennard-Jones combinations rules for when "lennard_jones" is set to "ext" (GROMACS numbering).
ext_h_cap, str:
Name of the atom type for capping hydrogens for when "lennard_jones" is set to "ext" 
xiki-tempula commented 2 years ago

@selimsami Thanks. My user case is that I want everything else to be generated in the same fashion as GAFF. I will only need to change the sigma and epsilon. I wonder if there is any easy way of doing this?

setting the ext_lj_fudge, ext_q_fudge and ext_comb_rule are reasonable but setting [nonbonded_params] and [pairtypes] seems to be quite laborious.

I think the [nonbonded_params] is generated automatically from ext_lj_fudge and ext_comb_rule? I wonder why we need to set it?

Seeing that I need to set ext_h_cap, I wonder if it is the case that the capping is determined by explicitly specifying the atom type in ext_h_cap instead of obtained from the QM information? I think the capping follows the rule of (1) the bond with the next neighbor has a bond order larger than 1.75; (2) the bond with the next neighbor is part of a ring; (3) the current atom has an electronegativity in Pauling scale larger than 3.0 (to prevent unwanted intramolecular hydrogen bonds, e.g., an O–C bond is not replaced by a O–H).

selimsami commented 2 years ago

I think the [nonbonded_params] is generated automatically from ext_lj_fudge and ext_comb_rule? I wonder why we need to set it?

You are right. If you don't set those two, it will automatically be generated from comb_rule and fudge. So that should work!

Seeing that I need to set ext_h_cap, I wonder if it is the case that the capping is determined by explicitly specifying the atom type in ext_h_cap instead of obtained from the QM information?

Those rules are indeed to used to determine when you cut a fragment and use a h_cap atom. ext_h_cap specifies which atom type is used for the FF parameters of the capping hydrogen.

xiki-tempula commented 2 years ago

@selimsami Thanks, so to confirm

In the setting I will need to set

[ff]
lennard_jones = ext
ext_lj_fudge = 1.0
ext_q_fudge = 0.83333333
ext_comb_rule = 2
ext_h_cap = h1
ext_lj_lib = atomtypes.itp

In the atomtypes.itp, I will only need to include the field of [ atomtypes ]

selimsami commented 2 years ago

Yes, that looks good to me