Closed zjun028 closed 6 months ago
HI @zjun028,
Thank you for letting me know about the issue. Seems to me the RDkit code to calculate the molecule charge is not working properly. I will try to fix and back to you.
Thank you.
@pablo-arantes Any updates? Thanks!
Hi @zjun028,
Sorry for the delay. The previous code was not able to compute the charges correctly, then when you created your topology using antechamber, it accidentally assigned 0 for the charge. Now, I've changed the notebook, and you can assign the charge of your molecule.
Please let me know if it's working fine.
Thank you.
Best,
Pablo
In the generated bash gaff.sh, it is like this: antechamber -i ligand_h.pdb -fi pdb -o ligand.mol2 -fo mol2 -c bcc -nc 0 -rn LIG -at gaff2
The error message like this: Info: Total number of electrons: 297; net charge: 0 Info: The number of electrons is odd (297). Please check the total charge (-nc flag) and spin multiplicity (-m flag).
When I change the -nc from 0 to 1, it succeeds: antechamber -i ligand_h.pdb -fi pdb -o ligand.mol2 -fo mol2 -c bcc -nc 1 -rn LIG -at gaff2
Is there anything wrong here? hmol = Chem.MolFromMolFile('temp.mol', removeHs=False) charge_mol = Chem.rdPartialCharges.ComputeGasteigerCharges(hmol) charge = Chem.GetFormalCharge(hmol) print("Charge = " + str(charge)) mol_end = mol_with_atom_index(hmol) IPythonConsole.drawMol3D(hmol)