Git Product home page Git Product logo

molpher-lib's People

Contributors

filvaleriia avatar martin-sicho avatar skodapetr avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

molpher-lib's Issues

No Windows Build

looks great guys!

Windows build would be well appreciated!

For the time being I suggest to mention this in the docs in the install section (On windows the conda command will say the package is not available which at first is confusing).

How can I use other algorithms with Etree?

Again this library looks interesting. While playing around and reading tutorial I wasn't able to figure out how to run ExplorationTree with custom operations but using different than classic algorithm.

No module named '_core'

Hi,
I created new environment of conda and install molpher-lib via conda command.
But I got following error when I call the package from python.

ModuleNotFoundError: No module named '_core'

How can I fix the problem?
Any comments or advices are greatly appreciated.
Thanks,

Cryptic error raised when `max_iters` is specified in algorithm settings

When running the classic algorithm example code:

import os
import sys

from molpher.algorithms.classic.run import run
from molpher.algorithms.settings import Settings


def main(args):
    # our source and target molecules
    cocaine = 'CN1[C@H]2CC[C@@H]1[C@@H](C(=O)OC)[C@@H](OC(=O)c1ccccc1)C2'
    procaine = 'O=C(OCCN(CC)CC)c1ccc(N)cc1'

    # path to a directory where results will be stored (read from command line if possible)
    storage_dir = None
    if len(args) == 2:
        storage_dir = os.path.abspath(args[1])
    else:
        storage_dir = 'classic_data'

    # initialize the exploration settings
    settings = Settings(
        cocaine
        , procaine
        , storage_dir
        , max_threads=4
        , max_iters = 10
    )

    run(settings)

if __name__ == "__main__":
    exit(main(sys.argv))

the max_iters = 10 parameter is honored, but a confusing message is raised:

Error message:
Traceback (most recent call last):
  File "small.py", line 39, in <module>
    main(smiles[x],smiles[y], storage_dir='classical_data_'+start_id[x]+'_'+target_id[y]+'_run_'+str(runnum))
  File "small.py", line 32, in main
    run(settings)
  File "/home/isabel/anaconda2/envs/molpher_pseudo_random/lib/python3.6/site-packages/molpher-0.0.0b2-py3.6-linux-x86_64.egg/molpher/algorithms/classic/run.py", line 16, in run
    pathfinder()
  File "/home/isabel/anaconda2/envs/molpher_pseudo_random/lib/python3.6/site-packages/molpher-0.0.0b2-py3.6-linux-x86_64.egg/molpher/algorithms/pathfinders.py", line 46, in __call__
    self.path = find_path(self.tree, self.tree.params['target'])
  File "/home/isabel/anaconda2/envs/molpher_pseudo_random/lib/python3.6/site-packages/molpher-0.0.0b2-py3.6-linux-x86_64.egg/molpher/algorithms/functions.py", line 41, in find_path
    current = tree.fetchMol(end_mol)
  File "/home/isabel/anaconda2/envs/molpher_pseudo_random/lib/python3.6/site-packages/molpher-0.0.0b2-py3.6-linux-x86_64.egg/molpher/core/ExplorationTree.py", line 233, in fetchMol
    ret = super(ExplorationTree, self).fetchMol(canonSMILES)
  File "/home/isabel/anaconda2/envs/molpher_pseudo_random/lib/python3.6/site-packages/molpher-0.0.0b2-py3.6-linux-x86_64.egg/molpher/swig_wrappers/core.py", line 1918, in fetchMol
    return _core.ExplorationTree_fetchMol(self, canonSMILES)
RuntimeError: Molecule (COC1=CC=C(F)C=C1C(C)(C)CC(O)(CC1=CC=CC=C1)C(=O)NC1=CC=C2C(=O)OCC2=C1) is not present in the tree.

It should give a clear message about what went wrong.

Mac Build

Hello,

do we have any updates on a Mac release?

Many thanks

Add properties to MolpherMol and MolpherAtom

It would be nice if users had the option to store some data with the instances of MolpherMol and MolpherAtom (like it is possible in RDKit or other libraries). It could work like so:

mol = MolpherMol("CCO")
mol.setProp("Name", "ethanol")
for idx, atom in enumerate(mol.atoms):
    atom.setProp("AtomID", mol.getProp("Name") + "." + str(idx))

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.