tagPolymerMolecules

tagPolymerMolecules(configuration, minimum_size=0)

Add tags for polymer molecules to a configuration. Molecules above the minimum size will be labeled with the tag “POLYMER_MOLECULE_#” where “#” is an index starting from 0. Molecules below the minimum size are labeled with tag “INCLUDED_MOLECULE_#” where # is again an index starting from 0. Structures that are periodic in any dimension are not tagged.

Parameters:
  • configuration (BulkConfiguration) – The configuration the tags are being added to.

  • minimum_size (int) – The minimum size of what can be considered a polymer molecule.
    Default: 0

Usage Examples

Add tags to a bulk configuration containing polypropylene polymer chains and carbon dioxide molecules to identify the polymers and molecules in the configuration.


# Load the initial configuration
configuration = nlread('Polypropylene_CO2.hdf5')[-1]

# Count the number of tags currently on the configuration
number_of_tags = len(configuration.tags())
print(f'There are currently {number_of_tags} on the configuration')

# Set polymer tags on the configuration, setting the minimum size to exclude CO2 molecules
tagPolymerMolecules(configuration, minimum_size=4)

# Print out the tags and the atoms included in each one
tag_list = sorted(configuration.tags())
for tag in tag_list:
    indices = configuration.indicesFromTags(tag)
    print(tag)
    print(indices)

# Save the tagged configuration
nlsave('Polypropylene_CO2_tagged.hdf5', configuration)

tagPolymerMolecules_Example.py Polypropylene_CO2.hdf5

Notes

When analyzing polymer melt structures, identifying the polymer chains and other components of the system becomes increasingly difficult as the size of the system grows. The tagPolymerMolecules function assists in this by automatically adding tags identifying the different molecular components of a configuration. This is done by analyzing the bonding graph and taking each unconnected subgraph to be a different molecule. Components that have periodicity in any direction, such as a surface are not tagged by this function. A size criteria can also be added to distinguish polymer chains from other molecular components. This is controlled by the parameter minimum_size. Molecules with fewer atoms than this size are deemed to be molecules rather than polymer chains. By default this is set to zero, meaning that all molecules are considered to be polymer chains.

On identifying polymers and molecules the tag POLYMER_MOLECULE_# is placed on each chain, where # is an index starting from 0. Likewise the tag INCLUDED_MOLECULE_# is placed on molecules. The polymer tag is the default tag recognized by polymer analysis functions for identifying polymer chains in a configuration.