首页 >
> 详细

实现分子计算器，练习Java三方类库的使用。

This is the last practical exercise and will continue over the remaining weeks of the course.

In this practical you will implement a real molecular similarity method

Ultrafast shape recognition to search compound databases for similar molecular shapes

So this problem involves reading from a file one reference molecule calculating a descriptor for it, then reading a series of molecules from a second file, computing the descriptor for each molecule and then quantifying the difference between it and the reference. At the end of the run the program should report the closest molecule and the magnitude of its difference to the reference. All files will be in SD format and hydrogens should be completely ignored in the procedure

The descriptor we will calculate consists of 4 triples of numbers. Each triple consists of 3 statistical measures of distances from a point.

The measures are

- The mean distance from the point (sum of all distances divided by number of distances)
- The variance of this distance (sum of the squares of distances - mean all divided by number of distances minus 1)
- The skew of this distance (sum of the cubes of (distances - mean) / standard dev all divided by number of distances. The standard deviation is the square root of the variance.

The four points we use to calculate these from are

- The centre of gravity
- the closest atom position to the COG
- The furthest atom position from the COG
- The furthest atom position from point 3 above.

To calculate the difference between any 12 double set and another simply do the equivalent of a distance calculation but over all 12 numbers.

Remember we know how to read SDfiles from a previous practical, however here is a reminder

In order to access the CDK library you will need some import statements

1 |
import org.openscience.cdk.CDKConstants; |

import org.openscience.cdk.interfaces.*;

To read a single SD file you could use something like

1 |
IteratingMDLReader MDLReader = new IteratingMDLReader(new FileInputStream(RefFile), DefaultChemObjectBuilder.getInstance()); |

To read a sequence of files from an SD file

1 |
MDLReader = new IteratingMDLReader(new FileInputStream(ScrFile), DefaultChemObjectBuilder.getInstance()); |

To get the name of a Molecule (here called m1) object

1 |
Name = new String(String.valueOf(m1.getProperty(CDKConstants.TITLE))); |

To get its number of atoms

1 |
int natoms = m1.getAtomCount(); |

you can get each atom in a molecule by

1 |
IAtom myatom = m1.getAtom(i); |

Where i is the ith atom

You can get the chemical symbol from each atom

1 |
String s1 = myatom.getSymbol(); |

You can get the coordinates as a Point3d object by

1 |
Point3d mypoint = myatom.getPoint3d(); |

(to use Point3d class you have to import `javax.vecmath.Point3d`

)

The Point3d class has a method called distance which returns the distance between the instance calling and its argument so

1 |
Point3d a,b; |

In addition to the usual criteria of Functionality, readability, comments and a readme file, I request that you prepare a document called plan.txt in which you write a simple logic plan for the program.

In order that you don’t get bogged down in the statistics I have given you a set of example methods to calculate mean, variance and skew.

联系我们

- QQ：99515681
- 邮箱：99515681@qq.com
- 工作时间：8:00-23:00
- 微信：codinghelp

- 代写cs3014 Google Analytics Customer Rev 2020-01-21
- 代写cmpsc121 Structs代写留学生c/C++实验... 2020-01-21
- 代写mis6326 Data Management调试存储过程作业、数据库编 2020-01-21
- 代写msci 581作业、代做marketing Analytics作业、P 2020-01-20
- Software课程作业代做、代写java，C/C++程序设计作业、Pyth 2020-01-20
- Tcss 372作业代做、代写python，Java编程语言作业、代做c/C 2020-01-20
- Emergency Facilities作业代写、代写r编程设计作业、R课程 2020-01-18
- Cis 413/513作业代做、代写data Structures作业、Ja 2020-01-18
- 代写ia626留学生作业、Python程序设计作业调试、代做data课程作业 2020-01-18
- Mat00027i作业代写、Java程序语言作业调试、Mathematica 2020-01-17
- 代做kt Model作业、代写java，Python编程设计作业、代做c/C 2020-01-17
- Data Set课程作业代做、代写r程序语言作业、Ltcret留学生作业代做 2020-01-17
- 代写rstudio留学生作业、代做r编程设计作业、代写r课程设计作业代做数据 2020-01-17
- 代写cs2250 Delimiter Matching代做数据结... 2020-01-16
- 代写cs12b Edit Distance帮写java实验作业... 2020-01-16
- 代写mins325 Filereader And Filewriter代... 2020-01-16
- 代写cosi131 Tunnels帮写java实验作业 2020-01-16
- 代写inm312 Balancebit Software代写留学... 2020-01-16
- 代写cs61b Maze Solver代写java课程设计 2020-01-16
- Program留学生作业代做、C/C++编程语言作业代写、代做java，Py 2020-01-14