亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? forcefieldtools.java

?? 化學圖形處理軟件
?? JAVA
字號:
package org.openscience.cdk.modeling.forcefield;import org.openscience.cdk.interfaces.IAtom;import org.openscience.cdk.interfaces.IAtomContainer;import javax.vecmath.GVector;import javax.vecmath.Point3d;import javax.vecmath.Vector3d;import java.util.Vector;/** *  To work with the coordinates of the molecule, like get the 3d coordinates of *  the atoms or calculate the distance between two atoms. * * @author      vlabarta * @cdk.created 2005-03-03 */public abstract class ForceFieldTools {    static Vector3d xji = null;    static Vector3d xjk = null;    static Vector3d xlk = null;    static Vector3d v1 = null;    static Vector3d v2 = null;    static Point3d atomiCoordinates = new Point3d();    static Point3d atomjCoordinates = new Point3d();    static Point3d atomkCoordinates = new Point3d();    static Point3d atomlCoordinates = new Point3d();    static Point3d atom1Coordinates = new Point3d();    static Point3d atom2Coordinates = new Point3d();    /**     *  Get the coordinates 3xN vector of a molecule of N atoms from its atom     *  container     *     *@param  molecule  molecule store in an AtomContainer     *@return           GVector with 3xN coordinates (N: atom numbers)     */    public static  GVector getCoordinates3xNVector(IAtomContainer molecule) {        //logger.debug("molecule: " + molecule.toString());        //logger.debug("Atoms number = " + molecule.getAtomCount());        GVector coords3d_0 = new GVector(3 * (molecule.getAtomCount()));        //logger.debug("coords3d_0 = " + coords3d_0);        int j;        for (int i = 0; i < molecule.getAtomCount(); i++) {            //logger.debug("thisAtom = " + thisAtom);            //logger.debug("thisAtom.getPoint3d() = " + thisAtom.getPoint3d());            j = 3 * i;            coords3d_0.setElement(j, molecule.getAtom(i).getPoint3d().x);            coords3d_0.setElement(j + 1, molecule.getAtom(i).getPoint3d().y);            coords3d_0.setElement(j + 2, molecule.getAtom(i).getPoint3d().z);        }        //logger.debug("Atoms coordinates vector: " + coords3d_0);        return coords3d_0;    }    /**     *  Get the set of N coordinates 3d of a molecule of N atoms from its atom     *  container     *     *@param  molecule  molecule store in an AtomContainer     *@return           Vector with the N coordinates 3d of a molecule of N atoms     */    public static  Vector getPoint3dCoordinates(IAtomContainer molecule) {        //logger.debug("molecule: " + molecule.toString());        //logger.debug("Atoms number = " + molecule.getAtomCount());        Vector point3dCoordinates = new Vector();        for (int i = 0; i < molecule.getAtomCount(); i++) {            //logger.debug("thisAtom = " + thisAtom);            //logger.debug("thisAtom.getPoint3d() = " + thisAtom.getPoint3d());            point3dCoordinates.add(new Point3d(molecule.getAtom(i).getPoint3d()));            //Point3d ia = (Point3d)point3dCoordinates.get(i);            //logger.debug(i + "a = " + ia);        }        //logger.debug("Atoms 3d coordinates : " + point3dCoordinates);        return point3dCoordinates;    }    /**     *  Calculate 3d distance between two atoms coordinates     *     *@param  atom1  First atom.     *@param  atom2  Second atom.     *@return        Distance between the two atoms.     */    public static  double distanceBetweenTwoAtoms(IAtom atom1, IAtom atom2) {        atom1Coordinates = atom1.getPoint3d();        atom2Coordinates = atom2.getPoint3d();        double atomsDistance = atom1Coordinates.distance(atom2Coordinates);        System.out.println("distanceBetweenTwoAtoms, atomsDistance = " + atomsDistance);        return atomsDistance;    }    /**     *  Calculate 3d distance between two atoms in one molecule from its 3xN     *  coordinate vector.     *     *@param  coords3d  Molecule 3xN coordinates.     *@param  atom1Position               Atom position in the molecule (from 0 to N-1) for the first atom.     *@param  atom2Position               Atom position in the molecule (from 0 to N-1) for the second atom.     *@return                         Distance between the two atoms.     */    public static double distanceBetweenTwoAtomsFrom3xNCoordinates(GVector coords3d, int atom1Position, int atom2Position) {        atom1Coordinates.x = coords3d.getElement(3 * atom1Position);        atom1Coordinates.y = coords3d.getElement(3 * atom1Position + 1);        atom1Coordinates.z = coords3d.getElement(3 * atom1Position + 2);        atom2Coordinates.x = coords3d.getElement(3 * atom2Position);        atom2Coordinates.y = coords3d.getElement(3 * atom2Position + 1);        atom2Coordinates.z = coords3d.getElement(3 * atom2Position + 2);        double atomsDistance;        atomsDistance = atom1Coordinates.distance(atom2Coordinates);        return atomsDistance;    }    /**     *  Calculate 3d distance between two atoms in one molecule from its N     *  coordinates 3d     *     *@param  atoms3dCoordinates  Vector with the N coordinates 3d     *@param  atomNum1            Atom position in the 3xN coordinates vector (from     *      0 to N-1) for the first atom.     *@param  atomNum2            Atom position in the 3xN coordinates vector (from     *      0 to N-1) for the second atom.     *@return                     Distance between the two atoms in the molecule.     */    public static  double distanceBetweenTwoAtomsFromNCoordinates3d(Vector atoms3dCoordinates, int atomNum1, int atomNum2) {        Point3d atom13dCoord = (Point3d) atoms3dCoordinates.get(atomNum1);        Point3d atom23dCoord = (Point3d) atoms3dCoordinates.get(atomNum2);        double atomsDistance;        atomsDistance = atom13dCoord.distance(atom23dCoord);        //logger.debug("atomsDistance = " + atomsDistance);        return atomsDistance;    }    /**     *  Assign the 3D coordinates saved in a GVector back to the molecule     *     *@param  moleculeCoords  GVector with the coordinates     *@param  molecule        AtomContainer     *@return                 the molecule as AtomContainer     */    public static  IAtomContainer assignCoordinatesToMolecule(GVector moleculeCoords, IAtomContainer molecule) {        for (int i = 0; i < molecule.getAtomCount(); i++) {            molecule.getAtom(i).setPoint3d(            	new Point3d(            		moleculeCoords.getElement(i * 3),            		moleculeCoords.getElement(i * 3 + 1),            		moleculeCoords.getElement(i * 3 + 2)            	)            );        }        return molecule;    }    /**     *  Calculate 3d distance between two atoms from two different 3xN coordinate     *  vectors.     *     *@param  atomsCoordinatesVector1  3xN coordinates from the first molecule.     *@param  atomsCoordinatesVector2  3xN coordinates from the second molecule.     *@param  atomNumM1                Atom position in the first molecule.     *@param  atomNumM2                Atom position in the second molecule.     *@return                          Distance between the two atoms.     */    public static  double distanceBetweenTwoAtomFromTwo3xNCoordinates(GVector atomsCoordinatesVector1, GVector atomsCoordinatesVector2, int atomNumM1, int atomNumM2) {        double atomsDistance = 0;        double difference;        for (int j = 0; j < 3; j++) {            difference = atomsCoordinatesVector1.getElement(atomNumM1 * 3 + j) - atomsCoordinatesVector2.getElement(atomNumM2 * 3 + j);            difference = Math.pow(difference, 2);            atomsDistance = atomsDistance + difference;        }        atomsDistance = Math.sqrt(atomsDistance);        //logger.debug("atomsDistance = " + atomsDistance);        return atomsDistance;    }    /**     *  calculates the angle between two bonds, i-j and j-k, given the atoms i,j and k.     *     *@param  atomi  Atom i.     *@param  atomj  Atom j.     *@param  atomk  Atom k.     *@return        Angle value.     */    public static  double angleBetweenTwoBonds(IAtom atomi, IAtom atomj, IAtom atomk) {        Vector3d bondij = new Vector3d();        bondij.sub(atomi.getPoint3d(), atomj.getPoint3d());        Vector3d bondjk = new Vector3d();        bondjk.sub(atomk.getPoint3d(), atomj.getPoint3d());        return Math.toDegrees(bondij.angle(bondjk));    }    /**     *  calculates the angle between two bonds, i-j and j-k, given the 3xN atoms coordinates and the atom i,j and k positions.     *     *@param  coords3d  3xN atoms coordinates.     *@param  atomiPosition  Atom i position.     *@param  atomjPosition  Atom j position.     *@param  atomkPosition  Atom k position.     *@return        Angle value.     */    public static  double angleBetweenTwoBondsFrom3xNCoordinates(GVector coords3d,int atomiPosition,int atomjPosition,int atomkPosition) {        atomiCoordinates.set(coords3d.getElement(3 * atomiPosition), coords3d.getElement(3 * atomiPosition + 1), coords3d.getElement(3 * atomiPosition + 2));        atomjCoordinates.set(coords3d.getElement(3 * atomjPosition), coords3d.getElement(3 * atomjPosition + 1), coords3d.getElement(3 * atomjPosition + 2));        atomkCoordinates.set(coords3d.getElement(3 * atomkPosition), coords3d.getElement(3 * atomkPosition + 1), coords3d.getElement(3 * atomkPosition + 2));        Vector3d bondij = new Vector3d();        bondij.sub(atomiCoordinates, atomjCoordinates);        Vector3d bondjk = new Vector3d();        bondjk.sub(atomkCoordinates, atomjCoordinates);        return Math.toDegrees(bondij.angle(bondjk));    }    /**     *  Calculate the torsion angle from 4 atoms i,j,k and l, where i-j, j-k, and     *  k-l are bonded pairs.     *     *@param  atomi  Atom i.     *@param  atomj  Atom j.     *@param  atomk  Atom k.     *@param  atoml  Atom l.     *@return        Torsion angle value.     */    public static  double torsionAngle(IAtom atomi, IAtom atomj, IAtom atomk, IAtom atoml) {        xji = new Vector3d(atomi.getPoint3d());        xji.sub(atomj.getPoint3d());        xjk = new Vector3d(atomk.getPoint3d());        xjk.sub(atomj.getPoint3d());        xlk = new Vector3d(atomk.getPoint3d());        xlk.sub(atoml.getPoint3d());        v1 = new Vector3d();        // v1 = xji x xjk / |xji x xjk|        v1.cross(xji, xjk);        v1.normalize();        v2 = new Vector3d();        // v2 = xjk x xlk / |xjk x xlk|        v2.cross(xjk, xlk);        v2.normalize();        double torsion = v1.dot(v2);        //Math.toDegrees(v1.angle(v2));        System.out.println("torsion = " + torsion);        return torsion;    }    /**     *  Calculate the torsion angle from 4 atoms i,j,k and l positions, where i-j, j-k, and k-l are bonded pairs.     *     *@param  coords3d  3xN atoms coordinates.     *@param  atomiPosition  Atom i position.     *@param  atomjPosition  Atom j position.     *@param  atomkPosition  Atom k position.     *@param  atomlPosition  Atom l position.     *@return        Torsion angle value.     */    public static  double torsionAngleFrom3xNCoordinates(GVector coords3d, int atomiPosition, int atomjPosition, int atomkPosition, int atomlPosition) {        atomiCoordinates.set(coords3d.getElement(3 * atomiPosition), coords3d.getElement(3 * atomiPosition + 1), coords3d.getElement(3 * atomiPosition + 2));        atomjCoordinates.set(coords3d.getElement(3 * atomjPosition), coords3d.getElement(3 * atomjPosition + 1), coords3d.getElement(3 * atomjPosition + 2));        atomkCoordinates.set(coords3d.getElement(3 * atomkPosition), coords3d.getElement(3 * atomkPosition + 1), coords3d.getElement(3 * atomkPosition + 2));        atomlCoordinates.set(coords3d.getElement(3 * atomlPosition), coords3d.getElement(3 * atomlPosition + 1), coords3d.getElement(3 * atomlPosition + 2));        xji = new Vector3d(atomiCoordinates);        xji.sub(atomjCoordinates);        xjk = new Vector3d(atomkCoordinates);        xjk.sub(atomjCoordinates);        xlk = new Vector3d(atomkCoordinates);        xlk.sub(atomlCoordinates);        v1 = new Vector3d();	// v1 = xji x xjk / |xji x xjk|        v1.cross(xji, xjk);        v1.normalize();        v2 = new Vector3d();	// v2 = xjk x xlk / |xjk x xlk|        v2.cross(xjk, xlk);        v2.normalize();        double cosang = v1.dot(v2);        if (cosang >1){            cosang = 1;        }        if (cosang < -1){            cosang=-1;        }        double torsion = Math.acos(cosang);        double dot=xji.dot(v2);        double absDot=Math.abs(dot);        torsion = (dot/absDot > 0) ? torsion : (2 * Math.PI - torsion);        //logger.debug("torsion" + torsion);        return torsion;    }    public static  double toDegrees(double angleRad){        return angleRad*180/Math.PI;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本色综合中文字幕| 亚洲欧洲色图综合| 日韩午夜小视频| 欧美不卡激情三级在线观看| 日韩三级视频中文字幕| 欧美成人午夜电影| 欧美一级免费观看| 久久色在线视频| 欧美一级淫片007| 久久噜噜亚洲综合| 亚洲美女屁股眼交3| 一区二区三区免费| 蜜臀av性久久久久蜜臀aⅴ| 精品一区二区三区欧美| 高清日韩电视剧大全免费| 高清beeg欧美| 久久综合视频网| 国产色产综合色产在线视频| 中文字幕制服丝袜成人av| 亚洲国产中文字幕在线视频综合| 蜜臀精品久久久久久蜜臀| 成人avav影音| 日韩女优毛片在线| 亚洲视频免费在线观看| 国模大尺度一区二区三区| 在线免费亚洲电影| 久久夜色精品国产欧美乱极品| 一区二区三区四区精品在线视频| 久久99精品久久久久久国产越南| 91在线小视频| 精品少妇一区二区三区在线播放 | 99久久婷婷国产综合精品电影 | 一本一本久久a久久精品综合麻豆| 欧美色综合网站| 久久先锋影音av| 蜜乳av一区二区三区| 欧美xfplay| 天天亚洲美女在线视频| 日本韩国一区二区| 一区二区三区欧美日韩| 99久久久国产精品| 中文字幕一区日韩精品欧美| 国产**成人网毛片九色 | 国产精品久线观看视频| 国产成人精品在线看| 欧美激情综合网| 欧美一区2区视频在线观看| 一区二区日韩电影| 欧美亚洲另类激情小说| 日韩在线一区二区三区| 欧美日韩黄色影视| 美女性感视频久久| 中文字幕乱码一区二区免费| 韩国欧美一区二区| 亚洲男人的天堂一区二区| 91女厕偷拍女厕偷拍高清| 亚洲激情在线激情| 97国产一区二区| 奇米一区二区三区| 国产欧美一区二区三区在线看蜜臀 | 国产精品久久毛片av大全日韩| 国产精品一卡二| 亚洲成人动漫在线免费观看| 日韩美女在线视频| 不卡的av电影在线观看| 日韩精品三区四区| 国产成人av一区二区三区在线| 亚洲成人三级小说| 亚洲精品在线电影| 欧美伦理视频网站| 91免费在线视频观看| 国产精品亚洲综合一区在线观看| 丝袜a∨在线一区二区三区不卡| 国产精品免费观看视频| 欧美va天堂va视频va在线| 在线成人免费视频| 欧美日韩日日摸| 在线观看国产91| 91污片在线观看| 欧美人动与zoxxxx乱| 一本大道久久a久久综合| 成人黄色免费短视频| 大胆欧美人体老妇| 白白色亚洲国产精品| 成人一区二区三区| 国产成人a级片| 成人avav在线| 色屁屁一区二区| 91免费精品国自产拍在线不卡| 91免费版在线看| 欧美在线观看18| 欧美妇女性影城| 欧美一区二区三区不卡| 精品综合久久久久久8888| 亚洲免费电影在线| 亚洲欧美自拍偷拍| 国产精品美女视频| 国产精品福利一区二区| 国产日韩欧美电影| 国产精品毛片久久久久久久| 国产丝袜美腿一区二区三区| 久久免费视频色| 国产日韩欧美精品电影三级在线 | 国产91在线观看| 日韩福利视频网| 日日欢夜夜爽一区| 久久国内精品视频| 精品一区二区三区免费观看| 成人激情小说乱人伦| 视频一区中文字幕| 亚洲欧洲韩国日本视频| 日韩欧美www| 久久精品亚洲精品国产欧美| 久久久一区二区| 亚洲va中文字幕| 国产亚洲精品aa| 色婷婷久久久综合中文字幕| 天天亚洲美女在线视频| 捆绑调教一区二区三区| 成人免费毛片嘿嘿连载视频| 欧美性猛交xxxx黑人交| 精品国产乱码91久久久久久网站| 国产精品理伦片| 奇米综合一区二区三区精品视频 | 日本电影欧美片| 91精品国产欧美一区二区18 | 成人网在线播放| 欧美绝品在线观看成人午夜影视| 国产日产欧美一区| 亚洲影视资源网| 国产成人aaa| 91精品国产色综合久久久蜜香臀| 中文欧美字幕免费| 日韩制服丝袜av| 色综合咪咪久久| 国产午夜精品一区二区三区四区| 性久久久久久久久| 不卡一区在线观看| 久久一夜天堂av一区二区三区| 亚洲国产日韩精品| 99久久婷婷国产综合精品电影| 精品少妇一区二区三区在线视频| 亚洲国产日韩一区二区| 91在线一区二区三区| 欧美激情中文不卡| 国产乱子轮精品视频| 91精品国产麻豆国产自产在线 | 欧美喷潮久久久xxxxx| 亚洲色图在线看| 成人免费视频网站在线观看| 欧美不卡一区二区| 免费视频一区二区| 欧美日韩一本到| 亚洲人123区| 一道本成人在线| 亚洲人亚洲人成电影网站色| 国产综合色在线| 欧美精品一区二区三区视频| 免费成人在线网站| 欧美一区二区黄色| 亚洲国产精品一区二区www| 色综合中文字幕| 亚洲欧美成aⅴ人在线观看| av一区二区久久| 国产精品久久毛片a| 成人黄色在线视频| 国产精品理伦片| 91网址在线看| 亚洲免费大片在线观看| 欧美综合欧美视频| 亚洲成人tv网| 欧美一区三区二区| 激情偷乱视频一区二区三区| 日韩欧美视频一区| 国产一区二区在线观看免费| 久久久久久久久岛国免费| 狠狠色伊人亚洲综合成人| 国产视频一区不卡| 99久久99久久综合| 一区二区三区国产豹纹内裤在线| 在线精品国精品国产尤物884a| 亚洲成人激情av| 日韩一卡二卡三卡| 91精品国产欧美一区二区| 日韩电影免费在线观看网站| 欧美一区二区三区日韩视频| 久久99精品久久久久久国产越南 | 欧美色爱综合网| 五月天婷婷综合| 日韩精品一区二区三区中文不卡| 精东粉嫩av免费一区二区三区| 国产亚洲va综合人人澡精品| 92精品国产成人观看免费| 亚洲第一福利一区| 日韩精品综合一本久道在线视频| 国产乱码精品一区二区三区忘忧草| 国产精品毛片a∨一区二区三区| 日本伦理一区二区| 久久99精品久久久久久| 国产精品三级久久久久三级|