Skip to content

Commit

Permalink
delete junk files
Browse files Browse the repository at this point in the history
  • Loading branch information
vuqv committed Sep 10, 2021
1 parent 053dda3 commit 143775f
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 277 deletions.
24 changes: 16 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
import os
import sys
import sphinx
import sphinx_rtd_theme
sys.path.insert(0, os.path.abspath('..'))


# -- Project information -----------------------------------------------------

project = 'HPS-Urry'
copyright = '2021, Quyen Vu'
author = 'Quyen Vu'
project = u'HPS-Urry'
copyright = u'2021, Quyen Vu'
author = u'Quyen Vu'

# The short X.Y version
version = '2021.0'
Expand All @@ -46,18 +47,25 @@
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'numpydoc'
'numpydoc',
'sphinx.ext.viewcode',
'sphinx.ext.doctest',
'sphinx.ext.coverage'
]

autosummary_generate = True
#numpydoc_show_class_members = False
autodoc_default_flags = ['members', 'inherited-members']


# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# If true, the current module name will be prepended to all description unit titles.
add_module_names = False

# html_sidebars = {
# '**': ['localtoc.html', 'searchbox.html'],
# }

html_sidebars = {
'**': ['localtoc.html', 'sourcelink.html', 'searchbox.html'],
}

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
54 changes: 0 additions & 54 deletions hps/analysis/cal_rg.py

This file was deleted.

23 changes: 0 additions & 23 deletions hps/analysis/compute_rg.py

This file was deleted.

93 changes: 0 additions & 93 deletions hps/analysis/saxs profile.py

This file was deleted.

32 changes: 16 additions & 16 deletions hps/core/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class system:
yukawaForce : :code:`openmm.CustomNonbondedForce`
Stores the OpenMM :code:`CustomNonbondedForce` initialized-class.
Implements the Debye-Huckle potential.
pairWiseForce : :code:`openmm.CustomNonbondedForce`
ashbaughHatchForces : :code:`openmm.CustomNonbondedForce`
Stores the OpenMM :code:`CustomNonbondedForce` initialized-class. Implements the pairwise short-range
potential.
forceGroups : :code:`collections.OrderedDict`
Expand Down Expand Up @@ -92,7 +92,7 @@ class system:
class using their defined forcefield parameters.
addYukawaForces()
Creates a nonbonded force term for electrostatic interaction DH potential.
addPairWiseForces()
addAshbaughHatchForces()
Creates a nonbonded force term for pairwise interaction (customize LJ 12-6 potential).
createSystemObject()
Creates OpenMM system object adding particles, masses and forces.
Expand Down Expand Up @@ -171,7 +171,7 @@ def __init__(self, structure_path, particles_mass=1.0):

# self.exclusions = []
# PairWise potential
self.pairWiseForce = None
self.ashbaugh_HatchForce = None
# self.muy = 1
# self.delta = 0.08
self.epsilon = 0.8368
Expand Down Expand Up @@ -552,7 +552,7 @@ def addAshbaughHatchForces(self):
\\epsilon = 0.8368 kj/mol`
The
The force object is stored at the :code:`pairWiseForce` attribute.
The force object is stored at the :code:`ashbaugh_HatchForce` attribute.
Parameters
----------
Expand All @@ -573,26 +573,26 @@ def addAshbaughHatchForces(self):
energy_function += '+(1-step(2^(1/6)*sigma-r)) * (hps*4*epsilon*((sigma/r)^12-(sigma/r)^6));'
energy_function += 'sigma=0.5*(sigma1+sigma2);'
energy_function += 'hps=0.5*(hps1+hps2)'
self.pairWiseForce = CustomNonbondedForce(energy_function)
self.pairWiseForce.addGlobalParameter('epsilon', self.epsilon)
self.pairWiseForce.addPerParticleParameter('sigma')
self.pairWiseForce.addPerParticleParameter('hps')
self.pairWiseForce.setNonbondedMethod(NonbondedForce.CutoffNonPeriodic)
self.pairWiseForce.setCutoffDistance(self.cutoff_Ashbaugh_Hatch)
self.ashbaugh_HatchForce = CustomNonbondedForce(energy_function)
self.ashbaugh_HatchForce.addGlobalParameter('epsilon', self.epsilon)
self.ashbaugh_HatchForce.addPerParticleParameter('sigma')
self.ashbaugh_HatchForce.addPerParticleParameter('hps')
self.ashbaugh_HatchForce.setNonbondedMethod(NonbondedForce.CutoffNonPeriodic)
self.ashbaugh_HatchForce.setCutoffDistance(self.cutoff_Ashbaugh_Hatch)

if isinstance(self.rf_sigma, float):
for atom in self.atoms:
self.pairWiseForce.addParticle((self.rf_sigma,))
self.ashbaugh_HatchForce.addParticle((self.rf_sigma,))

# in the case each atoms have different sigma para.
elif isinstance(self.rf_sigma, list):
assert self.n_atoms == len(self.rf_sigma) and self.n_atoms == len(self.particles_hps)
for i, atom in enumerate(self.atoms):
self.pairWiseForce.addParticle((self.rf_sigma[i], self.particles_hps[i],))
self.ashbaugh_HatchForce.addParticle((self.rf_sigma[i], self.particles_hps[i],))

# set exclusions rule
bonded_exclusions = [(b[0].index, b[1].index) for b in list(self.topology.bonds())]
self.pairWiseForce.createExclusionsFromBonds(bonded_exclusions, self.bonded_exclusions_index)
self.ashbaugh_HatchForce.createExclusionsFromBonds(bonded_exclusions, self.bonded_exclusions_index)

""" Functions for creating OpenMM system object """
def createSystemObject(self, check_bond_distances=True, minimize=False, check_large_forces=True,
Expand Down Expand Up @@ -809,9 +809,9 @@ def addSystemForces(self):
self.system.addForce(self.yukawaForce)
self.forceGroups['Yukawa Energy'] = self.yukawaForce

if self.pairWiseForce is not None:
self.system.addForce(self.pairWiseForce)
self.forceGroups['PairWise Energy'] = self.pairWiseForce
if self.ashbaugh_HatchForce is not None:
self.system.addForce(self.ashbaugh_HatchForce)
self.forceGroups['PairWise Energy'] = self.ashbaugh_HatchForce

def dumpStructure(self, output_file):
"""
Expand Down
8 changes: 6 additions & 2 deletions hps/parameters/ca_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@
'SER': 0.595, 'THR': 0.676, 'TRP': 0.946,
'TYR': 0.865, 'VAL': 0.892}
"""
Hydropathy scale (Urry scale)
Here we use muy=1 and delta = 0.08. Directly scale the hps.
Hydropathy scale.
There are two options to select when running simulation by specify hps_scale='kr'/'urry'
In the case of Urry, we implicitly use muy=1 and delta = 0.08 to move equation in two scales to be the same.
Regy, R. M., Thompson, J., Kim, Y. C., & Mittal, J. (2021).
Improved coarse-grained model for studying sequence dependent phase separation of disordered proteins.
Protein Science, 30(7), 1371–1379. https://doi.org/10.1002/pro.4094
Expand All @@ -58,6 +60,8 @@
'SER': 0.0, 'THR': 0.0, 'TRP': 0.0,
'TYR': 0.0, 'VAL': 0.0}
"""
* Kapcha-Rossy and Urry model different in charge of HIS, in Urry, HIS has charge of 0, while in KR, HIS=0.5
We switch in set CA Charge function.
Charge of the coarse-grain beads, assigns to it alpha-carbon atoms.
Charges are determined at neutral pH (pH=7).
Setting to the values from, where ARG, LYS =1 and ASP, GLU = -1,
Expand Down
30 changes: 0 additions & 30 deletions hps/parameters/fq_saxs.py

This file was deleted.

Loading

0 comments on commit 143775f

Please sign in to comment.