Closed InnocentBug closed 1 year ago
This might be related to #50
Ok, I figured it out.
But yes, the error message handling is a problem.
The error message exists (it is in value[i]
of base._generate_nested_nodes
), but it is not displayed to the user.
So a better error handling with message could improve this dramatically.
For anyone interested. Fixing the algorithm vocab was key here.
token = argv[0]
cript.API(host, token)
proj = cript.Project.get(name="Monomeric sidechain dipole orientation and its effect on microphase separation: experiment and simulation via structural isomer variation")
coll = cript.Collection.get(name="3-mer simulations")
try:
expt = cript.Experiment.get(name="testasdf")
except ValueError as e:
expt = cript.Experiment(collection=coll, name="testasdf")
expt.save()
try:
packmol = cript.Software.get(name = "Packmol", source = "http://m3g.iqm.unicamp.br/packmol", version = None)
except ValueError:
packmol = cript.Software(name = "Packmol", source = "http://m3g.iqm.unicamp.br/packmol", version = None, group=proj.group)
packmol.save()
alg = cript.Algorithm(key="DPD", type="initialization",parameters = [
cript.Parameter(key="update_frequency", value=50, unit="1/s")])
packmol_config = cript.SoftwareConfiguration(software = packmol )
packmol_config.add_algorithm(alg)
try:
init = cript.Computation.get(name="Test Comp")
except ValueError:
init = cript.Computation.create(experiment=expt, name="Test Comp", type="initialization")
init.save()
init.add_software_configuration(packmol_config)
init.save()
Adding a software with algorithms does not work.
This code:
Errors with:
Note, that not adding the algorithm with line:
The code works just fine.