Git Product home page Git Product logo

aiida-mul's People

Contributors

dropd avatar

Watchers

 avatar  avatar  avatar  avatar

aiida-mul's Issues

add example data type and data command

  1. there should be an example data type (ideally used by the calculation)
  • subclass ParameterData, add some check, like allow only positive numbers or so
  1. there should be an example data command for the data type
  • following the existent verdi data commands

Example:

positive_nums.py:

class PositiveNumbers(ParameterData):
    ...
    # take in a dict but enforce all values to be positive numbers

positive_nums_cmd.py:

import click

@click.group()
def positive_numbers():
    """Help msg"""

@positive_numbers.command()
def list_('list'):
    """output a list of PositiveNumbers nodes"""

setup.json:

{
    "entry_points": {
        "console_scripts": [
            "aiida-mul-positive-numbers = aiida_mul.positive_nums_cmd:positive_numbers"
        ]
    },
    ...
}

entry_points not registered?

I've tried the following on a clean system (no AiiDA)

pip install -e .  #...
verdi quicksetup  #...
verdi calculation plugins
## Pass as a further parameter one (or more) plugin names to get more details on a given plugin.
* aseplugins.ase
* codtools.cifcellcontents
* codtools.cifcodcheck
* codtools.cifcoddeposit
* codtools.cifcodnumbers
* codtools.ciffilter
* codtools.cifsplitprimitive
* nwchem.basic
* nwchem.nwcpymatgen
* quantumespresso.cp
* quantumespresso.dos
* quantumespresso.matdyn
* quantumespresso.namelists
* quantumespresso.neb
* quantumespresso.ph
* quantumespresso.pp
* quantumespresso.projwfc
* quantumespresso.pw
* quantumespresso.pwimmigrant
* quantumespresso.q2r
* simpleplugins.templatereplacer

Shouldn't the plugin be registered automatically?
Also when I go in the verdi shell and try

from aiida.orm import CalculationFactory
calc = CalculationFactory("aiida_mul.mul")

I get a "missing plugin" error.

aiida-core distribution not found

After having installed the plugin, set up the code & computer, I still get an error when trying to submit a calculation:

  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/reentry/jsonbackend.py", line 174, in get_map
    raise ValueError("The {} distribution was not found.".format(dist))
ValueError: The aiida-core distribution was not found.

The error arises from the line

calc = code.new_calc()

in the submission script.

Full traceback below.

$ verdi run examples/cli.py aiida_mul localhost
Traceback (most recent call last):
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/bin/verdi", line 11, in <module>
    sys.exit(run())
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/aiida/cmdline/verdilib.py", line 1216, in run
    aiida.cmdline.verdilib.exec_from_cmdline(sys.argv)
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/aiida/cmdline/verdilib.py", line 1201, in exec_from_cmdline
    CommandClass.run(*argv[command_position + 1:])
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/aiida/cmdline/verdilib.py", line 1065, in run
    exec (f, globals_dict)
  File "examples/cli.py", line 54, in <module>
    main()
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "examples/cli.py", line 31, in main
    calc = code.new_calc()
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/aiida/orm/implementation/general/code.py", line 425, in new_calc
    C = CalculationFactory(plugin_name)
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/aiida/orm/utils.py", line 32, in CalculationFactory
    suffix="Calculation")
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/aiida/common/pluginloader.py", line 182, in BaseFactory
    return get_plugin(category, module)
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/aiida/common/pluginloader.py", line 124, in get_plugin
    plugin = entrypoint.load()
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/reentry/entrypoint.py", line 36, in load
    module = import_module(self.module_name)
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Users/leopold/Personal/Postdoc-MARVEL/Projects/2017-09-15_pawel_plugin/aiida-mul/aiida_mul/calcs.py", line 12, in <module>
    class MultiplyCalculation(JobCalculation):
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/aiida/orm/implementation/general/node.py", line 122, in __new__
    if entry_point_tpstr_from(classname):
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/aiida/common/pluginloader.py", line 245, in entry_point_tpstr_from
    mapping = get_class_to_entry_point_map(short_group_name=True).get(class_path)
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/aiida/common/pluginloader.py", line 217, in get_class_to_entry_point_map
    groups = (g for g in epm.get_entry_map('aiida-core').iterkeys() if g.startswith('aiida'))
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/reentry/manager.py", line 29, in get_entry_map
    return bkend.get_map(dist=distname, group=group)
  File "/Users/leopold/Applications/miniconda3/envs/aiida_pawel2/lib/python2.7/site-packages/reentry/jsonbackend.py", line 174, in get_map
    raise ValueError("The {} distribution was not found.".format(dist))
ValueError: The aiida-core distribution was not found.

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.