# Class AnnotationParser

java.lang.Object
org.jmol.dssx.AnnotationParser

All Implemented Interfaces:
  `JmolAnnotationParser`

Direct Known Subclasses:
  `DSSR1`

public class AnnotationParser extends Object implements JmolAnnotationParser
A parser for output from 3DNA web service. load =1d66/dssr also other annotations now, load *1cbs/dom calls EBI for the mmCIF file and also retrieves the domains mapping JSON report. load *1cbs/val calls EBI for the mmCIF file and also retrieves the validation outliers JSON report. Bob Hanson July 2014

Author:
  Bob Hanson hansonr@stolaf.edu

## Constructor Summary

Constructors
Constructor
Description
`AnnotationParser()`

## Method Summary

Modifier and Type
Method
Description
`String`
`calculateDSSRStructure(Viewer vwr, BS bsAtoms)`
`String`
`catalogStructureUnits(Viewer viewer, SV map0, int[] modelAtomIndices, Map<String,int[]> resMap, Object object, Map<String,Integer> modelMap)`
RNA3D --
`Lst<Object>`
`catalogValidations(Viewer viewer, SV map0, int[] modelAtomIndices, Map<String,int[]> resMap, Map<String,Integer> atomMap, Map<String,Integer> modelMap)`
Returns a Lst
`void`
`fixAtoms(int modelIndex, SV dbObj, BS bsAddedMask, int type, int margin)`
Adjusts _atoms bitset to account for added hydrogen atoms.
`String`
`fixDSSRJSONMap(Map<String,Object> map)`
`String`
`getAnnotationInfo(Viewer vwr, SV a, String match, int type, int modelIndex)`
Get a string report of annotation data
`BS`
`getAtomBits(Viewer vwr, String key, Object dbObj, Map<String,Object> annotationCache, int type, int modelIndex, BS bsModel)`
////////////////// general post-load processing ////////////////
`void`
`getAtomicDSSRData(ModelSet ms, int modelIndex, float[] dssrData, String dataType)`
`Lst<Float>`
`getAtomValidation(Viewer vwr, String type, Atom atom)`
Get all validation values corresponding to a specific validation type.
`String`
`getAttachedAtomForPDBH(String group3, String name)`
Finds the standard attached heavy atom for a PDB H atom; used in EBI clash validation.
`void`
`getBasePairs(Viewer vwr, int modelIndex)`
`P3[]`
`getDSSRFrame(Map<String,Object> dssrNT)`
`String`
`getHBonds(ModelSet ms, int modelIndex, Lst<Bond> vHBonds, boolean doReport)`
`Lst<SV>`
`initializeAnnotation(SV objAnn, int type, int modelIndex)`
We create a main list of mappings, where each mapping has _atoms and _path
`void`
`setGroup1(ModelSet ms, int modelIndex)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AnnotationParser

public AnnotationParser()

## Method Details

### catalogStructureUnits

public String catalogStructureUnits(Viewer viewer, SV map0, int[] modelAtomIndices, Map<String,int[]> resMap, Object object, Map<String,Integer> modelMap)
RNA3D --

Specified by:
  `catalogStructureUnits` in interface `JmolAnnotationParser`

### catalogValidations

public Lst<Object> catalogValidations(Viewer viewer, SV map0, int[] modelAtomIndices, Map<String,int[]> resMap, Map<String,Integer> atomMap, Map<String,Integer> modelMap)
Returns a Lst

Specified by:
  `catalogValidations` in interface `JmolAnnotationParser`

### initializeAnnotation

public Lst<SV> initializeAnnotation(SV objAnn, int type, int modelIndex)
We create a main list of mappings, where each mapping has _atoms and _path

Specified by:
  `initializeAnnotation` in interface `JmolAnnotationParser`
Parameters:
  `objAnn` -
Returns:
  Lst of mappings

### getAtomBits

public BS getAtomBits(Viewer vwr, String key, Object dbObj, Map<String,Object> annotationCache, int type, int modelIndex, BS bsModel)
////////////////// general post-load processing ////////////////

Specified by:
  `getAtomBits` in interface `JmolAnnotationParser`

### getAtomValidation

public Lst<Float> getAtomValidation(Viewer vwr, String type, Atom atom)
Get all validation values corresponding to a specific validation type. Used by label %[validation.clashes]

Specified by:
  `getAtomValidation` in interface `JmolAnnotationParser`
Parameters:
  `vwr` -
  `type` - e.g. "clashes"
  `atom` -
Returns:
  a list of Float values associated with this atom and this type of validation

### getAnnotationInfo

public String getAnnotationInfo(Viewer vwr, SV a, String match, int type, int modelIndex)
Get a string report of annotation data

Specified by:
  `getAnnotationInfo` in interface `JmolAnnotationParser`
Parameters:
  `a` - an annotation structure wrapped as a script variable
  `match` - can contain "mappings" to get those specifically
Returns:
  tab-separated line-based listing

### getAttachedAtomForPDBH

public String getAttachedAtomForPDBH(String group3, String name)
Finds the standard attached heavy atom for a PDB H atom; used in EBI clash validation.

Parameters:
  `group3` -
  `name` -
Returns:
  name of attached atom or hName

### fixAtoms

public void fixAtoms(int modelIndex, SV dbObj, BS bsAddedMask, int type, int margin)
Adjusts _atoms bitset to account for added hydrogen atoms. A margin of 20 allows for 20 added H atoms per group

Specified by:
  `fixAtoms` in interface `JmolAnnotationParser`

### getBasePairs

public void getBasePairs(Viewer vwr, int modelIndex)

Specified by:
  `getBasePairs` in interface `JmolAnnotationParser`

### calculateDSSRStructure

public String calculateDSSRStructure(Viewer vwr, BS bsAtoms)

Specified by:
  `calculateDSSRStructure` in interface `JmolAnnotationParser`

### fixDSSRJSONMap

public String fixDSSRJSONMap(Map<String,Object> map)

Specified by:
  `fixDSSRJSONMap` in interface `JmolAnnotationParser`

### getHBonds

public String getHBonds(ModelSet ms, int modelIndex, Lst<Bond> vHBonds, boolean doReport)

Specified by:
  `getHBonds` in interface `JmolAnnotationParser`

### getAtomicDSSRData

public void getAtomicDSSRData(ModelSet ms, int modelIndex, float[] dssrData, String dataType)

Specified by:
  `getAtomicDSSRData` in interface `JmolAnnotationParser`

### setGroup1

public void setGroup1(ModelSet ms, int modelIndex)

Specified by:
  `setGroup1` in interface `JmolAnnotationParser`

### getDSSRFrame

public P3[] getDSSRFrame(Map<String,Object> dssrNT)

Specified by:
  `getDSSRFrame` in interface `JmolAnnotationParser`