Revision: 54082
          http://brlcad.svn.sourceforge.net/brlcad/?rev=54082&view=rev
Author:   brlcad
Date:     2012-12-17 20:39:37 +0000 (Mon, 17 Dec 2012)
Log Message:
-----------
apply a work-in-progress patch submitted by brendon jackson via e-mail, part of 
an independent study to create molecular geometry.  this stubs main.

Modified Paths:
--------------
    brlcad/trunk/src/proc-db/CMakeLists.txt

Added Paths:
-----------
    brlcad/trunk/src/proc-db/pdb-g.c

Modified: brlcad/trunk/src/proc-db/CMakeLists.txt
===================================================================
--- brlcad/trunk/src/proc-db/CMakeLists.txt     2012-12-17 20:20:56 UTC (rev 
54081)
+++ brlcad/trunk/src/proc-db/CMakeLists.txt     2012-12-17 20:39:37 UTC (rev 
54082)
@@ -26,6 +26,7 @@
 BRLCAD_ADDEXEC(mkbuilding "mkbuilding.c;makebuilding/makebuilding.c" libwdb)
 BRLCAD_ADDEXEC(molecule molecule.c libwdb)
 BRLCAD_ADDEXEC(nmgmodel nmgmodel.c libwdb)
+BRLCAD_ADDEXEC(pdb-g pdb-g.c libwdb)
 BRLCAD_ADDEXEC(pipe pipe.c "libwdb;${M_LIBRARY}")
 BRLCAD_ADDEXEC(pipetest pipetest.c libwdb)
 BRLCAD_ADDEXEC(pix2g pix2g.c libwdb)

Added: brlcad/trunk/src/proc-db/pdb-g.c
===================================================================
--- brlcad/trunk/src/proc-db/pdb-g.c                            (rev 0)
+++ brlcad/trunk/src/proc-db/pdb-g.c    2012-12-17 20:39:37 UTC (rev 54082)
@@ -0,0 +1,88 @@
+/*                         P D B - G . C
+ * BRL-CAD
+ *
+ * Copyright (c) 2012 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+
+#include "common.h"
+
+#include "bu.h"
+
+
+void
+read_pdb(char *fileName)
+{
+    if (!bu_file_exists(fileName, 0)) {
+       fprintf(stderr, "pdb file: %s, does not exist\n", fileName);
+       return;
+    }
+
+    bu_log("pdb file: %s\n", fileName);
+
+    return;
+}
+
+
+void
+mk_protein()
+{
+    return;
+}
+
+
+void
+write_g(char *fileName)
+{
+    if (!bu_file_exists(fileName, 0)) {
+       fprintf(stderr, "g file: %s, does not exist\n", fileName);
+       return;
+    }
+
+    bu_log("g file: %s\n", fileName);
+
+    return;
+}
+
+
+/* format of command: pdb-g pdbfile gfile */
+int
+main(int argc, char *argv[])
+{
+    if (argc < 3) {
+       fprintf(stderr, "No pdb filename or g filename given.\n");
+       return 1;
+    }
+
+    read_pdb(argv[1]);
+
+    mk_protein();
+
+    write_g(argv[2]);
+
+    return 0;
+}
+
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */


Property changes on: brlcad/trunk/src/proc-db/pdb-g.c
___________________________________________________________________
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to