mirror of
https://github.com/openbabel/openbabel.git
synced 2026-08-27 05:37:38 -05:00
fix firstonly logic and extend man page
This commit is contained in:
+24
-3
@@ -3,20 +3,41 @@
|
||||
.Dt obrms 1 URM
|
||||
.Sh NAME
|
||||
.Nm obrms
|
||||
.Nd "calculate the RMSD between two chemically identical structures"
|
||||
.Nd "Calculate the heavy-atom RMSD between two chemically identical structures"
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Ar -firstonly
|
||||
.Op -fmxso
|
||||
.Ar filename1
|
||||
.Ar filename2
|
||||
.Sh DESCRIPTION
|
||||
Computes the heavy-atom RMSD of identical compound structures.
|
||||
Structures in multi-structure files are compared one-by-one unless -firstonly
|
||||
is passed, in which case only the first structure in the reference file is used.
|
||||
.Sh OPTIONS
|
||||
.Bl -tag -width flag
|
||||
.It Fl f, -firstonly
|
||||
use only the first structure in the reference file (otherwise the nth molecule
|
||||
in the reference file is compared to the nth molecule in the test file)
|
||||
.It Fl m, -minimize
|
||||
Compute the minimum RMSD achievable by applying a rigid-body transformation to
|
||||
the test molecule
|
||||
.It Fl x, -cross
|
||||
Compute all n^2 RMSDs between molecules of the reference file. Test file is ignored.
|
||||
.It Fl s, -separate
|
||||
Separate reference file into constituent molecules (disconnected fragments)
|
||||
and report best RMSD
|
||||
.It Fl o, -out
|
||||
Re-oriented test structure output (used with -m)
|
||||
.Sh EXAMPLES
|
||||
.Dl "obrms ref.sdf test.sdf"
|
||||
.Pp
|
||||
Calculate the RMSD between ref.sdf and test.sdf
|
||||
Calculate the RMSD between ref.sdf and test.sdf. Both files should have the
|
||||
same number of molecules.
|
||||
|
||||
.Dl "obrms -f ref.sdf test.sdf"
|
||||
.Pp
|
||||
Calculate the RMSD between the first molecule in ref.sdf and each molecule in
|
||||
test.sdf.
|
||||
.Sh SEE ALSO
|
||||
.Xr obfit 1 .
|
||||
.Pp
|
||||
|
||||
+5
-3
@@ -139,7 +139,7 @@ class Matcher
|
||||
}
|
||||
|
||||
qtrfit(refcoord, testcoord, N, rmatrix);
|
||||
rotate_coords(testcoord, rmatrix, N);
|
||||
rotate_coords(testcoord, rmatrix, N);
|
||||
|
||||
for (unsigned i = 0; i < N; i++)
|
||||
{
|
||||
@@ -226,7 +226,7 @@ int main(int argc, char **argv)
|
||||
"Usage: obrms reference_file [test_file]\n"
|
||||
"Options:\n"
|
||||
"\t -o, --out re-oriented test structure output\n"
|
||||
"\t -f, --firstonly use only the first structure in the test file\n"
|
||||
"\t -f, --firstonly use only the first structure in the reference file\n"
|
||||
"\t -m, --minimize compute minimum RMSD\n"
|
||||
"\t -x, --cross compute all n^2 RMSDs between molecules of reference file\n"
|
||||
"\t -s, --separate separate reference file into constituent molecules and report best RMSD\n"
|
||||
@@ -373,9 +373,11 @@ int main(int argc, char **argv)
|
||||
{
|
||||
outconv.Write(&moltest, &out);
|
||||
}
|
||||
if (firstOnly)
|
||||
if (!firstOnly) //one test molecule will be read for each reference molecule
|
||||
break;
|
||||
}
|
||||
if(firstOnly) //done with first reference mol
|
||||
break;
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
|
||||
Reference in New Issue
Block a user