OpenFF Automatic ParametrizationΒΆ

[1]:
import os
import pygromos
from pygromos.files.forcefield.openff.openff import OpenFF
from pygromos.files.gromos_system.gromos_system import Gromos_System
Warning: Unable to load toolkit 'OpenEye Toolkit'. The Open Force Field Toolkit does not require the OpenEye Toolkits, and can use RDKit/AmberTools instead. However, if you have a valid license for the OpenEye Toolkits, consider installing them for faster performance and additional file format support: https://docs.eyesopen.com/toolkits/python/quickstart-python/linuxosx.html OpenEye offers free Toolkit licenses for academics: https://www.eyesopen.com/academic-licensing
[2]:
project_dir = os.path.abspath("example_files/off_files/")
[3]:
ff = OpenFF()
Found off: /home/mlehner/PyGromosTools/pygromos/data/ff/SMIRNOFF/openff_unconstrained-2.0.0.offxml
[4]:
gsys = Gromos_System(work_folder=project_dir,
                     system_name="testOFF",
                     forcefield=ff,
                     in_smiles="C1CCCCC1",
                     in_imd_path=project_dir+"/gas_sd.imd",
                     auto_convert=True,
                     adapt_imd_automatically=True)
Found off: /home/mlehner/PyGromosTools/pygromos/data/ff/SMIRNOFF/openff_unconstrained-2.0.0.offxml
[5]:
gsys.top.make_ordered()
[6]:
gsys.top.SOLUTEATOM
[6]:
SOLUTEATOM
#   NRP: number of solute atoms
         18
#  ATNM: atom number
#  MRES: residue number
#  PANM: atom name of solute atom
#   IAC: integer (van der Waals) atom type code
#  MASS: mass of solute atom
#    CG: charge of solute atom
#   CGC: charge group code (0 or 1)
#   INE: number of excluded atoms
# INE14: number of 1-4 interactions
# ATNM MRES PANM IAC     MASS       CG  CGC INE
#                                           INE14
        1       1       C1      1       12.01078        -0.0764 0       10      2       3       5       6       7       8
                                                                                        9       10      17      18
                                                                                5       4       11      12      15      16
        2       1       C2      1       12.01078        -0.0764 0       9       3       4       6       7       8       9
                                                                                        10      11      12
                                                                                5       5       13      14      17      18
        3       1       C3      1       12.01078        -0.0764 0       8       4       5       9       10      11      12
                                                                                        13      14
                                                                                5       6       7       8       15      16
        4       1       C4      1       12.01078        -0.0764 0       8       5       6       11      12      13      14
                                                                                        15      16
                                                                                4       9       10      17      18
        5       1       C5      1       12.01078        -0.0764 0       7       6       13      14      15      16      17
                                                                                        18
                                                                                4       7       8       11      12
        6       1       C6      1       12.01078        -0.0764 0       6       7       8       15      16      17      18
                                                                                4       9       10      13      14
        7       1       H1      2       1.007947        0.0382  0       1       8
                                                                                4       9       10      17      18
        8       1       H2      2       1.007947        0.0382  0       0
                                                                                4       9       10      17      18
        9       1       H3      2       1.007947        0.0382  0       1       10
                                                                                2       11      12
        10      1       H4      2       1.007947        0.0382  0       0
                                                                                2       11      12
        11      1       H5      2       1.007947        0.0382  0       1       12
                                                                                2       13      14
        12      1       H6      2       1.007947        0.0382  0       0
                                                                                2       13      14
        13      1       H7      2       1.007947        0.0382  0       1       14
                                                                                2       15      16
        14      1       H8      2       1.007947        0.0382  0       0
                                                                                2       15      16
        15      1       H9      2       1.007947        0.0382  0       1       16
                                                                                2       17      18
        16      1       H10     2       1.007947        0.0382  0       0
                                                                                2       17      18
        17      1       H11     2       1.007947        0.0382  0       1       18
                                                                                0
        18      1       H12     2       1.007947        0.0382  1       0
                                                                                0
END
[7]:
gsys.rebase_files()
[8]:
gsys.imd.AMBER
[8]:
AMBER
#        AMBER   AMBSCAL
         1       1.200000
END
[9]:
gsys.imd.FORCE
[9]:
FORCE
#        BONDS   ANGLES          IMPROPER        DIHEDRAL        ELECTROSTATIC   VDW
         0       1       1       1       1       1
#        NEGR    NRE
         1       18
END
[10]:
atom = gsys.cnf.POSITION[7]
[11]:
atom.atomType
[11]:
'H'
[12]:
gsys.top.BONDANGLEBENDTYPE
[12]:
BONDANGLEBENDTYPE
#        NBTY: number of angle types
         2
#        CT      CHT     T0
        5.57203e+02     1.35622e-01     1.16548e+02
        5.02731e+02     1.24333e-01     1.15603e+02
END
[ ]: