-
Notifications
You must be signed in to change notification settings - Fork 32
WriteAPDBFile
dstoeckel edited this page Mar 16, 2015
·
4 revisions
Open a PDB-file in openmode out and stream a system of molecules into that file. Don't forget to close your file.
#include <BALL/FORMAT/PDBFile.h>
#include <BALL/KERNEL/system.h>
using namespace BALL;
using namespace std;
System system;
...
// add or change something in the system
...
// and write the file
PDBFile outfile("test.pdb", ios::out);
outfile << system;
outfile.close();
import sys
from BALL import *
system = System()
...
# add or change something in the system
...
# and write the system into a PDB file
outfile = PDBFile("test.pdb", File.MODE_OUT)
outfile.write(system)
outfile.close()
print "File test.pdb saved successfully!"