How to use
The concat-assembly-lists
subcommand is used to concatenate assembly lists.
The assemblies in the input files are concatenated and reindexed.
The command will check for isomorphism between assemblies, and isomorphic assemblies will be merged (unless the --skip-isomorphism-checks
option is used).
Syntax
Info
If this raises an error command not found
, you may need to use python -m nasap_net
or python3 -m nasap_net
instead of nasapnet
.
Positional Arguments
ASSEMBLIES
: Paths to input files of assemblies. Multiple paths can be provided.COMPONENT_KINDS
: Path to input file of component kinds.OUTPUT
: Path to output file.
Options
--already-unique-within-files
,-u
: Whether the assemblies in each file are already unique. If used, the isomorphism checks are skipped for the assemblies within each file.--skip-isomorphism-checks
,-i
: Skip isomorphism checks for the assemblies. If used, the isomorphism checks are skipped for all assemblies. The resulting assembly list may contain isomorphic assemblies.--start
,-s
: Starting index for the reindexing of the assemblies.--overwrite
,-o
: Overwrite output file if it exists.--verbose
,-v
: Print verbose output.--help
: Show this message and exit.
Example
Directory structure before running the command:
Command:
Directory structure after running the command:
Input and output files are as follows:
Input File
Input File
assemblies2.yaml
0: !Assembly # MLX
bonds:
- [L1.a, M1.b]
- [M1.a, X0.a]
comp_id_to_kind: {L1: L, M1: M, X0: X}
1: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [M1.a, X0.a]
- [M2.b, X1.a]
comp_id_to_kind: {L1: L, M1: M, M2: M, X0: X, X1: X}
2: !Assembly
bonds:
- [L1.a, M1.b]
- [L4.b, M1.a]
comp_id_to_kind: {L1: L, L4: L, M1: M}
3: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [M1.a, X0.a]
comp_id_to_kind: {L1: L, L2: L, M1: M, M2: M, X0: X}
4: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L2.b, M3.a]
- [M1.a, X0.a]
- [M3.b, X1.a]
comp_id_to_kind: {L1: L, L2: L, M1: M, M2: M, M3: M, X0: X, X1: X}
5: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L4.b, M1.a]
comp_id_to_kind: {L1: L, L2: L, L4: L, M1: M, M2: M}
6: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L2.b, M3.a]
- [L3.a, M3.b]
- [M1.a, X0.a]
comp_id_to_kind: {L1: L, L2: L, L3: L, M1: M, M2: M, M3: M, X0: X}
7: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L2.b, M3.a]
- [L3.a, M3.b]
- [L3.b, M4.a]
- [M1.a, X0.a]
- [M4.b, X1.a]
comp_id_to_kind: {L1: L, L2: L, L3: L, M1: M, M2: M, M3: M, M4: M, X0: X, X1: X}
8: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L2.b, M3.a]
- [L3.a, M3.b]
- [L4.b, M1.a]
comp_id_to_kind: {L1: L, L2: L, L3: L, L4: L, M1: M, M2: M, M3: M}
9: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L2.b, M3.a]
- [L3.a, M3.b]
- [L3.b, M4.a]
- [L4.a, M4.b]
- [M1.a, X0.a]
comp_id_to_kind: {L1: L, L2: L, L3: L, L4: L, M1: M, M2: M, M3: M, M4: M, X0: X}
10: !Assembly # M4L4 square
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L2.b, M3.a]
- [L3.a, M3.b]
- [L3.b, M4.a]
- [L4.a, M4.b]
- [L4.b, M1.a]
comp_id_to_kind: {L1: L, L2: L, L3: L, L4: L, M1: M, M2: M, M3: M, M4: M}
Output File
output.yaml
0: !Assembly
bonds:
- [M1.a, X1.a]
- [M1.b, X2.a]
comp_id_to_kind: {M1: M, X1: X, X2: X}
1: !Assembly
comp_id_to_kind: {L1: L}
2: !Assembly
comp_id_to_kind: {X1: X}
3: !Assembly
bonds:
- [L1.a, M1.b]
- [M1.a, X0.a]
comp_id_to_kind: {L1: L, M1: M, X0: X}
4: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [M1.a, X0.a]
- [M2.b, X1.a]
comp_id_to_kind: {L1: L, M1: M, M2: M, X0: X, X1: X}
5: !Assembly
bonds:
- [L1.a, M1.b]
- [L4.b, M1.a]
comp_id_to_kind: {L1: L, L4: L, M1: M}
6: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [M1.a, X0.a]
comp_id_to_kind: {L1: L, L2: L, M1: M, M2: M, X0: X}
7: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L2.b, M3.a]
- [M1.a, X0.a]
- [M3.b, X1.a]
comp_id_to_kind: {L1: L, L2: L, M1: M, M2: M, M3: M, X0: X, X1: X}
8: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L4.b, M1.a]
comp_id_to_kind: {L1: L, L2: L, L4: L, M1: M, M2: M}
9: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L2.b, M3.a]
- [L3.a, M3.b]
- [M1.a, X0.a]
comp_id_to_kind: {L1: L, L2: L, L3: L, M1: M, M2: M, M3: M, X0: X}
10: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L2.b, M3.a]
- [L3.a, M3.b]
- [L3.b, M4.a]
- [M1.a, X0.a]
- [M4.b, X1.a]
comp_id_to_kind: {L1: L, L2: L, L3: L, M1: M, M2: M, M3: M, M4: M, X0: X, X1: X}
11: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L2.b, M3.a]
- [L3.a, M3.b]
- [L4.b, M1.a]
comp_id_to_kind: {L1: L, L2: L, L3: L, L4: L, M1: M, M2: M, M3: M}
12: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L2.b, M3.a]
- [L3.a, M3.b]
- [L3.b, M4.a]
- [L4.a, M4.b]
- [M1.a, X0.a]
comp_id_to_kind: {L1: L, L2: L, L3: L, L4: L, M1: M, M2: M, M3: M, M4: M, X0: X}
13: !Assembly
bonds:
- [L1.a, M1.b]
- [L1.b, M2.a]
- [L2.a, M2.b]
- [L2.b, M3.a]
- [L3.a, M3.b]
- [L3.b, M4.a]
- [L4.a, M4.b]
- [L4.b, M1.a]
comp_id_to_kind: {L1: L, L2: L, L3: L, L4: L, M1: M, M2: M, M3: M, M4: M}