Coder Social home page Coder Social logo

openfreeenergy / openfe Goto Github PK

View Code? Open in Web Editor NEW
122.0 8.0 14.0 37.04 MB

The Open Free Energy toolkit

Home Page: https://docs.openfree.energy

License: MIT License

Python 99.76% Dockerfile 0.11% Xonsh 0.02% Edge 0.02% Shell 0.09%
molecular-dynamics biophysics free-energy-calculations computational-chemistry free-energy

openfe's People

Contributors

davidslochower avatar dotsdl avatar dwhswenson avatar hannahbaumann avatar ialibay avatar jameseastwood avatar jenkescheen avatar mattwthompson avatar mikemhenry avatar richardjgowers avatar riesben avatar yoshanuikabundi 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  avatar  avatar  avatar

openfe's Issues

Implement AtomMapping container

Should be a read only simple data class holding enough information for mapping two sets of ints (atom indices) to each other...

class AtomMapping:
    AtoB : dict[int, int]
    BtoA : dict[int, int]

Add CLI skeleton

Create a basic CLI framework that can be used with subcommands.

Barebones setup

Please add as desired / tick off as sorted out

We need:

  • basic setup.py / setup.cfg / pyproject.toml
  • basic directory structure
  • license (thanks @richardjgowers !)
  • README.md
  • environment.yaml?
  • dummy workflow in .github folder? (just an action that tests nothing should be fine?)
  • pep8speaks?
  • coverage / codecov
  • linters? (linting will be kept local for now)
  • CONTRIBUTING

Implement radial graph network planner

ligands = [Chem.MolFromSomething(f) for f in files]
central_ligand = Chem.MolFromSomething()

n: Network = openfe.setup.generate_radial_network(ligands, hub=central_ligand,
                                          mappers=[openfe.setup.mappers.SimpleMapper()])

Migrate scoring functions from Lomap

Scorers from lomap.mcs.MCS to port:

  • mcsr
  • mncar
  • tmcsr
  • atomic_number_rule
  • hybridization_rule
  • sulfonamides_rule
  • heterocycles_rule
  • transmuting_methyl_into_ring_rule
  • transmuting_ring_sizes_rule
  • the matrix score, which is a product of all(?) of the above

Note, Lomap uses a score where 1.0 is "good"/viable and 0.0 is bad. We use weights where 0.0 is good and larger scores are less good. Can use 1 - lomap to get same effect?

only dependencies build

Should eventually have a build on the CI which is only required dependencies (i.e. no oechem, but things still work)

Which OS and python versions do we want to support?

I think we should follow NEP 29 when we can (I know a lot of upstream packages are slow on the 3.10 support) but it would be nice to not have to support anything older than python 3.8. I'd also like to avoid support windows if we can, and just focus on Linux and OSX support.

Add extra backends and reformat visualizations

As discussed with @dwhswenson the current visualization for atommappings fits our purpose but could probably be spruced up.

Potential things we should look into doing:

  • add a py3dmol backend so we can see atom mappings more easily
  • reformat the unique atoms / elements lists so they can be used by other backends
  • rename the d2d arguments as necessary

Add convenience methods to AtomMapping

So something that seems to be happening a lot with both drawing out mappings & using the mappings downstream is that we need to have access to:

  • mol2_to_mol1_map
  • mol1_unique_atoms (i.e. not in the map)
  • mol2_unique_atoms (i.e. not in the map)
  • atoms in the mapping that change elements

I'm opening this issue so we can consider potentially adding a couple of small methods to AtomMapping to make getting these out more easily.

User versioneer?

It would be a lot easier to just let versions be handled automatically, how do we feel about setting up versioneer?

Visualisation on deserialised edge throws error:

Sorry don't have time to get the full trace again, but this throws some index errors in the visualisation code paths:

# load a new network from this graphml representation
with open('network_store.graphml', 'r') as file:
    network_data = file.read()
    
new_network = Network.from_graphml(network_data)

# should trigger a display of the first edge
[edge for edge in new_network.edges][0]

Documentation setup

In discussions, we've agreed that we want a documentation setup that is mostly based on Jupyter notebooks, with some room for additional RST files and the ability to get good autodoc API generation. A lot of this can be seen in the documentation for Contact Map Explorer, source here. Most of the hard work is done by nbsphinx.

The tricky part: notebooks need to be in the sphinx docs/ directory

We need to get the notebooks into the right place in the docs tree, so that nbsphinx can find them. In contact_map, the notebooks are in the repository, and this is done by copying with shutil in the conf.py. However, we don't want to include the notebook repo with the main code.

In OpenPathSampling, I wrote a script to copy files into the sphinx docs directory from any of local file, GitHub repos, or GitLab repos. It is based on a YAML input file, and so requires pyyaml to be installed in the doc building environment. It also must be run as a script before building the docs.

Neither of these are perfect for us, but I think that together they can be pieced into a good solution. Ideally, our solution would:

  1. Copy the files over from another GitHub repo.
  2. Run when conf.py is run, instead of in a separate script.

Other things that might be useful

AtomMapping create/delete hydrogens

Current atom mappings are probably heavy atom only, create a method which creates a new AtomMapping with hydrogens included (and reverse route, drop hydrogens)

Implement AtomMapper abstract implementation

class AtomMapper:
    @abstractmethod
    def suggest_mapping(m1: Molecule, m2: Molecule) -> Iterable[AtomMapping]:
        # magic!

    @abstractmethod
    def score(m: AtomMapping) -> float:
        # optionally implement a scorer for the maps you create (caching possible?)
        return 0.0

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.