Giter Club home page Giter Club logo

Comments (3)

lohedges avatar lohedges commented on August 26, 2024

This is because the Flare file is not a properly formatted PDB file. We only break the contents into multiple molecules if the PDB contains multiple MODEL entries (with appropriate ENDMDL records) or if there are TER records between the molecules. The Flare file has neither, but just concatenates together a bunch of individual PDB files. (There should only be one MASTER and END per file.) We also can't use the CONECT records to break the system into molecules, since these are often incomplete or entirely missing.

I'd recommend writing to separate PDB files, then loading all of them at one go. You could also load them individually and add them to a system. Something like:

# Load molecules from a bunch of files into the same system.
system = BSS.IO.readMolecules(BSS.IO.glob("file_prefix_*.pdb"))

# Or...

# Load the files one-by-one and add the molecules to a system.
for idx, file in enumerate(pdb_files):
    # Create the initial system.
    if idx == 0:
        system = BSS.IO.readMolecules(file)
    # Add the molecule to the system.
    else:
        system += BSS.IO.readMolecules(file).getMolecules()

from biosimspace.

ppxasjsm avatar ppxasjsm commented on August 26, 2024

ok, I thought it was something like that. I'll find a way to write them out individually.

from biosimspace.

lohedges avatar lohedges commented on August 26, 2024

No problem. If we end up using these Flare files a lot then it would be easy for me to modify the PDB parser (since we know what the format is). In the short term, splitting to multiple files is probably the best option.

from biosimspace.

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.