Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use gasteiger instead of am1bcc for large mols #300

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions openmmforcefields/generators/template_generators.py
Original file line number Diff line number Diff line change
@@ -607,11 +607,16 @@ def generate_residue_template(self, molecule, residue_atoms=None):
if self._molecule_has_user_charges(molecule):
_logger.debug(f'Using user-provided charges because partial charges are nonzero...')
else:
_logger.debug(f'Computing AM1-BCC charges...')
_logger.debug(f'Computing partial charges...')
# NOTE: generate_conformers seems to be required for some molecules
# https://github.com/openforcefield/openff-toolkit/issues/492
molecule.generate_conformers(n_conformers=10)
molecule.assign_partial_charges(partial_charge_method='am1bcc')
if len(molecule.atoms) >= 150:
_logger.info(f'Molecule has >= 150 atoms ({len(molecule.atoms)}), using Gasteiger...')
partial_charge_method = 'gasteiger'
else:
partial_charge_method = 'am1bcc'
molecule.assign_partial_charges(partial_charge_method=partial_charge_method)

# Geneate a single conformation
_logger.debug(f'Generating a conformer...')