class 2 datafile

hi all
I want use cff forcefield as we know it is a second class forcefield.

i want to build class 2 data file for lammps as we know it needs bond-bond bond- angle bond-diheral terms (cross terms).
how can I make such this datafile. is any software can do this??
thanks in advance.

There is no requirement to place the force field parameters into the data file. They can be specified as pair_coeff, bond_coeff etc. in the input file just as well. The general structure of the topology information is unchanged versus other molecular force fields, so any software that produces the suitable topology in a data file is sufficient. worst case, you need to remove/replace the sections with some that you have written yourself.

the tricky part with generating such files is usually not the generation of the parameter sections but the “typing” of atoms and assignment of (partial) charge, which is highly dependent on the kind of system you are simulating and whether you are using a specific parameterization or some general tool to derive/assign those parameters. this often requires some significant understanding of the desired force field and - ideally - some templates or similar that have the necessary settings already applied. this is impossible to do in a general and fully automatic way, so there won’t be any tools that will do everything for you automatically.

the format of the corresponding topology related data file sections are independent of the force field of choice and thus can be generated in different ways and without knowing the specific force field. just do not create any *Coeff sections or remove them afterwards.


thank you dear axel because of your geat reply .
and one more question . can you please name some Softwares that can generate lammps data file . i need a software can generate data file that can recognize cross terms in pdb file . for example I open a pdb file and that software recognize angles dihedrals and cross terms and write them as data file . i know topo tool can recognize angle and duhedrals by guess command but it cant do it cross terms (bondbond bondangle and so on).
i appreciate you to help me

you are not paying attention and what you asking for is invalid. you need to improve your knowledge about force fields and specifically the details of class 2 force fields. this is prerequisite knowledge for conducting

a standard conforming pdb file has NO topology or force field information. it simply contains coordinates (in rather low resolution) and names of atoms (not force field types) according to some naming conventions defined in the PDB documentation.

even if you have additional force field terms in a class 2 force field, those use THE SAME topology information than a class 1 force field (bonds, angles, dihedrals and impropers) and nothing else. so there is NO DIFFERENCE in the TOPOLOGY between the two types of force fields.

what is different however, is the assignment of force field parameters. and for that, as i had already mentioned, it is crucial to assign the correct force field types to the ATOMS. ONLY THEN can a software determine how many different bond, angle, dihedral, improper types are needed.

if you read through the documentation for the read_data command and the class 2 interaction styles, you will see how those additional terms are mapped to the bond, angle, dihedral and improper topology information.

topotools is able to infer topological angles and dihedrals from the bond topology. but if you let VMD guess the bond topology, there is a high risk, that the built in heuristics in VMD will fail somewhere (after this is meant for visualization, where missing a bond here and there is usually not a big deal with biological systems) leading to bogus topology information. topotools does not even try to do a force field assignment and it will infer bond, angle, and other topological types from the constituent atom types. how this is all related to the individual force field at hand and has to be done during the atom typing step, which has to be done BEFORE loading a geometry into VMD for topotools to produce a correct topology. topotools is designed for people who know what they are doing and will do exactly what it is asked for, but will not pay any attention whether this is meaningful for a specific force field.

in short, your problem is a problem of force field parameter assignment, NOT a problem of topology generation.
tools that are known to be able to exchange data with LAMMPS are listed here:


thanks alot for your valuable information