pablo-arantes / making-it-rain

Cloud-based molecular simulations for everyone
MIT License
385 stars 105 forks source link

Error in Protein_ligand.ipynb antechamber commands #101

Closed zjun028 closed 6 months ago

zjun028 commented 7 months ago

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)

pablo-arantes commented 7 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.

zjun028 commented 7 months ago

@pablo-arantes Any updates? Thanks!

pablo-arantes commented 6 months ago

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