Skip to content

Commit

Permalink
Merge pull request #331 from marrink-lab/idp-new
Browse files Browse the repository at this point in the history
fix issue 285
  • Loading branch information
fgrunewald authored Apr 22, 2024
2 parents 9690866 + bf0a8c7 commit abd3e25
Show file tree
Hide file tree
Showing 10 changed files with 5,801 additions and 3,290 deletions.
262 changes: 228 additions & 34 deletions polyply/data/martini3/aminoacids.ff

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions polyply/data/martini3/citations.bib
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@ @article{M3_PDMS
year={2022},
publisher={Royal Society of Chemistry}
}

@article{M3_GO,
title={GōMartini 3: From large conformational changes in proteins to environmental bias corrections},
author={Souza, Paulo C. T. and Araujo, Luis P. Borges and Brasnett, Chris and Moreira, Rodrigo A. and Grunewald, Fabian and Park, Peter and Wang, Liguo and Razmazma, Hafez and Borges-Araujo, Ana C. and Cofas-Vargas, Luis F. and Monticelli, Luca and Mera-Adasme, Raul and Melo, Manuel N. and Wu, Sangwook and Marrink, Siewert J. and Poma, Adolfo B. and Thallmair, Sebastian},
url={https://www.biorxiv.org/content/10.1101/2024.04.15.589479v1},
doi={10.1101/2024.04.15.589479},
year={2024},
}
12 changes: 8 additions & 4 deletions polyply/src/generate_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,19 +174,23 @@ def compute_volume(block, coords, nonbond_params, treshold=1e-18):
res_center_of_geometry = center_of_geometry(points)
geom_vects = np.zeros((n_atoms, 3))
idx = 0

radii = []
for node, coord in coords.items():
atom_key = block.nodes[node]["atype"]
rad = float(nonbond_params[frozenset([atom_key, atom_key])]["nb1"])
diff = coord - res_center_of_geometry
if np.linalg.norm(diff) > treshold:
geom_vects[idx, :] = diff + u_vect(diff) * rad
idx += 1

if geom_vects.shape[0] > 1:
else:
radii.append(rad)
# make sure geom_vects is not just an array of zeros
# this can happen when multiple beads are stacked for
# example
if np.any(geom_vects):
radgyr = radius_of_gyration(geom_vects)
else:
radgyr = rad
radgyr = max(radii)

return radgyr

Expand Down
3 changes: 2 additions & 1 deletion polyply/src/minimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ def target_function(positions):
energy += new
return energy

opt_results = scipy.optimize.minimize(target_function, positions, method='L-BFGS-B',
opt_results = scipy.optimize.minimize(target_function, positions,
method='L-BFGS-B',
options={'ftol': 0.001, 'maxiter': 100})

# evaluate if optimization was successful
Expand Down
2 changes: 2 additions & 0 deletions polyply/tests/test_data/library_tests/martini3/PROT/PNt.fasta
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
> PNt PROTEIN
DWNNQSIVKTGERQHGIHIQGSDPGGVRTASGTTIKVSGRQAQGILLENPAAELQFRNGSVTSSGQLSDDGIRRFLGTVTVKAGKLVADHATLANVGDTWDDDGIALYVAGEQAQASIADSTLQGAGGVQIERGANVTVQRSAIVDGGLHIGALQSLQPEDLPPSRVVLRDTNVTAVPASGAPAAVSVLGASELTLDGGHITGGRAAGVAAMQGAVVHLQRATIRRGDALAGGAVPGGAVPGGAVPGGFGPGGFGPVLDGWYGVDVSGSSVELAQSIVEAPELGAAIRVGRGARVTVPGGSLSAPHGNVIETGGARRFAPQAAPLSITLQAGAH
Loading

0 comments on commit abd3e25

Please sign in to comment.