Closed HenriqueCSJ closed 5 years ago
By default MolML accepts a few simple inputs tuples of elements, numbers, coordinates, connectivity or it can take filename inputs for .xyz, .out, or .mol2.
In principle, any format is acceptable for MolML as you can define arbitrary loading functions for data. A very simple example of this can be found here: https://github.com/crcollins/molml/blob/master/examples/simple.py#L85
Basically, if you give input_type
a function that takes in your object and returns a LazyValues
object, then you can use anything.
from molml.utils import LazyValues
from molml.features import CoulombMatrix
def read_data(obj):
return LazyValues(elements=obj.get_elements(), coords=obj.get_coords())
objs = [obj1, obj2, obj3]
feat = CoulombMatrix(input_type=read_data)
feat.fit_transform(objs)
Hope that helps.
Thank you very much! I'll give it a try today.
Sorry, this is more like a basic question. Can MolML Read moleculules obtained as RDKit objects (or other molecular formats like Mol2 or Mol V3000)?