Package ffx.utilities

Class Hybrid36

java.lang.Object
ffx.utilities.Hybrid36

public class Hybrid36 extends Object
Java port of the hy36encode() and hy36decode() functions in the hybrid_36.py Python prototype/reference implementation.
Since:
1.0
Author:
Michael J. Schnieders

Derived from code by: Ralf W. Grosse-Kunstleve, Vincent B. Chen, Jeff J. Headd, Sep 2007.

See Also:
  • Method Details

    • decode

      public static int decode(int width, String s)
      Hybrid-36 decoder: converts string s to integer result.
      Parameters:
      width - must be 4 (e.g. for residue sequence numbers) or 5 (e.g. for atom serial numbers)
      s - the String to be converted.
      Returns:
      Returns the conversion result.
    • encode

      public static String encode(int width, int value)
      Hybrid-36 encoder: converts integer value to string result.
      Parameters:
      width - must be 4 (e.g. for residue sequence numbers) or 5 (e.g. for atom serial numbers).
      value - the integer value to be converted.
      Returns:
      a String String of size width.