Search in sources :

Example 6 with ColumnarStructure

use of edu.sdsc.mmtf.spark.utils.ColumnarStructure in project mmtf-spark by sbl-sdsc.

the class ColumnarStructureTest method testGetGroupNames.

@Test
public void testGetGroupNames() {
    StructureDataInterface s = pdb.values().first();
    ColumnarStructure cs = new ColumnarStructure(s, true);
    assertEquals("VAL", cs.getGroupNames()[900]);
}
Also used : ColumnarStructure(edu.sdsc.mmtf.spark.utils.ColumnarStructure) StructureDataInterface(org.rcsb.mmtf.api.StructureDataInterface) Test(org.junit.Test)

Example 7 with ColumnarStructure

use of edu.sdsc.mmtf.spark.utils.ColumnarStructure in project mmtf-spark by sbl-sdsc.

the class ColumnarStructureTest method testGetxCoords.

@Test
public void testGetxCoords() {
    StructureDataInterface s = pdb.values().first();
    ColumnarStructure cs = new ColumnarStructure(s, true);
    assertEquals(26.260, cs.getxCoords()[20], 0.001);
}
Also used : ColumnarStructure(edu.sdsc.mmtf.spark.utils.ColumnarStructure) StructureDataInterface(org.rcsb.mmtf.api.StructureDataInterface) Test(org.junit.Test)

Example 8 with ColumnarStructure

use of edu.sdsc.mmtf.spark.utils.ColumnarStructure in project mmtf-spark by sbl-sdsc.

the class ColumnarStructureTest method testGetChainIds.

@Test
public void testGetChainIds() {
    StructureDataInterface s = pdb.values().first();
    ColumnarStructure cs = new ColumnarStructure(s, true);
    assertEquals("A", cs.getChainIds()[100]);
    // BTN
    assertEquals("B", cs.getChainIds()[901]);
    // HOH
    assertEquals("C", cs.getChainIds()[917]);
}
Also used : ColumnarStructure(edu.sdsc.mmtf.spark.utils.ColumnarStructure) StructureDataInterface(org.rcsb.mmtf.api.StructureDataInterface) Test(org.junit.Test)

Example 9 with ColumnarStructure

use of edu.sdsc.mmtf.spark.utils.ColumnarStructure in project mmtf-spark by sbl-sdsc.

the class ColumnarStructureTest method testGetGroupNumbers.

@Test
public void testGetGroupNumbers() {
    StructureDataInterface s = pdb.values().first();
    ColumnarStructure cs = new ColumnarStructure(s, true);
    assertEquals("130", cs.getGroupNumbers()[877]);
}
Also used : ColumnarStructure(edu.sdsc.mmtf.spark.utils.ColumnarStructure) StructureDataInterface(org.rcsb.mmtf.api.StructureDataInterface) Test(org.junit.Test)

Example 10 with ColumnarStructure

use of edu.sdsc.mmtf.spark.utils.ColumnarStructure in project mmtf-spark by sbl-sdsc.

the class CoordinationGeometryTest method test.

@Test
public void test() {
    StructureDataInterface structure = pdb.values().first();
    ColumnarStructure cs = new ColumnarStructure(structure, true);
    // ZN A.101.ZN
    Point3d center = getCoords(cs, 459);
    Point3d[] neighbors = new Point3d[6];
    // CYS A.7.SG
    neighbors[0] = getCoords(cs, 28);
    // CYS A.10.SG
    neighbors[1] = getCoords(cs, 44);
    // HIS A.31.ND1
    neighbors[2] = getCoords(cs, 223);
    // CYS A.34.SG
    neighbors[3] = getCoords(cs, 245);
    // CYS A.10.N
    neighbors[4] = getCoords(cs, 45);
    // HIS A.31.O
    neighbors[5] = getCoords(cs, 220);
    CoordinationGeometry geom = new CoordinationGeometry(center, neighbors);
    double q3Expected = 0.9730115379131878;
    assertEquals(q3Expected, geom.q3(), 0.0001);
    double q4Expected = 0.9691494056145086;
    assertEquals(q4Expected, geom.q4(), 0.0001);
    double q5Expected = 0.5126001729084566;
    assertEquals(q5Expected, geom.q5(), 0.0001);
    double q6Expected = 0.2723305441457363;
    assertEquals(q6Expected, geom.q6(), 0.0001);
}
Also used : ColumnarStructure(edu.sdsc.mmtf.spark.utils.ColumnarStructure) Point3d(javax.vecmath.Point3d) CoordinationGeometry(edu.sdsc.mmtf.spark.utils.CoordinationGeometry) StructureDataInterface(org.rcsb.mmtf.api.StructureDataInterface) Test(org.junit.Test)

Aggregations

ColumnarStructure (edu.sdsc.mmtf.spark.utils.ColumnarStructure)10 Test (org.junit.Test)10 StructureDataInterface (org.rcsb.mmtf.api.StructureDataInterface)10 CoordinationGeometry (edu.sdsc.mmtf.spark.utils.CoordinationGeometry)1 Point3d (javax.vecmath.Point3d)1