Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# position in the X, Y, and Z dimensions.
# After that there is a space, and three characters for an atomic symbol.
# After the symbol, there are two characters for the mass difference from
# the monoisotope.
# Next you have three characters for the charge.
# There are ten more fields with three characters each, but these are all
# rarely used.
start = HEADER_SIZE + 1 # Add 1 for counts line
stop = start + n_atoms
values = sdf[start:stop]
atoms = []
for i, v in enumerate(values):
coords = np.array([float(v[pos:pos+10]) for pos in range(0, 30, 10)])
atomic_num = get_atomic_num(v[31:34].strip())
iso = int(v[34:36])
charge = int(v[36:39])
info = np.array([int(v[pos:pos+3]) for pos in range(39, len(v), 3)])
atoms.append({'index': i,
'coords': coords,
'atomic_num': atomic_num,
'iso': iso,
'charge': charge,
'info': info})
return atoms
brain.get_fc_graphs
],
'methods': [],
'classes': []
},
{
'page': 'chem.md',
'functions': [
chem.numpy_to_rdkit,
chem.numpy_to_smiles,
chem.rdkit_to_smiles,
chem.sdf_to_nx,
chem.nx_to_sdf,
chem.validate_rdkit,
chem.get_atomic_symbol,
chem.get_atomic_num,
chem.valid_score,
chem.novel_score,
chem.unique_score,
chem.enable_rdkit_log,
chem.plot_rdkit,
chem.plot_rdkit_svg_grid
],
'methods': [],
'classes': []
},
{
'page': 'utils/data.md',
'classes': [
utils.data.Batch
],
'methods': [