Code Monkey home page Code Monkey logo

Comments (5)

wojdyr avatar wojdyr commented on June 3, 2024

First, we'd have to store the coordinates somewhere. Currently, they are not in ChemComp::Atom. How do you store them in your program?
There is also a question of how to name these columns.
_chem_comp_atom.x is used in, for example, Refmac monomer library. In CCD and in PDBx/mmCIF spec x coordinates are named: _chem_comp_atom.model_Cartn_x and _chem_comp_atom.pdbx_model_Cartn_x_ideal.

from gemmi.

rimmartin avatar rimmartin commented on June 3, 2024

I build a gemmi::Structure from our internal backbone and use

std::unique_ptr<gemmi::ChemComp>&& cc = gemmi::make_chemcomp_with_restraints((*it_residues));

to begin populating a gemmi::ChemComp for the atoms, bonds and angles. *it_residues is a gemmi::Residue. Then use internal properties to fill torsion, planar and chiral data structures into the same ChemComp. And they write out to stream

    gemmi::cif::Block new_block((*it_residues).name);
    gemmi::add_chemcomp_to_block(*cc.get(), new_block);
    gemmi::cif::write_cif_block_to_stream(buf, new_block, gemmi::cif::Style::Simple);

Would it fit other people's needs and gemmi design if the make_chemcomp_with_restraints moved a copy of the residue's coordinates to new properties for them in ChemComp::Atom?

I tested _chem_comp_atom.x, _chem_comp_atom.model_Cartn_x and _chem_comp_atom.pdbx_model_Cartn_x_ideal labels in cifs which are successfully read by pymol and moe

from gemmi.

wojdyr avatar wojdyr commented on June 3, 2024

It makes sense. I'll add copying coordinates in make_chemcomp_with_restraints and add_chemcomp_to_block.
This or next week.

from gemmi.

rimmartin avatar rimmartin commented on June 3, 2024

Oh that will be fine! I got plenty of other things to do so a few weeks is good timing. Thank you

from gemmi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.