polymerist.polymers.exceptions

Custom Exceptions specific to Polymers and related objects

Exceptions

InsufficientChainLength

Raised when the polymer molecule being built is too short

ExcessiveChainLength

Raised when the polymer molecule being built is too long

EndGroupDominatedChain

Raised to indicate there are more end groups present in a chain than are monomer possibly allowed

MorphologyError

Raised when a polymer does not have the morphology (i.e. crosslinking, molecular weight, etc) an application expects

EmptyBlockSequence

Raised when a trivial sequence of copolymer block (i.e. the empty string "") is provided when no expected

PartialBlockSequence

Raised when an non-whole number of copolymer blocks is needed to reach a target chain length (and is not allowed)

AlreadySolvated

Raised when attempting to add solvent to a molecule which already has solvent

ChargeMismatch

Raised when attempting to merge two objects which disagree on their charging status

MissingStructureData

Raised when a managed molecule has no associated structure file (e.g. PDB, SDF, etc.)

MissingMonomerData

Raised when no monomer fragment information is found for a Polymer

Module Contents

exception polymerist.polymers.exceptions.InsufficientChainLength[source]

Bases: Exception

Raised when the polymer molecule being built is too short

exception polymerist.polymers.exceptions.ExcessiveChainLength[source]

Bases: Exception

Raised when the polymer molecule being built is too long

exception polymerist.polymers.exceptions.EndGroupDominatedChain[source]

Bases: Exception

Raised to indicate there are more end groups present in a chain than are monomer possibly allowed

exception polymerist.polymers.exceptions.MorphologyError[source]

Bases: Exception

Raised when a polymer does not have the morphology (i.e. crosslinking, molecular weight, etc) an application expects

exception polymerist.polymers.exceptions.EmptyBlockSequence[source]

Bases: Exception

Raised when a trivial sequence of copolymer block (i.e. the empty string “”) is provided when no expected

exception polymerist.polymers.exceptions.PartialBlockSequence[source]

Bases: Exception

Raised when an non-whole number of copolymer blocks is needed to reach a target chain length (and is not allowed)

exception polymerist.polymers.exceptions.AlreadySolvated[source]

Bases: Exception

Raised when attempting to add solvent to a molecule which already has solvent

exception polymerist.polymers.exceptions.ChargeMismatch[source]

Bases: Exception

Raised when attempting to merge two objects which disagree on their charging status

exception polymerist.polymers.exceptions.MissingStructureData[source]

Bases: Exception

Raised when a managed molecule has no associated structure file (e.g. PDB, SDF, etc.)

exception polymerist.polymers.exceptions.MissingMonomerData[source]

Bases: Exception

Raised when no monomer fragment information is found for a Polymer