A common interface to describe a polymer system.
Author liuyxpp
1 Star
Updated Last
1 Year Ago
Started In
August 2020

Polymer.jl Stable Dev Build Status Build Status Build Status Coverage

Polymer.jl defines a common interface to describe a polymer system.

Warning: Be aware that this package is currently under active development. The interface is highly unstable and subjects to change frequently.


julia> using Polymer

# Create A and B monomers.
julia> sA = KuhnSegment(:A)
julia> sB = KuhnSegment(:B)

# Create free end and branch point (joint)
julia> eA = FreeEnd(:A1)
julia> eAB = BranchPoint(:AB)
julia> eB = FreeEnd(:B1)

# Create A and B blocks
julia> A = PolymerBlock(:A, sA, 0.5, eA, eAB)
julia> B = PolymerBlock(:B, sB, 0.5, eB, eAB)

# Create a AB diblock copolymer chain
julia> chainAB = BlockCopolymer(:AB, [A,B])

# Create a homopolymer chain
julia> hA = PolymerBlock(:hA, sA, 1.0, FreeEnd(), FreeEnd())
julia> chainA = BlockCopolymer(:hA, [hA])

# Create components
julia> polymerAB = Component(chainAB; ϕ=0.5)
julia> polymerA = Component(chainA; ϕ=0.5)

# Create AB/A polymer blend system.
julia> AB_A = PolymerSystem([polymerAB, polymerA]; χN_map=Dict(Set([:A, :B])=>20.0))

Convenient functions are also provided to create common polymer chains and systems. For example, above AB chain, A chain, AB/A polymer blend system can be simply created by a single line of code.

julia> diblock_chain() # AB chain
julia> homopolymer_chain() # A chain
julia> AB_A_system() # AB/A polymer blend

One can also create a polymer system using a nested Dict, which can be written in the format of a YAML file.

julia> config = load_config("test/ABS.yml")
julia> ABS = make(config)

At present, there is no documentation. Consult the testing codes reside in test folder to learn more.



Used By Packages

No packages found.