ligning.characterization¶
Charaterization funcions
- class ligning.characterization.Characterize(P: Polymer)¶
polymer characterization object
- cal_all(cal_MW=False, print_flag=True)¶
Main count function
- cal_branching() float¶
calculate the branching coefficient
- Returns
branching_coeff – the branching coefficient: ratio of branched monomers to total monomers
- Return type
- count_OH() float¶
count the number of available -OH3 group
- Returns
OH_count – -OH counts
- Return type
- count_connections() dict¶
Count the number of connections of each monomer
- Returns
connections_count – the number of connections
- Return type
- count_linkages() dict¶
count the type of linkages
- Returns
linkages_count – the linkage type counts
- Return type
- count_monomers() int¶
count the total number of monomers, i.e. the polymer size
- Returns
monomer_count – the polymer size
- Return type
- count_types() dict¶
count the monomer types
- Returns
mtype_count – the monomer type counts
- Return type
- class ligning.characterization.CharacterizeGraph(G: nxgraph)¶
polymer charaterization object
- cal_all(cal_MW=False, print_flag=True)¶
Main count function
- cal_metrics(cal_MW: Optional[bool] = False) nparray¶
calculate the 10 by 1 metrics array
- Returns
metrics – metrics array
- Return type
nparray
- count_OH() float¶
count the number of available -OH3 group
- Returns
OH_count – -OH counts
- Return type
- count_linkages() dict¶
count the type of linkages
- Returns
linkages_count – the linkage type counts
- Return type
- class ligning.characterization.Population(population: List[Polymer], name: Optional[str] = 'lignin_x', InputPath: Optional[str] = '/home/docs/checkouts/readthedocs.org/user_builds/ligningraphs/checkouts/latest/docs/source', ResultsName: Optional[str] = 'results', TrialIndex: Optional[str] = None)¶
Characterize a population of polymers
- analyze()¶
Analyze the population Output the data and stats both in csv files
- characterize_all()¶
Characterize each individual polymer
- ligning.characterization.get_counts_polymer(P: Polymer, additional: Optional[bool] = False, cal_MW: Optional[bool] = False) Tuple[nparray, int, float]¶
Get the counts array for a polymer
- Parameters
- Returns
counts_P (nparray) – the counts array
monomer_count (int) – the number of monomers
MW (float) – the molecular weight
- ligning.characterization.get_metrics_polymer(P: Polymer, additional: Optional[bool] = False, cal_MW: Optional[bool] = False) Tuple[nparray, int, float]¶
Get the metrics and count for a polymer
- Parameters
- Returns
metrics_P (nparray) – the metrics array
monomer_count (int) – the number of monomers
MW (float) – the molecular weight