paduagroup / fftool Goto Github PK
View Code? Open in Web Editor NEWTool to build force field input files for molecular simulation
License: MIT License
Tool to build force field input files for molecular simulation
License: MIT License
Thanks, Now, Solved!
I have tried to read a molecule with fftool and in several data formats but I encounter several issues:
The molecule is TFSI:
16
C 6.03034 4.09220 5.48886
F 5.37202 5.30065 5.36546
F 6.39135 3.89541 6.80769
F 7.16406 4.10454 4.69920
N 3.42469 2.54403 5.86881
C 0.86033 0.89196 5.97521
F 0.03319 0.14152 5.16196
F 0.14535 1.94693 6.50866
F 1.34449 0.09819 6.99698
S 4.93349 2.75026 4.95267
S 2.24665 1.53550 4.99964
O 5.62532 1.37952 5.01298
O 4.53998 2.86277 3.47122
O 1.78341 2.37997 3.80211
O 3.05533 0.41678 4.32326
H 3.00037 3.48797 6.01118
I created a .pdb
and a .gzmat
extension with obabel and a .zmat
extension with molden. All give different errors.
$ fftool 10 files/TFSI.xyz -r 10
> density 10.000 mol/L volume 1660.6 A^3
> molecule_file species nmol force_field nbond source charge
> Traceback (most recent call last):
File "/Users/marcodigennaro/WORK/external_packages/fftool/fftool", line 2816, in <module>
main()
File "/Users/marcodigennaro/WORK/external_packages/fftool/fftool", line 2768, in main
spec.append(mol(zfile, connect, box))
File "/Users/marcodigennaro/WORK/external_packages/fftool/fftool", line 615, in __init__
self.fromxyz(filename, connect, box)
File "/Users/marcodigennaro/WORK/external_packages/fftool/fftool", line 882, in fromxyz
self.name = tok[0] # molecule name
IndexError: list index out of range
$ fftool 10 files/TFSI.pdb -r 10
> density 10.000 mol/L volume 1660.6 A^3
> molecule_file species nmol force_field nbond source charge
> warning: no force field for TFSI
> Traceback (most recent call last):
File "/Users/marcodigennaro/WORK/external_packages/fftool/fftool", line 2816, in <module>
main()
File "/Users/marcodigennaro/WORK/external_packages/fftool/fftool", line 2772, in main
.format(zfile, spec[i].name, spec[i].nmol, spec[i].ffile,
TypeError: unsupported format string passed to NoneType.__format__
$ fftool 10 files/TFSI.zmat -r 10
> density 10.000 mol/L volume 1660.6 A^3
> molecule_file species nmol force_field nbond source charge
> Traceback (most recent call last):
File "/Users/marcodigennaro/WORK/external_packages/fftool/fftool", line 2816, in <module>
main()
File "/Users/marcodigennaro/WORK/external_packages/fftool/fftool", line 2768, in main
spec.append(mol(zfile, connect, box))
File "/Users/marcodigennaro/WORK/external_packages/fftool/fftool", line 611, in __init__
self.fromzmat(filename, connect)
File "/Users/marcodigennaro/WORK/external_packages/fftool/fftool", line 696, in fromzmat
self.zmat2cart(z)
File "/Users/marcodigennaro/WORK/external_packages/fftool/fftool", line 754, in zmat2cart
theta = math.acos(delx / math.sqrt(delx*delx + dely*dely))
ZeroDivisionError: float division by zero
How to get the right zmat format? In the example folder some files (eg. ethane) have leading atom index:
ethane
1 C3H
2 C3H 1 rCC
3 H 2 rCH 1 aHCC
4 H 1 rCH 2 aHCC 3 d1
5 H 2 rCH 1 aHCC 4 d2
6 H 1 rCH 2 aHCC 5 d1
7 H 2 rCH 1 aHCC 6 d2
8 H 1 rCH 2 aHCC 7 d1
...
others (eg. benzene) do not:
benzene
CA
CA 1 rCC
CA 2 rCC 1 120.00
CA 3 rCC 2 120.00 1 0
CA 4 rCC 3 120.00 2 0
CA 5 rCC 4 120.00 3 0
HA 1 rCH 2 120.00 3 180
HA 2 rCH 3 120.00 4 180
HA 3 rCH 4 120.00 5 180
HA 4 rCH 5 120.00 6 180
HA 5 rCH 6 120.00 1 180
HA 6 rCH 1 120.00 2 180
...
What is the correct format and how to obtain it?
In my case, I don't know the atom types in advance (TFSI is just and example).
Thank you
Good morning,
I am having some issue in understanding the units conversion from the GROMACS .itp file into the LAMMPS .ff one. Please correct me if I am wrong.
GROMACS adopts the following units:
sigma [nm] epsilon [kJ/mol] b_0 [nm] k_b [kJ mol-1 nm-2]
whereas LAMMPS, when units real
key is used, has the following units:
sigma [Å] epsilon [kcal/mol] b_0 [Å] k_b [kcal mol-1 Å-2]
To give you an example the .itp file is like:
[ atomtypes ] opls_800 C800 12.0110 0.000 A 3.50000E-01 2.76144E-01
, where [ atoms ] 1 opls_800 1 UNK C00 1 -0.0487 12.0110
Whereas .ff looks like:
ATOMS C00 C00 12.011 -0.0487 lj 3.50 0.27614
Here I see the conversion from nm to Å, but I don't see the conversion from kJ/mol to kcal/mol. I am quite sure that here I am missing something, but I don't what I am missing.
Furthermore the equation used by GROMACS to define the bonded interaction uses a 1/2 term as prefactor, whereas the one used by LAMMPS, when the bond_style harmonic
key is used, don't. Which means that all the k_b terms should be divided by 200 (if we don't consider the kJ to kcal conversion) when converting from GROMACS ([kJ mol-1 nm-2]) to LAMMPS real units ([kcal mol-1 Å-2]). Whereas I get:
GROMACS .itp
[ bonds ] 2 1 1 0.1410 267776.000
LAMMPS .ff
BONDS O01 C00 harm 1.410 2677.8
I am probably missing something since the simulations I run give reasonable results, but I just wanted to be sure about why especially since I need to write a customized .ff file by hand and I don't want to use erroneous values/units.
Thanks.
Matteo
Hello all,
I have generated input files for OpenMM using fftool and my system contains more than 100000 atoms. When running OpenMM I get an error "ValueError: Misaligned residue name" and it points to the line of atom 100000.
The error is solved by manually removing one space from the front of the residue name for all residues after 99999.
Is it possible to include this on the code?
Thank you!
Do we need a warning message when generating an input file for LAMMPS and not for OpenMM?
warning: atom name SiO1a too long for pdb in siosicmim+
warning: atom name HCSi1 too long for pdb in siosicmim+
...
Dear Agilio Padua,
I have been using fftool for preparing my MD simulations with LAMMPS. I recently fell prey to an unexpected effect due to the order of directives in the LAMMPS input scripts generated by fftool.
If one uses pair_style hybrid, the pair_modify settings (e.g., tail correction) don't seem to be stored in the binary restart file. This will lead to an unexpected, yet significant, drop in the density in a simulation.
I have submitted the issue to the LAMMPS-users mailing list (see link below), but it is yet unclear whether this is going to be resolved internally in LAMMPS. To avoid any possible issues and confusion I would suggest changing the order of the restart and pair_style/pair_modify directives in the LAMMPS input generation in fftool.
If you want I can create a corresponding pull request.
Cheers,
Frank
inquiry to the LAMMPS-users mailing list: https://sourceforge.net/p/lammps/mailman/message/35456160/
I am using your fftool to convert a xyz file to the lammps input files and ran into some trouble with the IMPROPER keyword in the ff file, it seems the code doesnt read it. Therefor the impropers get added to the list of dihedrals. Also the potential keyword isnt read for dihedral and defaults to opls. I have added the xyz and ff files for reference.
Thank you for your time.
Is there a way for fftool to output to Amber? I tried to output to GROMACS first and then used Parmed to convert GROMACS topology to Amber but got the error that it couldn't identify the file format.
Hi, I was trying to simulate some carbonates, specifically propylene carbonate and ethylene carbonate and other not cyclic, but I can't find the parameters in the force field so that the molecules are neutral. The cyclic residuals with the respective parameters used among those present in the force field are:
O_2 O_2
|| ||
C_2 C_2
/ \ / \
OS OS OS OS
\ / \ /
CT-CT CT-CT
\
CT
propylencarbonate ethylencarbonate
Thank you for your time.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.