mosdef-hub / foyer

A package for atom-typing as well as applying and disseminating forcefields
https://foyer.mosdef.org
MIT License
119 stars 78 forks source link

Type error #458

Closed dyukovsm closed 2 years ago

dyukovsm commented 3 years ago

Bug summary When trying to use foyer to produce a hand made molecule (files/DTPA_bis_ethylhexylamino.mol2) it gave found no types for atom error. When 22 amino acids and carboxylic acids were tested, only 1 amino acid and carboxylic acid passed while all other amino acids failed. This suggests that the error is with oplsaa.xml file that details a possibility of carboxylic carbon to be bonded to amine carbon.

What were you trying to do and what happened instead? Please copy and paste the stack output when building a custom molecule in structure similar to amino acids the molecule and most amino acids fail the subsequent energy minimize. List of failed amino acids with an error foyer.exceptions.FoyerError: Found no types for atom "N" (6), wehre "N" changes depending on molecule: arginine, histidine, lysine, aspartic acid, L glutamic acid, serine, threonine, asparagine, glutamine, cysteine, selenocysteine, proline, L alanine, valine, isoleucine, leucine, Methionine, Phenylalanine, Tyrosine.

List of failed amino acids and molecules with an error: fails with an error such as: foyer.exceptions.FoyerError: Found multiple types for atom 2 (6): ['opls_235', 'opls_267']. are : files/DTPA_bis_ethylhexylamino.mol2, Tryptophan

List of passed amino acids with an exception: Exception: Parameters have not been assigned to all proper dihedrals. Total system dihedrals: 14, Parameterized dihedrals: 13. Note that if your system contains torsions of Ryckaert-Bellemans functional form, all of these torsions are processed as propers: glycine

List of passed acids: acetic acid.

Code to reproduce the behavior Included in the zip, short version: import mbuild as mb from foyer import Forcefield import mbuild.formats.charmm_writer as mf_charmm

water_FF_file = 'files/oplsaa.xml' water_molecule = mb.load('NCCCCC(N)C(=O)O', smiles=True) # fails lysine water_molecule.energy_minimize(water_FF_file , steps=10**4) water_molecule.name = 'DTPA'

water_molecule.save('DTPA_bis_ethylhexylamino.mol2', overwrite=True)#, combine='all')

Please include a code snippet that can be used to reproduce this bug.

# Paste your code here
#
#

Software versions

daico007 commented 2 years ago

I think this is just the SMARTS string field of the atomtype section of the XML hasn't been fully filled