/** * Gets the radius for given nucleotide atom * @param atom * @return */ private static double getRadiusForNucl(NucleotideImpl nuc, Atom atom) { if (atom.getElement().equals(Element.H)) return Element.H.getVDWRadius(); if (atom.getElement().equals(Element.D)) return Element.D.getVDWRadius(); if (atom.getElement()==Element.C) return NUC_CARBON_VDW; if (atom.getElement()==Element.N) return NUC_NITROGEN_VDW; if (atom.getElement()==Element.P) return PHOSPHOROUS_VDW; if (atom.getElement()==Element.O) return OXIGEN_VDW; logger.info("Unexpected atom "+atom.getName()+" for nucleotide "+nuc.getPDBName()+", assigning its standard vdw radius"); return atom.getElement().getVDWRadius(); }
/** * Returns <CODE>true</CODE> is the Element is an not Hydrogen (or an * isotope of Hydrogen). * <p> * This method is the exact opposite of {@link #isHydrogen()}. * </p> * * @return <CODE>true</CODE> is Element is not Hydrogen. */ public boolean isHeavyAtom() { return !isHydrogen(); }
if ( a1.getElement().isMetal() || a2.getElement().isMetal()){ MetalBondDistance defined = getMetalDistanceCutoff(a1.getElement().name(),a2.getElement().name()); float radiusOfAtom1 = ret[0].getElement().getCovalentRadius(); float radiusOfAtom2 = ret[1].getElement().getCovalentRadius();
element = Element.valueOfIgnoreCase(atom.getType_symbol()); } catch (IllegalArgumentException e) { logger.info("Element {} was not recognised as a BioJava-known element, the element will be represented as the generic element {}", atom.getType_symbol(), Element.R.name());
final Element elementAnnotation = f.getAnnotation(Element.class); // get the 'Element' annotation of the Field final String name = elementAnnotation.name(); // get the 'name'-value of the annotation
if ( a == null) continue; if (a.getElement().isMetal()) continue;
element = Element.valueOfIgnoreCase(elementSymbol); guessElement = false; } catch (IllegalArgumentException e){ } else { try { element = Element.valueOfIgnoreCase(elementSymbol); } catch (IllegalArgumentException e) {
String spaceY = getSpace(10, df.format(a.getY())); String spaceZ = getSpace(10, df.format(a.getZ())); String spaceEle = getSpace(4, a.getElement().toString()); atomList.append(spaceX+df.format(a.getX())+spaceY+df.format(a.getY())+spaceZ+df.format(a.getZ())+" "+a.getElement().toString()+spaceEle+"0 0 0 0 0 0 0 0 0 0 0 0\n"); for(Bond b: a.getBonds()){ Atom otherAtom = b.getOther(a);
private Atom getAtom(String atomId, Group group) { Atom a = group.getAtom(atomId); // Check for deuteration if(a==null && atomId.startsWith("H")) { a = group.getAtom(atomId.replaceFirst("H", "D")); // Check it is actually deuterated if(a!=null){ if(!a.getElement().equals(Element.D)){ a=null; } } } return a; }
logger.warn("Unrecognised atom "+atom.getName()+" with serial "+atom.getPDBserial()+ ", assigning the default vdw radius (Nitrogen vdw radius)."); return Element.N.getVDWRadius(); logger.warn("Unknown parent residue for atom "+atom.getName()+" with serial "+ atom.getPDBserial()+", assigning its default vdw radius"); return atom.getElement().getVDWRadius(); return atom.getElement().getVDWRadius();
/** * Returns the center of mass of the set of atoms. Atomic masses of the * Atoms are used. * * @param points * a set of Atoms * @return an Atom representing the center of mass */ public static Atom centerOfMass(Atom[] points) { Atom center = new AtomImpl(); float totalMass = 0.0f; for (Atom a : points) { float mass = a.getElement().getAtomicMass(); totalMass += mass; center = scaleAdd(mass, a, center); } center = scaleEquals(center, 1.0f/totalMass); return center; }
atom.setPDBserial(serialNumber); atom.setName(atomName.trim()); atom.setElement(Element.valueOfIgnoreCase(element)); if(alternativeLocationId==MmtfStructure.UNAVAILABLE_CHAR_VALUE){ alternativeLocationId = ' ';
atom.getTempFactor(), atom.getElement().toString(), atom.getCharge()); addBonds(atom, atomsInGroup, allAtoms);
if (atom.getElement().equals(Element.H)) return Element.H.getVDWRadius(); if (atom.getElement().equals(Element.D)) return Element.D.getVDWRadius(); return Element.C.getVDWRadius(); return atom.getElement().getVDWRadius();