You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Are the Espaloma charges dependent on the conformation of the chemical compound?
Because after using this code, I get the same charges for each conformation, and I thought that the AM1 method inherently takes conformation into account, unlike, for example, Gasteiger.
Code:
import rdkit
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import rdDistGeom, rdFMCS
from openff.toolkit import Molecule
from espaloma_charge.openff_wrapper import EspalomaChargeToolkitWrapper
import numpy as np
import time
from espaloma_charge import charge
toolkit_registry = EspalomaChargeToolkitWrapper()
def get_conformations(molecule):
all_partial_charges = []
molecule.RemoveAllConformers()
molecule = Chem.AddHs(molecule)
params = rdDistGeom.ETKDGv3()
params.randomSeed = 0xd06f00d
params.numThreads = 4
params.maxAttempts = 100
# print how many atoms there is
cids = rdDistGeom.EmbedMultipleConfs(molecule, 32, params)
if len(cids) == 0:
print("Failed to generate conformations for molecule. Skipping.")
return None, None
molecule = Chem.RemoveHs(molecule)
# Calculating Partial Charges with AM1-BCC
conformers = Molecule.from_rdkit(molecule,
allow_undefined_stereo=True,
hydrogens_are_explicit=False).conformers
molecule.RemoveAllConformers()
for conformer in conformers:
start = time.time()
template = Molecule.from_rdkit(molecule,
allow_undefined_stereo=True,
hydrogens_are_explicit=False)
template.add_conformer(conformer)
template.assign_partial_charges(
partial_charge_method = 'espaloma-am1bcc',
toolkit_registry=toolkit_registry,
use_conformers = template.conformers
)
end = time.time()
print('DURATION:\t',(end - start)/60)
all_partial_charges.append(template.partial_charges)
return all_partial_charges
Hi,
Are the Espaloma charges dependent on the conformation of the chemical compound?
Because after using this code, I get the same charges for each conformation, and I thought that the AM1 method inherently takes conformation into account, unlike, for example, Gasteiger.
Code:
The text was updated successfully, but these errors were encountered: