Skip to content

Commit

Permalink
Bump version to v0.8.9
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyxpp committed Jun 14, 2023
1 parent 9e286b1 commit e9e3218
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Polymer"
uuid = "3c6f16a5-7773-4db2-b4fd-b1ef4c83c671"
authors = ["liuyxpp <[email protected]>"]
version = "0.8.8"
version = "0.8.9"

[deps]
ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197"
Expand Down
36 changes: 25 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,18 @@ julia> homopolymer_chain() # A chain
julia> AB_A_system() # AB/A polymer blend
```

### Serialization and configurations

Based on Configurations.jl, we can serialize a `PolymerSystem` object to a `PolymerSystemConfig` object. Then the `PolymerSystemConfig` object can be saved to a YAML file.
### Properties

```julia
julia> config = to_config(AB_A_system())
julia> save_config("./AB_A.yml", config)
julia> abc = linear_ABC()
julia> Polymer.block_labels(abc) # get block labels
julia> ab_a = AB_A_system()
julia> Polymer.block_labels(:AB, ab_a) # get block labels of a specific component
```

We can load the `PolymerSystemConfig` object back from the YAML file. Then we can re-construct the `PolymerSystem` object from the `PolymerSystemConfig` object.

Available properties are listed below:
```julia
julia> config = load_config("./AB_A.yml", PolymerSystemConfig)
julia> AB_A = Polymer.make(config)
# or
julia> AB_A = PolymerSystem(config)
specie_object, specie_objects, isconfined, ischarged, χN, χNmap, χNmatrix, multicomponent, ncomponents, specie, species, nspecies, systemtype, component_number_type, specie_number_type, label, name, components, component, component_label, component_id, ϕs, ϕ, α, αs, molecules, molecule, molecule_label, molecule_id, molecule_labels, molecule_ids, isfreeblockend, block_ends, segment, nblocks, blocks, block_label, block_labels, block_id, block_ids, block_lengths, block_length, block_specie, block_bs, block_b, b, bs, getparam, ϕ̄
```

### Update/Modify a `PolymerSystem` object
Expand All @@ -85,6 +81,24 @@ julia> update!(system, 0.6, ϕA) # ϕAB will be updated accordingly due to the

For more details, consult the testing codes reside in `test` folder.

### Serialization and configurations

Based on Configurations.jl, we can serialize a `PolymerSystem` object to a `PolymerSystemConfig` object. Then the `PolymerSystemConfig` object can be saved to a YAML file.

```julia
julia> config = to_config(AB_A_system())
julia> save_config("./AB_A.yml", config)
```

We can load the `PolymerSystemConfig` object back from the YAML file. Then we can re-construct the `PolymerSystem` object from the `PolymerSystemConfig` object.

```julia
julia> config = load_config("./AB_A.yml", PolymerSystemConfig)
julia> AB_A = Polymer.make(config)
# or
julia> AB_A = PolymerSystem(config)
```

## Contribute

* Star the package on [github.com](https://github.com/liuyxpp/Polymer.jl).
Expand Down

2 comments on commit e9e3218

@liuyxpp
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/85577

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.8.9 -m "<description of version>" e9e32180cd285e50410efb97153ec7269ccb4695
git push origin v0.8.9

Please sign in to comment.