rcsb / mmtf-java Goto Github PK
View Code? Open in Web Editor NEWThe java implementation of the MMTF API, decoder and encoder.
Home Page: http://mmtf.rcsb.org/
License: Apache License 2.0
The java implementation of the MMTF API, decoder and encoder.
Home Page: http://mmtf.rcsb.org/
License: Apache License 2.0
Cannot use AdapterToStructureData in Spark jobs unless it is searializable.
Use https://mmtf.rcsb.org ... in all URLs
Currently the base URL is hard coded to use the full version of the MMTF files. We should add methods or a flag to be able to load reduced structures.
The following constructor used the same precision for coordinates, B-factors, and occupancy. Usually, different precision is used for these quantities. This constructor should be removed.
/**
* The constructor for the encoder.
* @param structureDataInterface the interface of data to be encoded
* @param precision the precision for the storing of coordinate, B-factor and occupancy data
*/
public GenericEncoder(StructureDataInterface structureDataInterface, int precision) {
coordDivider = precision;
bfactorOccDivider = precision;
encode(structureDataInterface);
}
This unit test fails for PDB ID 4CUP because the expected number of atoms should be:
115 CA's + 24 heterogen atoms = 139 atoms.
CA at alternative locations are not included in the reduced files, and therefore should not be counted.
Currently requires some code to find this.
I recently updated to v1.0.9 from v1.0.5 to gain access to the HTTPS ReaderUtils function. I noticed one particular file is now producing extra bonds: 3N4B. There are now a total of 4135 residue bonds produced, instead of the correct 4131. In the rendering, these bonds are incorrect. Everything else in the file appears correct. Any ideas on what the problem may be?
I do not know if the data has changed or if the issue is in a version of the Java MMTF libs >1.0.5 as I cannot test from v1.0.5 anymore with HTTP.
A user, who used the .jar files directly, wants to get the version number of the mmtf-java library.
We need either methods to load structures using https or a flag to switch from http to https.
This will help with flexibility downstream.
Need method to set AdapterToStructureData.mmtfProducer
When unpacking an mmtf
file, this implementation expects doubles for the transformation matrices.
The specification outlines the float type as 32bit, and says this field is populated with floats.
Not sure if this should be changed - I suspect it might break parsing existing mmtf
files, so maybe it needs to accept both types?
Make sure DOD is handled the same way as HOH. There is a logic error in the code.
I'm not seeing how one would integrate this mmtf-java package into a working Java program such as Jmol. It has a very large set of dependencies, including
org.msgpack.jackson.dataformat
fasterxml.jackson.annotation
fasterxml.jackson.core
fasterxml.jackson.databind
This amounts to over 5 MB of code and over 500 classes.
The decoding task, at least, is not at all that difficult. I have implemented it in Jmol using a very simple class that has only three generic dependencies (a byte array converter, a binary document reader, and an efficient JavaScript-compatible StringBuffer equivalent). See Jmol's MessagePackReader
I offer this code as a possible very lightweight alternative to what is presently on this site (4 files total; under 20K total for either .class or .js files).
So perhaps just suggesting development of a similar "mmtf-java-decode-lite"
Bob Hanson
The MessagePack deserialization is slow.
https://github.com/FasterXML/jackson-databind suggest to instantiate ObjectMapper once and then reuse it.
Try to instantiate:
ObjectMapper objectMapper = new ObjectMapper(new MessagePackFactory());
once in the constructor and reuse it.
Please create a new version with all the latest fixes. We'll use the new version of mmtf-java to create an updated set of mmtf files.
Also, if you could send me instructions how to update a version, I'd be happy to do it myself in the future.
This seems to be dead code:
String[] chainIdList = new String[dataApi.getEntityChainIndexList(i).length];
int counter = 0;
for (int chainInd : dataApi.getEntityChainIndexList(i)) {
chainIdList[counter] = dataApi.getChainIds()[chainInd];
counter++;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.