Git Product home page Git Product logo

polyply_1.0's People

Contributors

csbrasnett avatar fgrunewald avatar jan-stevens avatar mbrosz avatar pckroon avatar ricalessandri avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

polyply_1.0's Issues

implement random polymers based on fractions

Currently the linear string sequence only takes integer monomer numbers per block. But there should be a way to generate a random sequence from fractions. Question is: Should we make a separate grapher tool or still implement this as interpretation of the string. I feel the separate tool would be the clearer option. Should be perhaps offload all the graphing work into a sperate tool and only read json files?

Gromacs function type 1 or 9 for the dihedrals in PEO?

Not sure if it's really an issue but I wondered this in other occasions myself and I figured I would bring it up here so we can discuss it and who knows can clear this out. It was my understanding that function type 1 for the periodic function for proper dihedrals in Gromacs allows only one multiplicity term. So that, if one wants to use a proper dihedral function composed by several multiplicity terms, one should use the function type 9 (see also the Table from the Gromacs manual with all the bonded terms). Now, is it so? If it is, the PEO model would need to use function type 9 for the dihedral (instead of 1 as shown below), wouldn't it?

[ dihedrals ]
 1  2  3  4 1 180.00 1.96 1
 1  2  3  4 1 0 0.18 2
 1  2  3  4 1 0 0.33 3
 1  2  3  4 1 0 0.12 4

but I am not sure I am understanding correctly the Gromacs manual, which talks about [ dihedraltypes ] too... (see first link).

Implement molmeta stuff

Currently all molmeta is ignored except for "explicit". But we need some form of molmeta integration to deal with ScFix of M3 proteins etc.

CHARMM structure generation not fully supported

Currently chirality for CHARMM and alike force-fields are not supported. The same is true for general structure generation. When the CHARMM molecule contains many competing dihedral terms minimization frequently fails, leading to poor structures being generated.

coordinate reading

position = molecules.nodes[total]["position"]

this line fails if vermouth detects more than one molecule in that case we get a list not a single molecule

also reading in complete molecules fails, because of the last_atom definition

also somehow assignment of coordinates to the meta-molecule fail for molecules probably with same resid?! This function needs a lot more testing.

Link's are applied in forward manner

Special bug: If a link for a bond is defined as shown below it will be applied only up to the nth-1 residue. That means molecules with only two residues will not have a link applied at all.

[link]
[bonds]
atom1  -atom2

The reason lies in this line of code:

sub_graphs, resids = gen_link_fragments(meta_molecule, orders, edge[0])

Here we tether the generation of the residues that correspond to the link to the 0th node key of an edge. Overall this means links need to be written in a 'forward' thinking manner, which is the case for most molecules. Either we fix this or this needs to be documented but I'll need to investigate a bit more how much this problem arises for angles and dihedrals.

fix sequence file reading in gen_itp

The try is too broad for this except. I suggest:

try:
    parser = getattr(MetaMolecule, 'from_{}'.format(extension))
except AttributeError as error:
    raise IOError(...) from error
else:
    meta_molecule = parser(...)

Also, the parser kwargs should probably not be named 'json_file'

Originally posted by @pckroon in #19

Generated GRO file doesn't open in VMD

I encounter the same issue as here (jbarnoud/cgbuilder#2) with the gro file generated by running a command like:

polyply gen_coords -p system.top -o P3HT_test.gro -name P3HT

So, as Jonathan did there, I think adding a "new line" command after the box dimensions on the last line of the gro file should fix the issue.

Isomorphism Check is basically useless

https://github.com/fgrunewald/polyply_1.0/blob/e3d0148de2ea4ce4bdd92404937a6eba5197212d/polyply/src/apply_links.py#L304-L318

This code actually (almost) always evaluates to true, because we already checked that all resids are part of the residue graph and a path is at most of length 4, we almost always find a fitting subgraph. Instead we should check that all nodes and edges are part of the meta-molecule graph or that the path is part of the graph.

@pckroon Do you know a nx function that would do this.

In a nutshell it should do:

for node in graph2.nodes:
        if not node in graph1.nodes:
           return False
for edge in graph2.edges:
        if not edge in graph1.edges:
           return False
return True

Issue installing polyply_1.0 in virtual environment

After creating a virtual environment I was able to download all of the requisite source code and install vermouth and tqdm. However, when trying to install polyply using setup.py I received this error message:

"ERROR: ./setup.py is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with svn+, git+, hg+, or bzr+)."

refactor library organization

Come up with some organization of the library to merge vermouth force-field with polyply input in a sensible fashion. Things to think about:

  • import rtps from gromacs libraries if GMXRC is sourced
  • organize by AA, CG or rather ff-files polyply etc.
  • add some form of licenses and citations to these files

Different Constructors for MetaMol

It should be possible to construct a MetaMolecule from anything that is in nx.readwrite and can set node attributes. We could make a meta-calls that basically collects the constructor classes. But this is not high priority at the moment.

clean code properly

Remove all things like pychache and files that are already in the .gitignore but still got into the repro.

Type dicts etc. in docstrings

If you want to typehint this completely (optional), you can do something like templates: dict[str, vermouth.molecule.Block], indicating its keys are strings and values are Blocks. You'll still need to tell the str is a resname.
And I'm not sure how much sphinx/autodoc/apidoc likes the not-4-spaces indent. But that we can fix later

Originally posted by @pckroon in #29

Check residues before building templates

Implement checking of residue isomorphism before generating the templates. All residues need to have a unique name and users u sally don't pay attention to this.

passing file-handle to all parsers

I suggest passing the file handle as argument, rahter than the filepath. That way reading e.g. compressed files or network streams becomes possible rather than painful

Originally posted by @pckroon in #29

Clean Tests

There are quite a few test_molecules and test_systems. Some of those can probably be imported form a single helper file and be the same system. This is some maintenance that should be done.

Ifdef staments

Don't include file if in ifdef statement and def not set

Top Parser Error

Martini topology files currently are not parsed correctly, because it now requires all parameters to be there.

Construction of Init. Coords. fails

Unless the bonds are ordered in the itp file our intial structure generation fails. This needs to be improved by using the graph properties and constructing by following the edges.

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.