Skip to content

Commit d1c355d

Browse files
author
Xiao Wang
committed
2 parents 2506d41 + a16282b commit d1c355d

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,21 @@ For technical problems or questions, please reach to Xiao Wang (wang3702@purdue.
2020

2121
## Citation:
2222

23-
Xiao Wang, Han Zhu, Genki Terashi & Daisuke Kihara. Protein Complex Structure Modeling with Diffusion Model and AlphaFold in cryo-EM maps.bioArxiv, 2023.
23+
Xiao Wang, Han Zhu, Genki Terashi & Daisuke Kihara. DiffModeler: Large Macromolecular Structure Modeling for Cryo-EM Maps Using Diffusion Model. Nature Methods, accepted 2024.<br>
24+
Early Version available at [bioRxiv](https://www.biorxiv.org/content/10.1101/2024.01.20.576370v2)
2425
```
2526
@article{wang2023DiffModeler,
26-
title={Protein Complex Structure Modeling with Diffusion Model and AlphaFold in cryo-EM maps},
27-
author={Xiao Wang, Han Zhu, Genki Terashi, and Daisuke Kihara},
28-
journal={bioArxiv},
29-
year={2023}
27+
title={DiffModeler: Large Macromolecular Structure Modeling for Cryo-EM Maps Using Diffusion Model},
28+
author={Xiao Wang, Han Zhu, Genki Terashi, Manav Taluja, and Daisuke Kihara},
29+
journal={Nature Methods},
30+
year={2024}
3031
}
3132
```
3233

3334
## Free Online Server:
3435
### Input map+single-chain structures: https://em.kiharalab.org/algorithm/DiffModeler
3536
### Input map+sequence: https://em.kiharalab.org/algorithm/DiffModeler(seq)
37+
### Protein+DNA Complex structure modeling: https://em.kiharalab.org/algorithm/ComplexModeler
3638

3739
## Introduction
3840

data_processing/Unify_Map.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def Unify_Map(input_map_path, new_map_path):
1313
nstart = np.asarray([mrc.header.nxstart, mrc.header.nystart, mrc.header.nzstart], dtype=np.float32)
1414
cella = np.array(mrc.header.cella.tolist(), dtype=np.float32)
1515
mapcrs = np.asarray([mrc.header.mapc, mrc.header.mapr, mrc.header.maps], dtype=int)
16+
msample = np.asarray([mrc.header.mx, mrc.header.my, mrc.header.mz], dtype=int)
1617
# if np.sum(nstart) == 0:
1718
# return input_map_path
1819
mrc.print_header()
@@ -26,13 +27,14 @@ def Unify_Map(input_map_path, new_map_path):
2627
data = np.transpose(data, axes=2 - sort[::-1])
2728

2829
# Move offsets from nstart to origin if origin is zero (MRC2000)
29-
if np.sum(origin) == 0:
30+
if np.all(origin == 0):
3031
origin = origin + nstart * voxel_size
3132

3233
# Save the unified map
3334
mrc_new = mrcfile.new(new_map_path, data=data, overwrite=True)
3435
(mrc_new.header.origin.x, mrc_new.header.origin.y, mrc_new.header.origin.z) = origin
3536
(mrc_new.header.cella.x, mrc_new.header.cella.y, mrc_new.header.cella.z) = cella
37+
(mrc_new.header.mx, mrc_new.header.my, mrc_new.header.mz) = msample
3638
mrc_new.update_header_stats()
3739
mrc_new.print_header()
3840
mrc_new.close()

ops/pdb2vol.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ def mapGridPosition(origin, voxel_size, box_size, atom_coord):
183183
y_pos = (atom_coord[1] - origin[1]) / voxel_size[1]
184184
z_pos = (atom_coord[2] - origin[2]) / voxel_size[2]
185185

186-
if (box_size[2] > x_pos >= 0) and (box_size[1] > y_pos >= 0) and (box_size[0] > z_pos >= 0):
186+
if (box_size[2] > x_pos + 1 >= 0) and (box_size[1] > y_pos + 1 >= 0) and (box_size[0] > z_pos + 1 >= 0):
187187
return x_pos, y_pos, z_pos
188188
else:
189-
return 0, 0, 0
189+
return 0.0, 0.0, 0.0
190190

191191

192192
@njit(fastmath=True, nogil=True)
@@ -207,7 +207,7 @@ def make_atom_overlay_map(origin, voxel_size, box_size, atom_list, atom_type_lis
207207
map_data = np.zeros(box_size)
208208
for atom, atom_type in zip(atom_list, atom_type_list):
209209
pos = mapGridPosition(origin, voxel_size, box_size, atom)
210-
if pos:
210+
if not (pos[0] == pos[1] == pos[2] == 0.0):
211211
atom_mass = atom_mass_dict.get(atom_type, 0.0)
212212
pos_x_0 = int(np.floor(pos[0]))
213213
pos_y_0 = int(np.floor(pos[1]))

0 commit comments

Comments
 (0)