Giter Site home page Giter Site logo

martini_polyply's People

Contributors

fgrunewald avatar jbarnoud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

martini_polyply's Issues

Error if no endgroups specified

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

Use latest OpenMM for MD functionalities

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.

Structure generation error?

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

Implement global constraints

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.

Have function specific formatting

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.

Missing Atoms when using the internal block-copolymer function

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.

Allow for custom connectors

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.

Construction of large DNA segments

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

Allow for CPP preprocessor variables

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.