weria-pezeshkian / TS2CG1.2

TS2CG version 1.2
GNU General Public License v3.0
4 stars 2 forks source link

Creating a point class #16

Open jan-stevens opened 2 weeks ago

jan-stevens commented 2 weeks ago

Hi,

This is groundwork for creating a Point class with a nicer user API. The intended structure of the API is:

from TS2CG import PLM, Point, PCG

# Generate point folder
PLM(*args)

# Load in the point folder
membrane = Point("./point_folder")

# Work with inclusions
membrane.inclusions.add_protein(type_id=1, point_id=42)
membrane.exclusions.add_pore(point_id=50, radius=2.0)

# Work with membrane properties
print(membrane.inner.mean_curvature)

# Create membrane
PCG(*args)

The functionality of the Point class is complete and (somewhat) tested. The work is now mainly on reworking the subcommand using the rewritten Point class.

jan-stevens commented 1 week ago

@fabianschuhmann I added the missing features we discussed and also moved the DOP from a 'lipid-centric' approach back to a 'point-centric' approach. I tested it on the sine wave tsi file Isabell shared and the mitochondrion; both seem to now work nicely.

Let me know what you think. Both the Point class and the DOP are now feature complete in my opinion.