Package org.jmol.quantum
Class NMRCalculation
- java.lang.Object
-
- org.jmol.quantum.NMRCalculation
-
- All Implemented Interfaces:
JmolNMRInterface
public class NMRCalculation extends java.lang.Object implements JmolNMRInterface
-
-
Field Summary
Fields Modifier and Type Field Description private static doubleDIPOLAR_FACTORprivate static doublee_chargeprivate static doubleh_bar_planckprivate static doubleh_planckprivate java.util.Map<java.lang.String,double[]>isotopeDataisotopeData keyed by nnnSym, for example: 1H, 19F, etc.; and also by element name itself: H, F, etc., for defaultprivate static doubleJ_FACTORprivate static intMAGNETOGYRIC_RATIOprivate static doubleQ_FACTORprivate static intQUADRUPOLE_MOMENTprivate static java.lang.StringresourceNOTE! Do not change this txt file! Instead, edit trunk/Jmol/_documents/nmr_data.xls and then clip its contents to org/jmol/quantum/nmr_data.txt.private java.util.Map<java.lang.String,java.lang.Float>shiftRefsPPMprivate Viewervwr
-
Constructor Summary
Constructors Constructor Description NMRCalculation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private BSgetAtomSiteBS(BS bsA)Interaction tensors are not repeated for every possible combination.floatgetChemicalShift(Atom atom)If shift reference has not been set, it defaults to 0 and just displays the negative of magnetic shieldingprivate voidgetData()Creates the data set necessary for doing NMR calculations.floatgetDipolarConstantHz(Atom a1, Atom a2)floatgetDipolarCouplingHz(Atom a1, Atom a2, javajs.util.V3 vField)java.lang.ObjectgetInfo(java.lang.String what)private javajs.util.Lst<Tensor>getInteractionTensorList(java.lang.String type, BS bsA)Returns a list of tensors that are of the specified type and have both atomIndex1 and atomIndex2 in bsA.private java.lang.StringgetISCtype(Atom a1, java.lang.String type)floatgetIsoOrAnisoHz(boolean isIso, Atom a1, Atom a2, java.lang.String type, Tensor isc)If t is null, then a1, a2, and type are used to find the appropriate tensor.private doublegetIsotopeData(Atom a, int iType)Get magnetogyricRatio (gamma/10^7 rad s^-1 T^-1) and quadrupoleMoment (Q/10^-2 fm^2) for a given isotope or for the default isotope of an element.floatgetJCouplingHz(Atom a1, Atom a2, java.lang.String type, Tensor isc)floatgetMagneticShielding(Atom atom)java.util.Map<java.lang.String,java.lang.Integer>getMinDistances(MeasurementData md)floatgetQuadrupolarConstant(Tensor efg)Quadrupolar constant, directly proportional to Vzz and dependent on the quadrupolar moment of the isotope consideredbooleangetState(javajs.util.SB sb)javajs.util.Lst<java.lang.Object>getTensorInfo(java.lang.String tensorType, java.lang.String infoType, BS bs)BSgetUniqueTensorSet(BS bsAtoms)An attempt to find unique atoms using tensors.booleansetChemicalShiftReference(java.lang.String element, float value)JmolNMRInterfacesetViewer(Viewer vwr)
-
-
-
Field Detail
-
MAGNETOGYRIC_RATIO
private static final int MAGNETOGYRIC_RATIO
- See Also:
- Constant Field Values
-
QUADRUPOLE_MOMENT
private static final int QUADRUPOLE_MOMENT
- See Also:
- Constant Field Values
-
e_charge
private static final double e_charge
- See Also:
- Constant Field Values
-
h_planck
private static final double h_planck
- See Also:
- Constant Field Values
-
h_bar_planck
private static final double h_bar_planck
- See Also:
- Constant Field Values
-
DIPOLAR_FACTOR
private static final double DIPOLAR_FACTOR
- See Also:
- Constant Field Values
-
J_FACTOR
private static final double J_FACTOR
- See Also:
- Constant Field Values
-
Q_FACTOR
private static final double Q_FACTOR
- See Also:
- Constant Field Values
-
vwr
private Viewer vwr
-
isotopeData
private java.util.Map<java.lang.String,double[]> isotopeData
isotopeData keyed by nnnSym, for example: 1H, 19F, etc.; and also by element name itself: H, F, etc., for default
-
resource
private static final java.lang.String resource
NOTE! Do not change this txt file! Instead, edit trunk/Jmol/_documents/nmr_data.xls and then clip its contents to org/jmol/quantum/nmr_data.txt.- See Also:
- Constant Field Values
-
shiftRefsPPM
private java.util.Map<java.lang.String,java.lang.Float> shiftRefsPPM
-
-
Method Detail
-
setViewer
public JmolNMRInterface setViewer(Viewer vwr)
- Specified by:
setViewerin interfaceJmolNMRInterface
-
getQuadrupolarConstant
public float getQuadrupolarConstant(Tensor efg)
Description copied from interface:JmolNMRInterfaceQuadrupolar constant, directly proportional to Vzz and dependent on the quadrupolar moment of the isotope considered- Specified by:
getQuadrupolarConstantin interfaceJmolNMRInterface- Returns:
- float value
-
getInteractionTensorList
private javajs.util.Lst<Tensor> getInteractionTensorList(java.lang.String type, BS bsA)
Returns a list of tensors that are of the specified type and have both atomIndex1 and atomIndex2 in bsA. If there is just one atom specified, then the list is "all tensors involving this atom". We have to use atom sites, because interaction tensors are not duplicated.- Parameters:
type-bsA-- Returns:
- list of Tensors
-
getAtomSiteBS
private BS getAtomSiteBS(BS bsA)
Interaction tensors are not repeated for every possible combination. They are just for the base atom set. These are identified as a.atomIndex == models[b.modelIndex].firstAtomIndex + b.atomSite - 1- Parameters:
bsA-- Returns:
- new bs in terms of atom sites
-
getUniqueTensorSet
public BS getUniqueTensorSet(BS bsAtoms)
Description copied from interface:JmolNMRInterfaceAn attempt to find unique atoms using tensors.- Specified by:
getUniqueTensorSetin interfaceJmolNMRInterface- Returns:
- bitset of atoms
-
getIsoOrAnisoHz
public float getIsoOrAnisoHz(boolean isIso, Atom a1, Atom a2, java.lang.String type, Tensor isc)Description copied from interface:JmolNMRInterfaceIf t is null, then a1, a2, and type are used to find the appropriate tensor.- Specified by:
getIsoOrAnisoHzin interfaceJmolNMRInterface- Returns:
- 0 if not found
-
getISCtype
private java.lang.String getISCtype(Atom a1, java.lang.String type)
-
getDipolarConstantHz
public float getDipolarConstantHz(Atom a1, Atom a2)
- Specified by:
getDipolarConstantHzin interfaceJmolNMRInterface- Returns:
- desired constant
-
getDipolarCouplingHz
public float getDipolarCouplingHz(Atom a1, Atom a2, javajs.util.V3 vField)
- Specified by:
getDipolarCouplingHzin interfaceJmolNMRInterface- Returns:
- projected value
-
getIsotopeData
private double getIsotopeData(Atom a, int iType)
Get magnetogyricRatio (gamma/10^7 rad s^-1 T^-1) and quadrupoleMoment (Q/10^-2 fm^2) for a given isotope or for the default isotope of an element.- Parameters:
a-iType-- Returns:
- g or Q
-
getData
private void getData()
Creates the data set necessary for doing NMR calculations. Values are retrievable using getProperty "nmrInfo" "Xx"; each entry is float[+/-isotopeNumber, g, Q], where [0] < 0 for the default value.
-
getInfo
public java.lang.Object getInfo(java.lang.String what)
- Specified by:
getInfoin interfaceJmolNMRInterface- Parameters:
what- "C" or "14C" or "all"- Returns:
- list of double[isotopeNumber,g,Q] if no isotope number is given, or a single double[] if it does.
-
getChemicalShift
public float getChemicalShift(Atom atom)
Description copied from interface:JmolNMRInterfaceIf shift reference has not been set, it defaults to 0 and just displays the negative of magnetic shielding- Specified by:
getChemicalShiftin interfaceJmolNMRInterface- Returns:
- value
-
getMagneticShielding
public float getMagneticShielding(Atom atom)
- Specified by:
getMagneticShieldingin interfaceJmolNMRInterface
-
getState
public boolean getState(javajs.util.SB sb)
- Specified by:
getStatein interfaceJmolNMRInterface
-
setChemicalShiftReference
public boolean setChemicalShiftReference(java.lang.String element, float value)- Specified by:
setChemicalShiftReferencein interfaceJmolNMRInterface
-
getTensorInfo
public javajs.util.Lst<java.lang.Object> getTensorInfo(java.lang.String tensorType, java.lang.String infoType, BS bs)- Specified by:
getTensorInfoin interfaceJmolNMRInterface
-
getMinDistances
public java.util.Map<java.lang.String,java.lang.Integer> getMinDistances(MeasurementData md)
- Specified by:
getMinDistancesin interfaceJmolNMRInterface
-
-