Beispiel #1
0
void
print_clustering(point ps[], int n, int k, int cs[],FILE *output)
{
	int i;
	char str[MAXSTR+1];
	for(i=0;i<n;i++){
		point2string(str,ps[i]);
		fprintf(output,"%s  %4d\n",str,cs[i]+1);
	}
}
Beispiel #2
0
void
test_read(point ps[], int n, int k, FILE *output)
{
	int i,j;
	char str[MAXSTR+1];

	fprintf(output,"k is %8d\n",k);
	for(i=0;i<n;i++){
		point2string(str,ps[i]);
		fprintf(output,"ps[%6d]: %s\n",i,str);
	}
	for(i=0;i<n;i++){
		for(j=i;j<n;j++){
			fprintf(output,"d(ps[%4d],ps[%4d]) = %20.10Lf\n",
				i,j,dist(ps[i],ps[j]));
		}
	}
}
Beispiel #3
0
void OutputPDB::writeVectorPoint(ostream &s, vector_point_sp vp)
{
    int line = 0;

	if (m_step_counter && !m_multiple_files)
		s << endl;
		
	s << "COMPND    particle positions" << endl;

    for (vector<point_t>::iterator i = vp->begin(); i != vp->end(); i++) {
        s << "HETATM " << setw(4) << (line+1) << "  H           1     " << point2string(*i, false) << "  1.00  0.00           H" << endl;
		
        line++;
    }
	
	s << "TER " << setw(7) << (line+1) << endl;
	s << "END" << endl;
}