lib3dmol

Crates.iolib3dmol
lib.rslib3dmol
version0.4.0
sourcesrc
created_at2020-02-24 13:59:28.905573
updated_at2021-10-14 15:32:53.225622
descriptionLib3dmol is a library written in rust to read, manipulate, select atoms in protein structure files
homepage
repositoryhttps://gitlab.inria.fr/capsid.crates/lib3dmol
max_upload_size
id212022
size115,650
Philippe (PhilippeNoel1)

documentation

README

Lib3dmol

Crates.io Crates.io

Lib3dmol is a library written in rust to read and select atoms in protein structure files in the PDB format

Usage

Add this to your Cargo.toml:

[dependencies]
lib3dmol = "0.3.2"

Here's a simple example that read a pdb file in tests/tests_file

use lib3dmol::parser;

fn main() {
    let my_structure = parser::read_pdb("tests/tests_file/f2.pdb", "Protein f2");

    println!(
        "Structure name: {}
Number of chain: {}
Number of residue: {}
Number of atom: {}",
        my_structure.name,
        my_structure.get_chain_number(),
        my_structure.get_residue_number(),
        my_structure.get_atom_number()
    );

    // Now we will extract the backbone

    let backbone = my_structure.select_atoms("backbone").unwrap();

    println!(
        "Number of chain: {}
Number of residue: {}
Number of atom: {}",
        backbone.get_chain_number(),
        backbone.get_residue_number(),
        backbone.get_atom_number()
    );
}

Todo

  • : PDB Writer
  • : Structure to keep informations on nucleic acid/lipid/water
  • : More options to select atoms (Alpha carbon, atoms near to an other, ...)
  • : Support of PDBx/mmCIF format
Commit count: 0

cargo fmt