dropd / aiida-mul Goto Github PK
View Code? Open in Web Editor NEWtoy new-system plugin for aiida >= 0.8 that can run locally.
toy new-system plugin for aiida >= 0.8 that can run locally.
Once the template plugin is ready,
the "usage" section of the README.md can be moved to the aiida documentation
verdi data
commandsExample:
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"
]
},
...
}
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.