qmlcode / qml

QML: Quantum Machine Learning
MIT License
197 stars 84 forks source link

Some basic functionality for the Compound class #125

Closed puckvg closed 4 years ago

puckvg commented 4 years ago

It's not a bug but rather an enhancement / feature request : when creating mol objects using the Compound class to then generate a Coulomb matrix with mol.generate_coulomb_matrix, we have to specify the desired size of the Coulomb matrix with the size argument. It would be nice if properties such as the number of atoms were available in the Compound class. Currently I'm working around this by reading in the coordinates and atom types from the xyz files myself and generating Coulomb matrices using the representations.generate_coulomb_matrix function instead.

Dom1L commented 4 years ago

You could access the size through the nuclear charges like:

size=compound.nuclear_charges.shape[0]

Hope that helps!

puckvg commented 4 years ago

Right, there's just me being an idiot .. thanks!