Looked further into the issue of MMFF94 not "working", and for reason I
can't setup the force field on a lot of simple canonical SMILES.    I am
wondering if I need to re-install the OB.NET assembly, since most of the
code below previously worked for minimization.   Is there anything that
looks out of place or is now deprecated?  Should I use MOL2 instead of SDF?

 

Dim OBConv As New OBConversion

OBConv.SetInAndOutFormats("smi", "sdf")

Dim Mol As New OBMol

Dim smiles As String

Dim beginE, endE As Double

 

(get canonical smile here)

 

OBConv.ReadString(Mol, smiles)

Dim builder As New OBBuilder

Dim bool As Boolean = builder.Build(Mol)

Mol.SetDimension(3)

 

Mol.AddHydrogens(False, False)

Dim pFF As OBForceField = OBForceField.FindForceField("GAFF")

Dim success As Boolean = pFF.Setup(Mol)

If success = False Then MsgBox("Cannot setup up forcefield")

 

beginE = pFF.Energy()

If beginE = False Then MsgBox("Baseline energy is zero!")

 

'>>>>>>>>>>>>>>>>>>W/o Conformer search

pFF.EnableCutOff(True)

pFF.SetVDWCutOff(10.0)

pFF.SetElectrostaticCutOff(20.0)

pFF.SetUpdateFrequency(10) ' // update non-bonded distances infrequently

pFF.ConjugateGradients(250, 0.0001)

pFF.UpdateCoordinates(Mol)

'>>>>>>>>>>>>>>>>>>

 

endE = pFF.Energy()

_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to