Git Product home page Git Product logo

jpdbapi's Introduction

jPdbApi

Maven Central

A Java wrapper for the RCSB PDB APIs. I wrote this module specifically for the Android application Palantir, so I've only implemented what was necessary. Contributions are extremely welcome!

Example

try {
    TextSearch textSearch = new TextSearch(queryString);
    String[] results = textSearch.getPage();  // PDB IDs
    for (String pdbId : results) {
        Pdb pdb = new Pdb(pdbId);
        pdb.load()
        System.out.println(pdbId.getTitle());
    }
} catch (IOException e) {
    e.printStackTrace();
}

Development guide

Testing

mvn test runs the test. To run a single test, use the -Dtest=ClassName#methodName flag, e.g.

mvn test -Dtest=TextSearchTests#nextPageWorksOnline

In the event that several tests seem to fail with a SocketTimeoutException, check if the RCSB search service is online by running this simple query listed on the RCSB "Search API Documentation" page.

Illegal reflective access operation from guice

You might see the warning:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

when building or testing the package. This is a documented bug. I expect (hope) that the fix will propagate soon (guice is not a direct dependency).

jpdbapi's People

Contributors

ning-y avatar

Stargazers

 avatar

Watchers

 avatar

jpdbapi's Issues

Retirement of legacy RCSB PDB APIs in November 2020

The RCSB PDB legacy APIs are going to be discontinued in November 2020, see the news article:

https://www.rcsb.org/news?year=2020&article=5eb18ccfd62245129947212a&feature=true

All programmatic users are strongly encouraged to migrate to the new APIs before November 2020.

New json-based APIs are now available that provide more comprehensive search and fetch capabilities, see https://www.rcsb.org/pages/webservices. Highlights include :

  • A GraphQL interface for the Data API
  • Full boolean support for Search API
  • Integrated text + scientific searches (structure search, sequence search) in the Search API

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.