-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
example to generate a psf file without charmm
- Loading branch information
1 parent
07c6caa
commit de5a366
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import sys | ||
#pip install git+https://github.com/florianjoerg/cbchelpers.git | ||
from cbchelpers.parmed_extension import enable_psf_from_scratch | ||
enable_psf_from_scratch() | ||
from parmed.charmm import CharmmParameterSet, CharmmPsfFile | ||
|
||
def main(): | ||
para_files = [ | ||
"../../protex/forcefield/toppar/toppar_drude_master_protein_2013f_lj025.str", | ||
"../../protex/forcefield/toppar/im1h_d.str", | ||
"../../protex/forcefield/toppar/oac_d_dummy.str", | ||
"../../protex/forcefield/toppar/im1_d_dummy.str", | ||
"../../protex/forcefield/toppar/hoac_d.str", | ||
] | ||
|
||
molecules = { | ||
"IM1H": {"number": 150, "drude_mass": 0.4}, | ||
"OAC": {"number": 150, "drude_mass": 0.4}, | ||
"IM1": {"number": 350, "drude_mass": 0.4}, | ||
"HOAC": {"number": 350, "drude_mass": 0.4}, | ||
} | ||
|
||
params = CharmmParameterSet(*para_files) | ||
psf = CharmmPsfFile.from_scratch(params, molecules) | ||
print(len(psf.residues)) | ||
psf.write_psf("im1h_oac_150_im1_hoac_350.psf") | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
###change### | ||
filename="im1h_oac_150_im1_hoac_350" | ||
############# | ||
|
||
echo "Running packmol..." | ||
packmol <packmol.inp >packmol.out | ||
echo "Running pdb2crd..." | ||
./pdb2crd ${filename}_init.pdb >${filename}.crd | ||
echo "Running Python, create psf" | ||
python generate_psf.py |