mosdef-hub / mbuild

A hierarchical, component based molecule builder
https://mbuild.mosdef.org
Other
173 stars 80 forks source link

Energy minimization fails for linear molecule #1043

Closed HUANGZR86 closed 2 years ago

HUANGZR86 commented 2 years ago

Dear developer,

I was using MBuild for reading the SMILES of a linear molecule 'N#C[S-]' and doing energy minimisation. However, it fails to do so with the error message below:

image

Can you give me some advice to deal with it?

Best wishes, Ziru

daico007 commented 2 years ago

Hi Ziru, in this case, I think you just need to give it a slightly bigger box, i.e.

aloaded_mol =  mb.load("N#C[S-]", smiles=True)
aloaded_mol.box = mb.Box([1, 1, 1])
aloaded_mol.energy_minimize(forcefield="MMFF94", steps=10**6)
HUANGZR86 commented 2 years ago

Thank you very much, it works now!