fgrunewald / martini_polyply Goto Github PK
View Code? Open in Web Editor NEWTool for generating MARTINI Polymer itps and structures
License: GNU General Public License v3.0
Tool for generating MARTINI Polymer itps and structures
License: GNU General Public License v3.0
Hello,
Let me first say that this is a very cool project and I really appreciate you guys/gals for putting it together.
It does seem like there is a bug with the endgroups though. If I execute the example:
polyply -polymer PEO.martini.2 -name PEO -n_mon 10 -o PEO.itp
I get the following error:
Traceback (most recent call last):
File "/mnt/c/Users/dkozuch/Google Drive/Debenedetti Lab/miscellaneous/Martini_PolyPly/bin/polyply", line 83, in
main()
File "/mnt/c/Users/dkozuch/Google Drive/Debenedetti Lab/miscellaneous/Martini_PolyPly/bin/polyply", line 63, in main
itp_tool(itp_files, args.linkfile ,args.mon, args.outfile, args.name, args.endgroup)
File "/home/dkozuch/.local/lib/python3.6/site-packages/polyply/itp_tool/itp_I.py", line 280, in itp_tool
new_itp = terminate(new_itp, term_info[1], offset+1)
TypeError: 'NoneType' object is not subscriptable
This can be avoided if I comment out "new_itp = terminate(...)" on line 280 of itp_l.py
Best,
Dan
Hey, I recently stumbled upon this extremely helpful project. I was wondering whether it would be a large effort to include also the Martini polyelectrolytes: http://cgmartini.nl/index.php/polyelectrolytes. If necessary, I can offer my help in implementing this feature.
At the moment monomer itp files need to be supplied as direct paths to the -itp option. It would be much more useful to be able to reference them form the monomer directory without specifying the path.
Much of the generator tool is currently based on "home-cooked" MD functions. It would be more useful to use OpenMM for the evaluation of the energies and such things.
Hello,
Thanks for this, looks like a really useful tool for anyone using MARTINI with polymers. I'm trying to run through the examples to get a feel for how ti works and I'm running into the following.
When executing:
polyply -p topol.top -o out.gro -env vac -name PEO
with the latest MARTINI 2 version (martini_v2.2polIon), I'm getting:
+++++++++++++++++++++++++++++++++++++++++++++++++ reading force-field ++++++++++++++++++++++++++++++++++++++++++++++++++
Reading martini.itp
Reading PEO.itp
moleculetype
atoms
bonds
angles
finished reading force-field
0
++++++++++++++++++++++++++++++++++++++ starting monte carlo structure generation +++++++++++++++++++++++++++++++++++++++
0%| | 0/10 [00:00<?, ?it/s]Traceback (most recent call last):
File "/home/michelns/.local/lib/python3.6/site-packages/polyply/structure_tool/force_field_tools.py", line 307, in lookup_interaction_parameters
coef_A = ff[key][(atom_A, atom_B)]['epsilon']
KeyError: ('EO', 'EO')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/michelns/.local/bin/polyply", line 83, in
main()
File "/home/michelns/.local/bin/polyply", line 73, in main
build_system(top_options, env_options, mc_options, args.outfile, magic_numbers)
File "/home/michelns/.local/lib/python3.6/site-packages/polyply/structure_tool/mc_poly_growth.py", line 280, in build_system
traj = metropolis_monte_carlo(ff, name, start, temp, n_mon, max_steps, verbose, env_traj, [{'type':None}], None, 0, None, cut_off, eps, form, softness)
File "/home/michelns/.local/lib/python3.6/site-packages/polyply/structure_tool/mc_poly_growth.py", line 220, in metropolis_monte_carlo
total_E = Hamiltonion(ff, new_traj, dist_mat, verbose, eps, cut_off, form, softness)
File "/home/michelns/.local/lib/python3.6/site-packages/polyply/structure_tool/mc_poly_growth.py", line 88, in Hamiltonion
vdw, coulomb = nonbonded_potential(dist_mat, ff, softness, eps, form, display)
File "/home/michelns/.local/lib/python3.6/site-packages/polyply/structure_tool/force_field_tools.py", line 337, in nonbonded_potential
coef_A, coef_B, sigma = lookup_interaction_parameters(ff, atom_A, atom_B, form, 'nonbond_params')
File "/home/michelns/.local/lib/python3.6/site-packages/polyply/structure_tool/force_field_tools.py", line 310, in lookup_interaction_parameters
coef_A = ff[key][(atom_B, atom_A)]['epsilon']
KeyError: ('EO', 'EO')
Is that an issue with splitting the polymer name (PEO)?
Cheers,
Nick
To guide the structure generation or confine the polymer to a box, constraints can be used. An input flow has to be designed to feed an unlimited number of constraints to the structure generator.
At the moment all lines with ';' are removed from itp and topology files. It would be much better to exclude anything after but not the entire line per se.
At the moment the formatting of the itp file uses a generic format, which has as many terms as the largest function type requires. It would be nicer to have them customized which will involve using tuple based indexing of the main directory with type and function. Also it would be cool to have one comment line explaining the different columns of each type. Needless to say this also should then be specific.
When using the following comment:
polyply -polymer A B -n_mon x y -o out.itp -name polymer -endgroup ./endgroup.itp -links linker.itp
The last atom from polymer type B is missing. This is probably related to using only one endgroup. The rest seems not to be affected. However, this should not happen.
For the block-copolymer generation, at the moment essentially two topologies are merged but the atoms stay disconnected. It would however be better to have some default connectors and a custom input of connectors.
Hi!
I am trying to construct a poly A 4000 nt DNA segment, having a spherical constraint on as well.
It works for 400 nt, but I get problems with 1000 nt and up.
The main issues are box size and memory error.
First I get, that the box is not large enough, hence I naively increase the box, but then I get memory error.
When trying to construct the 1000 or 4000 nt with a spherical constraint using 10 nm in radius, I get the error: "OSError: Sampling the end-to-end distance distribution yielded end-to-end distances that are larger than the box diagonal. This will not work. Please increase the box to be at least 515.8467358001363 nm."
Now if I simply increase the box size, I get memory error "numpy.core._exceptions.MemoryError: Unable to allocate 349. GiB for an array with shape (3, 2500, 2500, 2500) and data type float64".
This is also the case with just 1000 nt. For 400 nt, it works fine.
Okay, fair, but I find it confusing, since I am applying the sphe0rical constraint, which is smaller than the box size.
Of course it can be, that my spherical restraint is too small as well with only 10 nm radius, but for now, this I can not even test. since the errors are the same not matter the spherical constraint. Increasing the radius of the spherical constraint, do not help either.
PolyA.zip
I have uploaded the files for the 4000 nt DNA string I am trying to built, along with the commands used.
Help would be appreciated! Maybe I am simply misunderstanding the building file for polyply.
Best Lisbeth
The offset for pairs is not working for the end-group. At the moment negative and zero values need to be used, which is confusing.
Some FFs like GROMOS use #define statements which declare a variable. This messes up the number of parameters expected by the program. A more generic input reader could solve this problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.