diff --git a/emmet-cli/emmet/cli/tasks.py b/emmet-cli/emmet/cli/tasks.py index 092da06345..49d5672301 100644 --- a/emmet-cli/emmet/cli/tasks.py +++ b/emmet-cli/emmet/cli/tasks.py @@ -338,7 +338,9 @@ def restore(inputfile, file_filter): show_default=True, help="Number of processes for parallel parsing.", ) -def parse(task_ids, nproc): +@click.option("--parse-chgcar", is_flag=True, help="Parse CHGCAR.") +@click.option("--parse-aeccar", is_flag=True, help="Parse AECCAR.") +def parse(task_ids, nproc, parse_chgcar, parse_aeccar): """Parse VASP launchers into tasks""" ctx = click.get_current_context() if "CLIENT" not in ctx.obj: diff --git a/emmet-cli/emmet/cli/utils.py b/emmet-cli/emmet/cli/utils.py index dc1d150180..a30812b7dd 100644 --- a/emmet-cli/emmet/cli/utils.py +++ b/emmet-cli/emmet/cli/utils.py @@ -330,7 +330,6 @@ def parse_vasp_dirs(vaspdirs, tag, task_ids): chunk_idx = int(name.rsplit("-")[1]) - 1 logger.info(f"{name} starting.") tags = [tag, SETTINGS.year_tags[-1]] - drone = VaspDrone(parse_dos="auto", additional_fields={"tags": tags}) ctx = click.get_current_context() spec_or_dbfile = ctx.parent.parent.params["spec_or_dbfile"] target = calcdb_from_mgrant(spec_or_dbfile) @@ -340,6 +339,13 @@ def parse_vasp_dirs(vaspdirs, tag, task_ids): run = ctx.parent.parent.params["run"] projection = {"tags": 1, "task_id": 1} count = 0 + kwargs = {} + + for p in ["chgcar", "aeccar"]: + par = f"parse_{p}" + kwargs[par] = ctx.params[par] + + drone = VaspDrone(additional_fields={"tags": tags}, **kwargs) for vaspdir in vaspdirs: logger.info(f"{name} VaspDir: {vaspdir}")