@@ -86,10 +86,6 @@ def __init__(
86
86
self .mmaps ["dp" ] = np .memmap (
87
87
fnames ["dp" ], mode = "r" , dtype = np .float32 , shape = (num_all_confs , 3 )
88
88
)
89
- if "mol_idx" in self .properties :
90
- self .mmaps ["mol_idx" ] = np .memmap (
91
- fnames ["mol_idx" ], mode = "r" , dtype = np .uint64
92
- )
93
89
94
90
assert self .mmaps ["idx" ][0 ] == 0
95
91
assert self .mmaps ["idx" ][- 1 ] == len (self .mmaps ["z" ])
@@ -178,13 +174,6 @@ def process(self):
178
174
dtype = np .float32 ,
179
175
shape = (num_all_confs , 3 ),
180
176
)
181
- if "mol_idx" in self .properties :
182
- mmaps ["mol_idx" ] = np .memmap (
183
- fnames ["mol_idx" ] + ".tmp" ,
184
- mode = "w+" ,
185
- dtype = np .uint64 ,
186
- shape = (num_all_confs ,),
187
- )
188
177
189
178
print ("Storing data..." )
190
179
i_atom = 0
@@ -204,8 +193,6 @@ def process(self):
204
193
mmaps ["pq" ][i_atom :i_next_atom ] = data .pq
205
194
if "dp" in self .properties :
206
195
mmaps ["dp" ][i_conf ] = data .dp
207
- if "mol_idx" in self .properties :
208
- mmaps ["mol_idx" ][i_conf ] = data .mol_idx
209
196
i_atom = i_next_atom
210
197
211
198
mmaps ["idx" ][- 1 ] = num_all_atoms
@@ -231,8 +218,6 @@ def process(self):
231
218
os .rename (fnames ["pq" ] + ".tmp" , fnames ["pq" ])
232
219
if "dp" in self .properties :
233
220
os .rename (fnames ["dp" ] + ".tmp" , fnames ["dp" ])
234
- if "mol_idx" in self .properties :
235
- os .rename (fnames ["mol_idx" ] + ".tmp" , fnames ["mol_idx" ])
236
221
237
222
def len (self ):
238
223
return len (self .mmaps ["idx" ]) - 1
@@ -249,7 +234,6 @@ def get(self, idx):
249
234
- :obj:`q`: Total charge of the molecule.
250
235
- :obj:`pq`: Partial charges of the atoms.
251
236
- :obj:`dp`: Dipole moment of the molecule.
252
- - :obj:`mol_idx`: The index of the molecule of the conformer.
253
237
254
238
Args:
255
239
idx (int): Index of the data object.
@@ -272,8 +256,6 @@ def get(self, idx):
272
256
props ["pq" ] = pt .tensor (self .mmaps ["pq" ][atoms ])
273
257
if "dp" in self .properties :
274
258
props ["dp" ] = pt .tensor (self .mmaps ["dp" ][idx ])
275
- # if "mol_idx" in self.properties:
276
- # props["mol_idx"] = pt.tensor(self.mmaps["mol_idx"][idx], dtype=pt.int64).view(1, 1)
277
259
return Data (z = z , pos = pos , ** props )
278
260
279
261
def __del__ (self ):
0 commit comments