megnet.data.qm9 module¶
Simple qm9 utils, kept here for historical reasons
-
class
AtomNumberToTypeConverter
(mapping={'1': 1, '6': 2, '7': 4, '8': 6, '9': 8})[source]¶ Bases:
monty.json.MSONable
Convert atomic number Z into the atomic type in the QM9 dataset
-
ring_to_vector
(l)[source]¶ Convert the ring sizes vector to a fixed length vector For example, l can be [3, 5, 5], meaning that the atom is involved in 1 3-sized ring and 2 5-sized ring. This function will convert it into [ 0, 0, 1, 0, 2, 0, 0, 0, 0, 0]. :param l: (list of integer) ring_sizes attributes
- Returns
- (list of integer) fixed size list with the i-1 th element indicates number of
i-sized ring this atom is involved in.