Pattern IDs [1]
This modifier assigns unit/fragment IDs to user-defined patterns in the molecular graph.
The patterns are matched along backbone paths and written as an XYZ-style output with an extra FragmentID column.
Command line
-p--patternFile-pID-file--patternID-filePattern file format
The pattern file is a plain text file with one or two non-empty lines:
Line 1: A Python-style list of lists describing patterns, e.g.:
[["O_CC", "C_CO", "C_CO"], ["C_CC", "C_CC"]]
Line 2 (optional): A start atom element symbol used to anchor the backbone search.
The pattern file must provide the patterns of the constituent monomer units. Element-type strings are describing each atom in the repeating unit by its element and the elements of its covalently bonded neighbors, in alphabetic order (excluding terminal atoms).
Example pattern file content:
Structure |
Possible monomer pattern |
|---|---|
Polyethylene |
|
Polystyrene |
|
Polyethylene glycol |
|
Polypropylene |
|
Polyacrylic acid |
|
Nylon 66 |
|
Nylon 6 |
|
Nylon 46 |
|
Nylon 11 |
|
Nylon 12 |
|
Example
MakroLyzer -xyz polymer.xyz -p patterns.txt -pID-file patternIDs.csv
Output
The output is an XYZ-style file with a fragment ID per atom:
Header:
element x y z FragmentIDAtoms not matched to any pattern are assigned
FragmentID = -1.