semvec/pypi-packages huggingface dataset:
cyclicpeptide 1.4.2
A python package for cyclic peptides drug design
License: MIT
Requires Python: >=3.8


# Project Name

cyclicpeptide is a Python package developed based on RDKit and NetworkX, specifically designed for the analysis and processing of cyclic peptide molecules. It includes tools such as Structure2Sequence, Sequence2Structure, GraphAlignment, PropertyAnalysis, StructureTransformer and SequenceTransformer (for format transformation), and SequenceGeneration. This package is open-source (https://github.com/dfwlab/cyclicpeptide) and provides detailed documentation (https://dfwlab.github.io/cyclicpeptide/) to support users in effectively utilizing tools.

## Installation

To install the project, you can use pip:

    pip install cyclicpeptide

## Usage

Here's how you can use the project in your Python code:

from cyclicpeptide import module

**module**: PropertieyAnalyis/Sequence2Structure/Structure2Sequence/GraphAlignment/SequenceTransformer/SequenceTransformer/IOManager

```python
# Example code
from cyclicpeptide import PropertieyAnalyis as PA

exmaple = [('Ctopa(CP00005)',
            'CC(C1C(=O)NC(C(SSCC(C(=O)NC(C(=O)NC(C(=O)NC(C(=O)N1)CCCN)CC2=CNC3=CC=CC=C32)CC4=CC=C(C=C4)O)NC(=O)C(CC5=CC=CC=C5)N)(C)C)C(=O)NC(C(C)O)C(=O)N)O',
            'FCYWATCT'),
           ('alpha-Amanitine(CP01656)',
            'CC[C@H](C)[C@H]1C(=O)NCC(=O)N[C@H]2C[S@@](=O)C3=C(C[C@@H](C(=O)NCC(=O)N1)NC(=O)[C@@H](NC(=O)[C@@H]4C[C@H](CN4C(=O)[C@@H](NC2=O)CC(=O)N)O)[C@@H](C)[C@H](CO)O)C5=C(N3)C=C(C=C5)O',
            'ATPTTT'),
           ('Anidulafungin(CP00145)',
            'CCCCCOC1=CC=C(C=C1)C2=CC=C(C=C2)C3=CC=C(C=C3)C(=O)NC4CC(C(NC(=O)C5C(C(CN5C(=O)C(NC(=O)C(NC(=O)C6CC(CN6C(=O)C(NC4=O)C(C)O)O)C(C(C7=CC=C(C=C7)O)O)O)C(C)O)C)O)O)O',
            'AA')]

smiles = exmaple[0][1]
sequence = exmaple[0][2]
print(PA.chemial_physical_properties_from_smiles(smiles))
```
## Contributing
If you would like to contribute to the project, please follow these steps:

    1.Fork the repository
    2.Create a new branch (git checkout -b feature)
    3.Make your changes
    4.Commit your changes (git commit -am 'Add new feature')
    5.Push to the branch (git push origin feature)
    6.Create a new Pull Request

## License
This project is licensed under the MIT License - see the LICENSE.md file for details.

## Contact
If you have any questions or concerns, feel free to contact me at dfw_bioinfo@126.com.
a3json-struct 0.3.0
a3json-struct can describe JSON structs using class-based syntax.
License: MIT
Requires Python: >=3.10

# a3json-struct

English | [简体中文](README_ZH.md)

* `a3json-struct` can describe JSON structs using class-based syntax.

## 1. Introduction

* [Support multiple data type fields](a3json_struct/fields)
* Custom format validators
* Class instances can be exported as JSON, BSON
* The OpenAPI schema can be exported
* The attributes of a class can be exported as a JSON description, and the class can be restored from the JSON description

## 2. Usage

### Install

```shell
pip install a3json-struct

```

## Examples

```python
from datetime import datetime
from a3json_struct import struct


class Comment(struct.JsonStruct):
    content = struct.CharField()
    post_time = struct.DateTimeField()


class Video(struct.JsonStruct):
    id = struct.IntegerField(verbose_name='video id')
    url = struct.CharField()
    title = struct.CharField(min_length=5, max_length=30)
    description = struct.CharField()
    score = struct.DecimalField()
    view_count = struct.IntegerField(default=0)
    tag_list = struct.ListField(element_field=struct.CharField(min_length=2, max_length=8), required=False)
    comment_list = struct.ListField(element_field=struct.ObjectField(obj_kls=Comment))


if __name__ == '__main__':
    comment = Comment()
    comment.content = "content"
    comment.post_time = "2023-09-10 20:32"

    video = Video()
    video.id = 12345
    video.url = "https://xxx.xxx/12345.mp4"
    video.title = "video title"
    video.description = "video description"
    video.score = '2.3'
    video.comment_list = [
        comment,  # It can be an object instance
        {"content": "content", "post_time": datetime.now()}  # or a dictionary
    ]

    video.full_clean()  # Validate data (this step can be omitted if using to_json or to_bson)
    assert isinstance(video.to_json()["comment_list"][0]["post_time"], str)
    assert isinstance(video.to_bson()["comment_list"][0]["post_time"], datetime)

    openapi_schema = Video.generate_openapi_schema()
    print(openapi_schema)

    meta_schema = Video.generate_meta_schema()
    RestoredVideo = struct.JsonStruct.build_variant_from_meta_schema(meta_schema, "RestoredVideo")
    assert RestoredVideo.generate_meta_schema() == meta_schema

```