Fragment complexity

Fragmentってゆーから期待してしまいましたが、
ソースコードを読んで、単に結合の粗密を測る尺度だとわかりました。
Nilakantanら*1の論文では、
別プログラムで環構造単位に分子を切断した後、それぞれのフラグメントについて
この尺度で計算していますので、名前はここに由来しているのでしょう。まぎらわしい。


計算式は、
Aを重原子の数、Bを結合の数、Hをヘテロ原子の数としたときに
 abs(B^2 - A^2 + A) + (H / 100)
というシンプルなものです。CDKのソースコードも短いのです。


/* fragcomplex.java */

import java.io.*;
import org.openscience.cdk.interfaces.*;
import org.openscience.cdk.io.iterator.IteratingSMILESReader;
import org.openscience.cdk.interfaces.IMolecule;

class fragcomplex {
public static void main(String args[]){
if(args.length!=1){
System.err.println("fragcomplex <smiles-file>");
System.exit(1);
}
FileInputStream fis = null;
IteratingSMILESReader isr = null;
try{
fis = new FileInputStream(new File(args[0]));
isr = new IteratingSMILESReader(fis);
} catch (Exception e) {
e.printStackTrace();
}


while( isr.hasNext() ){
IMolecule imol = (IMolecule)isr.next();
String id = (String)imol.getProperty("cdk:Title");

double C = 0.0;
int A = 0;
double H = 0;
try{
for (int i = 0; i < imol.getAtomCount(); i++) {
if (! imol.getAtom(i).getSymbol().equals("H")) {
A++;
}
if ( ! imol.getAtom(i).getSymbol().equals("H") &
! imol.getAtom(i).getSymbol().equals("C")) {
H++;
}
}
int B = imol.getBondCount();
C = Math.abs(B * B - A * A + A) + (H / 100);
} catch (Exception e) {
e.printStackTrace();
}
System.out.printf("%s\t%.3f\n", id, C);
}
}
}

原子数に比べて結合数が大きいと値が大きくなります。

*1: Nilakantan et al. A family of ring system-based structural fragments for use in structure-activity studies: database mining and recursive partitioning. J. Chem. Inf. Model. (2006) 46, 1069-1077 PubMed