Dear Sajid,
Apologies for the delay in replying - I have just returned from holiday.
I am afraid that this type of calculation will be difficult to perform
using ProtoMS. This is because ProtoMS is designed to only contain a
single simulation box, so you would have to use two separate ProtoMS
calculations to simulate the two boxes (and then have to handle moving
molecules between boxes yourself, e.g. by using a python script to add
or remove molecules from PDB files).
You may make more progress using Sire, which is the code I wrote to
replace ProtoMS. Sire provides a C++/Python toolkit of building blocks
that will let you quickly set up a wide range of different
calculations. For your case, assuming you use Amber format topology /
coordinate files for your two boxes (which can be made easily using
ambertools), a Sire script to achieve what you want would be something
like the script written below. To run it, you will need to download
and install Sire as described here
<
http://siremol.org/Sire/Binaries.html> (these are precompiled
binaries that should work on most Linux and Macs). You then run your
python script using;
/path/to/
sire.app/bin/python script.py
script.py
===============================
# load the required Sire modules
from Sire.IO import *
from Sire.Mol import *
from Sire.MM import *
from Sire.System import *
# load up the box 1 and box 2 molecules and periodic box information from their
# respective amber topology and coordinate files
(box1_mols, box1_space) = Amber().readCrdTop("box1.crd", "box1.top")
(box2_mols, box2_space) = Amber().readCrdTop("box2.crd", "box2.top")
# create two simulations systems, one to hold each box
box1_system = System("box1")
box2_system = System("box2")
# intermolecule coulomb and LJ energy
box1_interff = InterCLJFF("box1_inter")
box2_interff = InterCLJFF("box2_inter")
box1_interff.add(box1_mols)
box2_interff.add(box2_mols)
# intramolecular bond, angle and dihedral energy
box1_intraff = InternalFF("box1_intra")
box2_intraff = InternalFF("box2_intra")
box1_intraff.add(box1_mols)
box2_intraff.add(box2_mols)
# intramolecular coulomb and LJ energy
box1_intraclj = IntraCLJFF("box1_intraclj")
box2_intraclj = IntraCLJFF("box2_intraclj")
box1_intraclj.add(box1_mols)
box2_intraclj.add(box2_mols)
# add all molecules and forcefields for box 1 to the box 1 system
box1_system.add(box1_mols)
box1_system.add(box1_interff)
box1_system.add(box1_intraff)
box1_system.add(box1_intraclj)
# add all molecules and forcefields for box 2 to the box 2 system
box2_system.add(box2_mols)
box2_system.add(box2_interff)
box2_system.add(box2_intraff)
box2_system.add(box2_intraclj)
# set the periodic box information for each box
box1_system.setProperty("space", box1_space)
box2_system.setProperty("space", box2_space)
# calculate the energy of box boxes
box1_energy = box1_system.energy()
box2_energy = box2_system.energy()
# print out the energies
print("Box 1 energy = %s" % box1_energy)
print("Box 2 energy = %s" % box2_energy)
# Now we will create two more boxes;
# box3 = box1 - RNA
# box4 = box2 + RNA
# Assuming that the RNA molecule is in box 1 and contains a residue called "RNA"
rna_molecule = box1_molecules[ MolWithResID("RNA") ].molecule()
box3_mols = MoleculeGroup(box1_mols)
box3_mols.remove(rna_molecule.number())
box3_space = box1_space
box4_mols = MoleculeGroup(box2_mols)
box4_mols.add(rna_molecule)
box4_space = box2_space
box3_system = System("box3")
box4_system = System("box4")
box3_interff = InterCLJFF("box3_inter")
box4_interff = InterCLJFF("box4_inter")
box3_interff.add(box3_mols)
box4_interff.add(box4_mols)
box3_intraff = InternalFF("box3_intra")
box4_intraff = InternalFF("box4_intra")
box3_intraff.add(box3_mols)
box4_intraff.add(box4_mols)
box3_intraclj = IntraCLJFF("box3_intraclj")
box4_intraclj = IntraCLJFF("box4_intraclj")
box3_intraclj.add(box3_mols)
box4_intraclj.add(box4_mols)
box3_system.add(box3_mols)
box3_system.add(box3_interff)
box3_system.add(box3_intraff)
box3_system.add(box3_intraclj)
box4_system.add(box4_mols)
box4_system.add(box4_interff)
box4_system.add(box4_intraff)
box4_system.add(box4_intraclj)
box3_system.setProperty("space", box3_space)
box4_system.setProperty("space", box4_space)
# calculate the energy of box boxes
box3_energy = box3_system.energy()
box4_energy = box4_system.energy()
# print out the energies
print("Box 3 energy = %s" % box3_energy)
print("Box 4 energy = %s" % box4_energy)
=========================================
Note that Sire can do a lot more than just the above, e.g. there are
Monte Carlo move objects and complex energy expressions so that you
can build your Hamiltonian to span both boxes and can run Monte Carlo
simulations on both boxes together. Please get in touch if you would
like to do this and I can give you help. Also, if you are not familiar
with python, check out my introduction to Python course here;
<
http://chryswoods.com/beginning_python>
and if you know some python and want to look at the documentation for
the classes used in the above script, please look here;
<
http://siremol.org/apidocs/sire/index.html>
(use the search box on the top right of the page to search for the
class, e.g. System)
Best wishes,
Christopher
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "ProtoMS users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
protoms-user...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
--
---------------------------------------------------------
Christopher Woods
Centre for Computational Chemistry
School of Chemistry
University of Bristol, BS8 1TS, UK
+44 (0) 7786 264562
http://chryswoods.com
http://uk.linkedin.com/in/chryswoods