private SecStrucState getSecStrucState(int pos){ Group g = groups[pos]; SecStrucState state = (SecStrucState) g.getProperty(Group.SEC_STRUC); return state; }
/** * Obtain the List of secondary structure information (SecStrucInfo) of a * Structure. * * @param s * Structure with SS assignments * @return List of SecStrucInfo objects */ public static List<SecStrucInfo> getSecStrucInfo(Structure s) { List<SecStrucInfo> listSSI = new ArrayList<SecStrucInfo>(); GroupIterator iter = new GroupIterator(s); while (iter.hasNext()) { Group g = iter.next(); if (g.hasAminoAtoms()) { Object p = g.getProperty(Group.SEC_STRUC); if (!(p == null)) { SecStrucInfo ss = (SecStrucInfo) p; listSSI.add(ss); } } } return listSSI; }
/** * Get the secondary structure as defined by DSSP. * @param group the input group to be calculated * @return the integer index of the group type. */ public static int getSecStructType(Group group) { SecStrucState props = (SecStrucState) group.getProperty("secstruc"); if(props==null){ return DsspType.NULL_ENTRY.getDsspIndex(); } return DsspType.dsspTypeFromString(props.getType().name).getDsspIndex(); }
Object p = g.getProperty(Group.SEC_STRUC); if (p == null) continue;
Object p = g.getProperty(Group.SEC_STRUC); if (p == null) continue;
private void setSecStruc(){ setSecElement(helixList, SecStrucInfo.PDB_AUTHOR_ASSIGNMENT, SecStrucType.helix4); setSecElement(strandList, SecStrucInfo.PDB_AUTHOR_ASSIGNMENT, SecStrucType.extended); setSecElement(turnList, SecStrucInfo.PDB_AUTHOR_ASSIGNMENT, SecStrucType.turn); //Now insert random coil to the Groups that did not have SS information GroupIterator gi = new GroupIterator(structure); while (gi.hasNext()){ Group g = gi.next(); if (g.hasAminoAtoms()){ if (g.getProperty(Group.SEC_STRUC) == null){ SecStrucInfo ss = new SecStrucInfo(g, SecStrucInfo.PDB_AUTHOR_ASSIGNMENT, SecStrucType.coil); g.setProperty(Group.SEC_STRUC, ss); } } } }